1
1
package kec .states ;
2
+
2
3
#if FEATURE_MODCORE
3
4
import haxe .ui .components .Button ;
4
5
import kec .backend .modding .ModCore ;
@@ -23,9 +24,9 @@ class ModMenuState extends MusicBeatState
23
24
public static var existMods : Array <String > = []; // mods polymod detected in the folder
24
25
25
26
private var button : Button ; // remove 1 mod
26
- private var saveMods : Button ; // save to file
27
- private var bg : FlxSprite ;
28
- private var icons : FlxSpriteGroup ; // modmenuicons
27
+ private var saveMods : Button ; // save to file
28
+ private var bg : FlxSprite ;
29
+ private var icons : FlxSpriteGroup ; // modmenuicons
29
30
30
31
override function create ()
31
32
{
@@ -50,22 +51,22 @@ class ModMenuState extends MusicBeatState
50
51
function createHUI ()
51
52
{
52
53
button = new Button ();
53
- button .x + = 400 ;
54
+ button .x + = 400 ;
54
55
button .text = " Mods" ;
55
56
button .onClick = function (e )
56
57
{
57
58
eList .pop ();
58
- Debug .logTrace (eList .length );
59
+ Debug .logTrace (eList .length );
59
60
}
60
61
saveMods = new Button ();
61
62
saveMods .x + = 500 ;
62
63
saveMods .text = " Save Mods" ;
63
64
saveMods .onClick = function (e )
64
- {
65
- var fileStr = ' ' ;
65
+ {
66
+ var fileStr = ' ' ;
66
67
for (mod in eList )
67
68
{
68
- mod .trim ();
69
+ mod .trim ();
69
70
if (fileStr .length > 0 )
70
71
fileStr + = ' \n ' ;
71
72
@@ -77,31 +78,31 @@ class ModMenuState extends MusicBeatState
77
78
File .saveContent (' assets/shared/data/modList.txt' , fileStr );
78
79
#end
79
80
Debug .logTrace (eList .length );
80
- }
81
+ }
81
82
add (button );
82
- add (saveMods );
83
+ add (saveMods );
83
84
}
84
85
85
- function createMUI ()
86
- {
87
- icons = new FlxSpriteGroup ();
86
+ function createMUI ()
87
+ {
88
+ icons = new FlxSpriteGroup ();
88
89
bg = new FlxSprite ().loadGraphic (Paths .image (' menuBGBlue' ));
89
90
bg .setGraphicSize (Std .int (bg .width * 1.175 ));
90
91
bg .updateHitbox ();
91
92
bg .screenCenter ();
92
- add (bg );
93
+ add (bg );
93
94
94
95
for (i in 0 ... existMods .length )
95
- {
96
+ {
96
97
var modIcon : FlxSprite = new FlxSprite ().loadGraphic (Paths .image (' missingMod' ));
97
- modIcon .setGraphicSize (Std .int (modIcon .width * 0.25 ));
98
+ modIcon .setGraphicSize (Std .int (modIcon .width * 0.25 ));
98
99
modIcon .updateHitbox ();
99
- modIcon .setPosition (50 , 25 );
100
- modIcon .y + = 200 * i ;
100
+ modIcon .setPosition (50 , 25 );
101
+ modIcon .y + = 200 * i ;
101
102
icons .add (modIcon );
102
- }
103
- add (icons );
104
- }
103
+ }
104
+ add (icons );
105
+ }
105
106
106
107
public static function parseList ()
107
108
{
@@ -127,4 +128,4 @@ class ModMenuState extends MusicBeatState
127
128
return list ;
128
129
}
129
130
}
130
- #end
131
+ #end
0 commit comments