Skip to content

Commit

Permalink
Revert "a lil bit of header softcoding in ControlsMenu"
Browse files Browse the repository at this point in the history
This reverts commit 048cc60.
  • Loading branch information
charlesisfeline committed Dec 1, 2024
1 parent 94a65eb commit a63bc37
Showing 1 changed file with 43 additions and 3 deletions.
46 changes: 43 additions & 3 deletions source/funkin/ui/options/ControlsMenu.hx
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,50 @@ class ControlsMenu extends funkin.ui.options.OptionsState.Page
{
var control = controlList[i];
var name = control.getName();
if (currentHeader != "UI_" && name.indexOf("UI_") == 0)
{
currentHeader = "UI_";
headers.add(new AtlasText(0, y, "UI", AtlasFont.BOLD)).screenCenter(X);
y += spacer;
}
else if (currentHeader != "NOTE_" && name.indexOf("NOTE_") == 0)
{
currentHeader = "NOTE_";
headers.add(new AtlasText(0, y, "NOTES", AtlasFont.BOLD)).screenCenter(X);
y += spacer;
}
else if (currentHeader != "CUTSCENE_" && name.indexOf("CUTSCENE_") == 0)
{
currentHeader = "CUTSCENE_";
headers.add(new AtlasText(0, y, "CUTSCENE", AtlasFont.BOLD)).screenCenter(X);
y += spacer;
}
else if (currentHeader != "FREEPLAY_" && name.indexOf("FREEPLAY_") == 0)
{
currentHeader = "FREEPLAY_";
headers.add(new AtlasText(0, y, "FREEPLAY", AtlasFont.BOLD)).screenCenter(X);
y += spacer;
}
else if (currentHeader != "WINDOW_" && name.indexOf("WINDOW_") == 0)
{
currentHeader = "WINDOW_";
headers.add(new AtlasText(0, y, "WINDOW", AtlasFont.BOLD)).screenCenter(X);
y += spacer;
}
else if (currentHeader != "VOLUME_" && name.indexOf("VOLUME_") == 0)
{
currentHeader = "VOLUME_";
headers.add(new AtlasText(0, y, "VOLUME", AtlasFont.BOLD)).screenCenter(X);
y += spacer;
}
else if (currentHeader != "DEBUG_" && name.indexOf("DEBUG_") == 0)
{
currentHeader = "DEBUG_";
headers.add(new AtlasText(0, y, "DEBUG", AtlasFont.BOLD)).screenCenter(X);
y += spacer;
}

var headerName = name.split("_")[0];
if (currentHeader != headerName && name.indexOf("_") != -1) if (currentHeader != null && name.indexOf(currentHeader) == 0)
name = name.substr(currentHeader.length);
if (currentHeader != null && name.indexOf(currentHeader) == 0) name = name.substr(currentHeader.length);

var formatName = name.replace('_', ' ');
var label = labels.add(new AtlasText(100, y, formatName, AtlasFont.BOLD));
Expand Down

0 comments on commit a63bc37

Please sign in to comment.