pretty print option

This commit is contained in:
lunarcleint
2024-03-23 02:49:39 -07:00
parent b7b61093b6
commit 168dacf68e
4 changed files with 10 additions and 6 deletions
+5 -1
View File
@@ -36,9 +36,13 @@ class DebugOptionsScreen extends OptionsScreen {
}));
#end
add(new Checkbox(
"Enable Editor SFXs",
"Editor SFXs",
"If checked, will play sound effects when working on editors (ex: will play sfxs when checking checkboxes...)",
"editorSFX"));
add(new Checkbox(
"Pretty Print",
"If checked, the saved files from the editor will be formatted to be easily viewable (does not apply to xmls...)",
"editorPrettyPrint"));
add(new Checkbox(
"Intensive Blur",
"If checked, will use more intensive blur that may be laggier but look better.",
+3 -3
View File
@@ -700,9 +700,9 @@ class Charter extends UIState {
var songPath:String = '${Paths.getAssetsRoot()}/songs/${__song.toLowerCase()}';
if (Options.charterAutoSavesSeperateFolder)
Chart.save(songPath, PlayState.SONG, __autoSaveLocation, {saveMetaInChart: false, folder: "autosaves"});
Chart.save(songPath, PlayState.SONG, __autoSaveLocation, {saveMetaInChart: false, folder: "autosaves", prettyPrint: Options.editorPrettyPrint});
else
Chart.save(songPath, PlayState.SONG, __diff.toLowerCase(), {saveMetaInChart: false});
Chart.save(songPath, PlayState.SONG, __diff.toLowerCase(), {saveMetaInChart: false, prettyPrint: Options.editorPrettyPrint});
undos.save();
}
autoSaveNotif.cancelled = false;
@@ -1345,7 +1345,7 @@ class Charter extends UIState {
#if sys
function saveTo(path:String, separateEvents:Bool = false) {
buildChart();
Chart.save(path, PlayState.SONG, __diff.toLowerCase(), {saveMetaInChart: false, saveEventsInChart: !separateEvents});
Chart.save(path, PlayState.SONG, __diff.toLowerCase(), {saveMetaInChart: false, saveEventsInChart: !separateEvents, prettyPrint: Options.editorPrettyPrint});
}
#end
+1 -1
View File
@@ -759,7 +759,7 @@ class PlayState extends MusicBeatState
SaveWarning.warningFunc = saveWarn;
SaveWarning.saveFunc = () -> {
@:privateAccess Chart.save('${Paths.getAssetsRoot()}/songs/${Charter.__song.toLowerCase()}',
PlayState.SONG, Charter.__diff.toLowerCase(), {saveMetaInChart: false, saveEventsInChart: true});
PlayState.SONG, Charter.__diff.toLowerCase(), {saveMetaInChart: false, saveEventsInChart: true, prettyPrint: Options.editorPrettyPrint});
}
}
}
+1 -1
View File
@@ -43,7 +43,7 @@ class Options
*/
public static var intensiveBlur:Bool = true;
public static var editorSFX:Bool = true;
public static var resizableEditors:Bool = true;
public static var editorPrettyPrint:Bool = false;
public static var maxUndos:Int = 120;
/**