allow changing buttonColors
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# @install: lix --silent download "gh://github.com/kiss-lang/kiss-flixel#ea64d8e90dfd86cc29979db01929c951649280db" into kiss-flixel/0.0.0/github/ea64d8e90dfd86cc29979db01929c951649280db
|
# @install: lix --silent download "gh://github.com/kiss-lang/kiss-flixel#5037ae90308f9de47c351175fe5468549b1981a3" into kiss-flixel/0.0.0/github/5037ae90308f9de47c351175fe5468549b1981a3
|
||||||
-lib flixel
|
-lib flixel
|
||||||
-lib flixel-addons
|
-lib flixel-addons
|
||||||
-lib flixel-ui
|
-lib flixel-ui
|
||||||
@@ -6,5 +6,5 @@
|
|||||||
-lib kiss-tools
|
-lib kiss-tools
|
||||||
-lib lime
|
-lib lime
|
||||||
-lib openfl
|
-lib openfl
|
||||||
-cp ${HAXE_LIBCACHE}/kiss-flixel/0.0.0/github/ea64d8e90dfd86cc29979db01929c951649280db/src/
|
-cp ${HAXE_LIBCACHE}/kiss-flixel/0.0.0/github/5037ae90308f9de47c351175fe5468549b1981a3/src/
|
||||||
-D kiss-flixel=0.0.0
|
-D kiss-flixel=0.0.0
|
@@ -255,6 +255,8 @@
|
|||||||
(never otherwise)))
|
(never otherwise)))
|
||||||
(sh.registerItem "{tab} resume" _resume true)
|
(sh.registerItem "{tab} resume" _resume true)
|
||||||
(sh.registerItem "{escape} resume" _resume true)
|
(sh.registerItem "{escape} resume" _resume true)
|
||||||
|
(pauseMenu.setUIControlColor buttonColor)
|
||||||
|
|
||||||
(pauseMenu.show)
|
(pauseMenu.show)
|
||||||
(pauseMenu.scrollToBottom)))
|
(pauseMenu.scrollToBottom)))
|
||||||
|
|
||||||
@@ -340,6 +342,15 @@
|
|||||||
(method :Void chooseString [:String prompt :Array<String> choices :String->Void submit]
|
(method :Void chooseString [:String prompt :Array<String> choices :String->Void submit]
|
||||||
(_chooseString prompt choices submit))
|
(_chooseString prompt choices submit))
|
||||||
|
|
||||||
|
(savedVar :Int _buttonColor (FlxColor.GRAY.getLightened 0.4))
|
||||||
|
(var :FlxColor buttonColor (property get null))
|
||||||
|
(function get_buttonColor []
|
||||||
|
(FlxColor.fromInt _buttonColor))
|
||||||
|
(savedVar :Int _disabledButtonColor FlxColor.GRAY)
|
||||||
|
(var :FlxColor disabledButtonColor (property get null))
|
||||||
|
(function get_disabledButtonColor []
|
||||||
|
(FlxColor.fromInt _disabledButtonColor))
|
||||||
|
|
||||||
(method :Void _chooseString [:String prompt :Array<String> choices :String->Void submit &opt :Bool xButton :String xKey]
|
(method :Void _chooseString [:String prompt :Array<String> choices :String->Void submit &opt :Bool xButton :String xKey]
|
||||||
(set pauseMenu
|
(set pauseMenu
|
||||||
(kiss_flixel.SimpleWindow.promptForChoice
|
(kiss_flixel.SimpleWindow.promptForChoice
|
||||||
@@ -348,6 +359,7 @@
|
|||||||
submit
|
submit
|
||||||
FlxColor.BLACK
|
FlxColor.BLACK
|
||||||
FlxColor.WHITE
|
FlxColor.WHITE
|
||||||
|
buttonColor
|
||||||
0.8
|
0.8
|
||||||
0.8
|
0.8
|
||||||
?xButton
|
?xButton
|
||||||
@@ -360,6 +372,7 @@
|
|||||||
null
|
null
|
||||||
false
|
false
|
||||||
true))
|
true))
|
||||||
|
(pauseMenu.setUIControlColor buttonColor)
|
||||||
(pauseMenu.enableGamepadInput true [=>START ""]))
|
(pauseMenu.enableGamepadInput true [=>START ""]))
|
||||||
|
|
||||||
(method :Void enterString [:String prompt :String->Void submit]
|
(method :Void enterString [:String prompt :String->Void submit]
|
||||||
|
Reference in New Issue
Block a user