mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
android fixes
This commit is contained in:
parent
6e461a6125
commit
7f1e57ba4f
5 changed files with 9 additions and 19 deletions
|
|
@ -87,12 +87,7 @@ class ControllerBindingsGui extends GuiImage {
|
|||
}
|
||||
}
|
||||
|
||||
#if hl
|
||||
var scene2d = hxd.Window.getInstance();
|
||||
#end
|
||||
#if js
|
||||
var scene2d = MarbleGame.instance.scene2d;
|
||||
#end
|
||||
|
||||
var offsetX = (scene2d.width - 1280) / 2;
|
||||
var offsetY = (scene2d.height - 720) / 2;
|
||||
|
|
|
|||
|
|
@ -25,12 +25,7 @@ class InputSelectGui extends GuiImage {
|
|||
this.position = new Vector();
|
||||
this.extent = new Vector(640, 480);
|
||||
|
||||
#if hl
|
||||
var scene2d = hxd.Window.getInstance();
|
||||
#end
|
||||
#if js
|
||||
var scene2d = MarbleGame.instance.scene2d;
|
||||
#end
|
||||
|
||||
var offsetX = (scene2d.width - 1280) / 2;
|
||||
var offsetY = (scene2d.height - 720) / 2;
|
||||
|
|
@ -64,8 +59,8 @@ class InputSelectGui extends GuiImage {
|
|||
btnList.extent = new Vector(502, 500);
|
||||
innerCtrl.addChild(btnList);
|
||||
|
||||
btnList.addButton(0, 'Keyboard Controls', (e) -> {
|
||||
MarbleGame.canvas.setContent(new KeyBindingsGui(pauseGui));
|
||||
btnList.addButton(0, 'Touch Controls', (e) -> {
|
||||
MarbleGame.canvas.setContent(new TouchOptionsGui(pauseGui));
|
||||
});
|
||||
btnList.addButton(0, 'Gamepad Controls', (e) -> {
|
||||
MarbleGame.canvas.setContent(new ControllerBindingsGui(pauseGui));
|
||||
|
|
|
|||
|
|
@ -25,12 +25,7 @@ class LeaderboardsSelectGui extends GuiImage {
|
|||
this.position = new Vector();
|
||||
this.extent = new Vector(640, 480);
|
||||
|
||||
#if hl
|
||||
var scene2d = hxd.Window.getInstance();
|
||||
#end
|
||||
#if js
|
||||
var scene2d = MarbleGame.instance.scene2d;
|
||||
#end
|
||||
|
||||
var offsetX = (scene2d.width - 1280) / 2;
|
||||
var offsetY = (scene2d.height - 720) / 2;
|
||||
|
|
|
|||
|
|
@ -65,6 +65,11 @@ class OptionsListGui extends GuiImage {
|
|||
btnList.addButton(3, 'Input and Sound Options', (e) -> {
|
||||
MarbleGame.canvas.setContent(new InputOptionsGui(pauseGui));
|
||||
});
|
||||
|
||||
btnList.addButton(3, 'Input Controls', (e) -> {
|
||||
MarbleGame.canvas.setContent(new InputSelectGui(pauseGui));
|
||||
});
|
||||
|
||||
if (Util.isTouchDevice()) {
|
||||
if (!pauseGui) {
|
||||
btnList.addButton(3, 'Touch Controls', (e) -> {
|
||||
|
|
|
|||
|
|
@ -114,12 +114,12 @@ class TouchOptionsGui extends GuiImage {
|
|||
backButton.pressedAction = (e) -> {
|
||||
Settings.applySettings();
|
||||
MarbleGame.canvas.popDialog(this);
|
||||
MarbleGame.canvas.pushDialog(new OptionsListGui(true));
|
||||
MarbleGame.canvas.pushDialog(new InputSelectGui(true));
|
||||
}
|
||||
else
|
||||
backButton.pressedAction = (e) -> {
|
||||
Settings.applySettings();
|
||||
MarbleGame.canvas.setContent(new OptionsListGui());
|
||||
MarbleGame.canvas.setContent(new InputSelectGui());
|
||||
};
|
||||
bottomBar.addChild(backButton);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue