mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fix hotkeys
This commit is contained in:
parent
e8ad3d640c
commit
1b838aabab
1 changed files with 9 additions and 1 deletions
|
|
@ -46,6 +46,14 @@ class OptionsDlg extends GuiImage {
|
||||||
return [normal, hover, pressed];
|
return [normal, hover, pressed];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadButtonImages2(path:String) {
|
||||||
|
var normal = ResourceLoader.getResource('${path}_n.png', ResourceLoader.getImage, this.imageResources).toTile();
|
||||||
|
var hover = ResourceLoader.getResource('${path}_h.png', ResourceLoader.getImage, this.imageResources).toTile();
|
||||||
|
var pressed = ResourceLoader.getResource('${path}_d.png', ResourceLoader.getImage, this.imageResources).toTile();
|
||||||
|
var disabled = ResourceLoader.getResource('${path}_i.png', ResourceLoader.getImage, this.imageResources).toTile();
|
||||||
|
return [normal, hover, pressed, disabled];
|
||||||
|
}
|
||||||
|
|
||||||
var touch = Util.isTouchDevice();
|
var touch = Util.isTouchDevice();
|
||||||
|
|
||||||
var window = new GuiImage(ResourceLoader.getResource("data/ui/options/window.png", ResourceLoader.getImage, this.imageResources).toTile());
|
var window = new GuiImage(ResourceLoader.getResource("data/ui/options/window.png", ResourceLoader.getImage, this.imageResources).toTile());
|
||||||
|
|
@ -60,7 +68,7 @@ class OptionsDlg extends GuiImage {
|
||||||
generalBtn.extent = new Vector(134, 65);
|
generalBtn.extent = new Vector(134, 65);
|
||||||
window.addChild(generalBtn);
|
window.addChild(generalBtn);
|
||||||
|
|
||||||
var hotkeysBtn = new GuiButton(loadButtonImages('data/ui/options/hotkeys'));
|
var hotkeysBtn = new GuiButton(loadButtonImages2('data/ui/options/hotkeys'));
|
||||||
hotkeysBtn.position = new Vector(325, 19);
|
hotkeysBtn.position = new Vector(325, 19);
|
||||||
hotkeysBtn.extent = new Vector(134, 65);
|
hotkeysBtn.extent = new Vector(134, 65);
|
||||||
if (touch) {
|
if (touch) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue