Skip to content

Commit

Permalink
use FlxButton (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli authored Mar 18, 2024
1 parent 58a8e56 commit a1c877d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Arcade/MinimalistTD/source/Button.hx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
package;

import flixel.util.FlxColor;
import flixel.ui.FlxButton;
import flixel.util.FlxColor;
#if (flixel < version("5.7.0"))
import flixel.ui.FlxButton.HIGHLIGHT;

typedef FlxButtonState = Int;
#end

class Button extends FlxButton
{
Expand Down Expand Up @@ -32,11 +37,11 @@ class Button extends FlxButton
/**
* Override set_status to change how highlight / normal state looks.
*/
override function set_status(Value:Int):Int
override function set_status(Value:FlxButtonState):Int
{
if (label != null)
{
if (Value == FlxButton.HIGHLIGHT)
if (Value == HIGHLIGHT)
{
#if !mobile // "highlight" doesn't make sense on mobile
label.color = FlxColor.WHITE;
Expand Down

0 comments on commit a1c877d

Please sign in to comment.