Skip to content

Commit

Permalink
be able to get the utf8 button text
Browse files Browse the repository at this point in the history
  • Loading branch information
lunarcloud committed Jan 20, 2017
1 parent a55789c commit bce347a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions impactjs-plugin/gameinput-gamepad.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ ig.module(
return "img/gamepad/buttons/" + theme.toLowerCase() + "/" + button + ".png";
},

getGameInputButtonText: function(player, button)
getGameInputButtonText: function(player, button, supportsUTF8)
{
if ( typeof(button) === "undefined" && typeof(player) === "string" ) /* If you only provide the button name... */
{
Expand All @@ -256,7 +256,7 @@ ig.module(

if (typeof(button) !== "string" || button in gi.Schema.Names === false) throw "Must provide a value from gi.Schema.Names!";

return gi.getPlayer(player-1).getButtonText(button, true);
return gi.getPlayer(player-1).getButtonText(button, supportsUTF8 === true ? false : true);
}
});

Expand Down

0 comments on commit bce347a

Please sign in to comment.