mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-04-27 21:21:41 +00:00
Control remap fixes
This commit is contained in:
parent
4065f089ad
commit
855fe096c9
2 changed files with 5 additions and 2 deletions
|
|
@ -414,6 +414,9 @@ Extensions: EAX 2.0, EAX 3.0, EAX Unified, and EAX-AC3";
|
||||||
remapDlg.remapCallback = (key) -> {
|
remapDlg.remapCallback = (key) -> {
|
||||||
MarbleGame.canvas.popDialog(remapDlg);
|
MarbleGame.canvas.popDialog(remapDlg);
|
||||||
|
|
||||||
|
if (key == Key.ESCAPE)
|
||||||
|
return;
|
||||||
|
|
||||||
var conflicting = getConflictingBinding(bindingName, key);
|
var conflicting = getConflictingBinding(bindingName, key);
|
||||||
if (conflicting == null) {
|
if (conflicting == null) {
|
||||||
ctrl.txtCtrl.text.text = Util.getKeyForButton2(key);
|
ctrl.txtCtrl.text.text = Util.getKeyForButton2(key);
|
||||||
|
|
|
||||||
|
|
@ -43,9 +43,9 @@ class RemapDlg extends GuiControl {
|
||||||
public override function update(dt:Float, mouseState:MouseState) {
|
public override function update(dt:Float, mouseState:MouseState) {
|
||||||
super.update(dt, mouseState);
|
super.update(dt, mouseState);
|
||||||
for (i in 0...1024) {
|
for (i in 0...1024) {
|
||||||
if (i == 5)
|
if (i == Key.MOUSE_WHEEL_DOWN || i == Key.MOUSE_WHEEL_UP)
|
||||||
continue;
|
continue;
|
||||||
if (Key.isDown(i)) {
|
if (Key.isPressed(i)) {
|
||||||
remapCallback(i);
|
remapCallback(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue