File tree 3 files changed +11
-1
lines changed
DelvEdit/src/com/interrupt/dungeoneer/editor
3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,6 @@ public static void init() {
20
20
}
21
21
22
22
public static void dispose () {
23
- EditorOptions . toLocalFiles ( options );
23
+ Editor . options . dispose ( );
24
24
}
25
25
}
Original file line number Diff line number Diff line change 5
5
import com .badlogic .gdx .utils .Array ;
6
6
import com .badlogic .gdx .utils .Json ;
7
7
8
+ /** Editor options container class. */
8
9
public class EditorOptions {
9
10
public Array <String > recentlyOpenedFiles ;
10
11
@@ -30,4 +31,12 @@ public static void toLocalFiles(EditorOptions instance) {
30
31
FileHandle file = Gdx .files .local (path );
31
32
file .writeString (json .toJson (instance ), false );
32
33
}
34
+
35
+ public void save () {
36
+ EditorOptions .toLocalFiles (this );
37
+ }
38
+
39
+ public void dispose () {
40
+ Editor .options .save ();
41
+ }
33
42
}
Original file line number Diff line number Diff line change @@ -270,6 +270,7 @@ public void actionPerformed(ActionEvent e) {
270
270
@ Override
271
271
public void actionPerformed (ActionEvent e ) {
272
272
Editor .options .recentlyOpenedFiles .clear ();
273
+ Editor .options .save ();
273
274
}
274
275
}));
275
276
}
You can’t perform that action at this time.
0 commit comments