@@ -4,22 +4,22 @@ import openfl.Lib;
44
55class WindowUtils {
66 public static var winTitle (default , set ): String ;
7- public static function set_winTitle (newWinTitle : String ): String {
8- winTitle = newWinTitle ;
7+ private static function set_winTitle (value : String ): String {
8+ winTitle = value ;
99 updateTitle ();
10- return newWinTitle ;
10+ return value ;
1111 }
1212 public static var prefix (default , set ): String = " " ;
13- public static function set_prefix (newPrefix : String ): String {
14- prefix = newPrefix ;
13+ private static function set_prefix (value : String ): String {
14+ prefix = value ;
1515 updateTitle ();
16- return newPrefix ;
16+ return value ;
1717 }
18- public static var endfix (default , set ): String = " " ;
19- public static function set_endfix ( endPrefix : String ): String {
20- endfix = endPrefix ;
18+ public static var suffix (default , set ): String = " " ;
19+ private static function set_suffix ( value : String ): String {
20+ suffix = value ;
2121 updateTitle ();
22- return endPrefix ;
22+ return value ;
2323 }
2424
2525 public static var preventClosing : Bool = true ;
@@ -43,10 +43,23 @@ class WindowUtils {
4343
4444 public static inline function resetTitle () {
4545 winTitle = Lib .application .meta [" name" ];
46- prefix = endfix = " " ;
46+ resetAffixes ();
47+ }
48+
49+ public static inline function resetAffixes () {
50+ prefix = suffix = " " ;
4751 updateTitle ();
4852 }
4953
5054 public static inline function updateTitle ()
51- Lib .application .window .title = ' $prefix $winTitle $endfix ' ;
55+ Lib .application .window .title = ' $prefix $winTitle $suffix ' ;
56+
57+ // backwards compat
58+ @:noCompletion public static var endfix (get , set ): String ;
59+ @:noCompletion private static function set_endfix (value : String ): String {
60+ return suffix = value ;
61+ }
62+ @:noCompletion private static function get_endfix (): String {
63+ return suffix ;
64+ }
5265}
0 commit comments