File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
fxgl/src/main/kotlin/com/almasb/fxgl/dsl Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -507,6 +507,14 @@ class FXGL private constructor() { companion object {
507
507
}, key)
508
508
}
509
509
510
+ @JvmStatic fun onBtnDownPrimary (action : Runnable ) {
511
+ onBtnDown(MouseButton .PRIMARY , action)
512
+ }
513
+
514
+ @JvmStatic fun onBtnDownSecondary (action : Runnable ) {
515
+ onBtnDown(MouseButton .SECONDARY , action)
516
+ }
517
+
510
518
@JvmStatic fun onBtnDown (btn : MouseButton , action : Runnable ) {
511
519
onBtnDown(btn, " action${actionCounter++ } " , action)
512
520
}
@@ -519,6 +527,14 @@ class FXGL private constructor() { companion object {
519
527
}, btn)
520
528
}
521
529
530
+ @JvmStatic fun onBtnPrimary (action : Runnable ) {
531
+ onBtn(MouseButton .PRIMARY , action)
532
+ }
533
+
534
+ @JvmStatic fun onBtnSecondary (action : Runnable ) {
535
+ onBtn(MouseButton .SECONDARY , action)
536
+ }
537
+
522
538
@JvmStatic fun onBtn (btn : MouseButton , action : Runnable ) {
523
539
onBtn(btn, " action${actionCounter++ } " , action)
524
540
}
You can’t perform that action at this time.
0 commit comments