promptForColor allowAlpha option

This commit is contained in:
2024-07-13 13:54:15 -06:00
parent e9338ea9b7
commit 654cb4945e

View File

@@ -809,6 +809,7 @@
:FlxColor->Void onChoice
&opt :Array<FlxColor> choices
:FlxColor currentColor
:Bool allowAlpha
:FlxColor bgColor
:FlxColor titleColor
:Float percentWidth
@@ -850,6 +851,9 @@
(window.makeTextV2 "Green--" (object onClick ->:Void s (recursiveCall {(-= currentColor.greenFloat COLOR_STEP) currentColor})))
(window.makeTextV2 "Blue++" (object onClick ->:Void s (recursiveCall {(+= currentColor.blueFloat COLOR_STEP) currentColor})))
(window.makeTextV2 "Blue--" (object onClick ->:Void s (recursiveCall {(-= currentColor.blueFloat COLOR_STEP) currentColor})))
(when allowAlpha
(window.makeTextV2 "Alpha++" (object onClick ->:Void s (recursiveCall {(+= currentColor.alphaFloat COLOR_STEP) currentColor})))
(window.makeTextV2 "Alpha--" (object onClick ->:Void s (recursiveCall {(-= currentColor.alphaFloat COLOR_STEP) currentColor}))))
(doFor choice choices
(window.makeTextV2
" "