11package flixel .addons .ui ;
22
33#if FLX_MOUSE
4- import openfl .events .MouseEvent ;
5- import openfl .geom .Rectangle ;
6- import openfl .Lib ;
7- import flixel .addons .display .FlxExtendedMouseSprite ;
84import flixel .FlxCamera ;
95import flixel .FlxG ;
106import flixel .FlxSprite ;
7+ import flixel .addons .display .FlxExtendedMouseSprite ;
118import flixel .graphics .FlxGraphic ;
129import flixel .group .* ;
10+ import flixel .math .FlxMath ;
1311import flixel .text .FlxText ;
1412import flixel .util .FlxColor ;
1513import flixel .util .FlxDestroyUtil ;
1614import flixel .util .FlxGradient ;
17- import flixel .math .FlxMath ;
15+ import openfl .Lib ;
16+ import openfl .events .MouseEvent ;
17+ import openfl .geom .Rectangle ;
1818
1919// TODO: Port to use touch as well
2020
@@ -24,6 +24,7 @@ import flixel.math.FlxMath;
2424 * @link http://www.photonstorm.com
2525 * @author Richard Davey / Photon Storm
2626 */
27+ @:deprecated (" FlxButtonPlus is deprecated, use FLxButton, instead" )
2728class FlxButtonPlus extends #if (flixel < version("5.7.0")) FlxSpriteGroup #else FlxSpriteContainer #end
2829{
2930 public static inline var NORMAL : Int = 0 ;
@@ -69,7 +70,7 @@ class FlxButtonPlus extends #if (flixel < version("5.7.0")) FlxSpriteGroup #else
6970 /**
7071 * If this button has text, set this to change the value
7172 */
72- public var text (never , set ): String ;
73+ public var text (get , set ): String ;
7374
7475 /**
7576 * Shows the current state of the button.
@@ -371,6 +372,14 @@ class FlxButtonPlus extends #if (flixel < version("5.7.0")) FlxSpriteGroup #else
371372 #end
372373 }
373374
375+ function get_text (): String
376+ {
377+ if (textNormal != null )
378+ return textNormal .text ;
379+
380+ return null ;
381+ }
382+
374383 function set_text (NewText : String ): String
375384 {
376385 if ((textNormal != null ) && (textNormal .text != NewText ))
0 commit comments