mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-01-14 19:22:11 +00:00
25 lines
622 B
Haxe
25 lines
622 B
Haxe
package touch;
|
|
|
|
import src.MarbleGame;
|
|
import touch.TouchInput.Touch;
|
|
import h3d.Vector;
|
|
import hxd.Window;
|
|
import src.ResourceLoader;
|
|
import src.Settings;
|
|
|
|
class SpectatorChangeTargetButton extends TouchButton {
|
|
public var didPressIt:Bool = true;
|
|
|
|
public function new(rightFacing:Bool) {
|
|
super(ResourceLoader.getImage(rightFacing ? "data/ui/touch/right.png" : "data/ui/touch/left.png").resource, new Vector(rightFacing ? 560 : 70, 120),
|
|
60);
|
|
if (!rightFacing) {
|
|
this.guiElement.horizSizing = Right;
|
|
}
|
|
this.setEnabled(false);
|
|
this.onClick = () -> {
|
|
this.pressed = true;
|
|
didPressIt = true;
|
|
}
|
|
}
|
|
}
|