dev mode implementation

This commit is contained in:
⍚~Nex
2025-07-07 01:53:02 +02:00
parent 86157be887
commit e6766cdcd7
10 changed files with 85 additions and 33 deletions
@@ -4,10 +4,20 @@ import flixel.util.FlxColor;
using StringTools;
typedef KeybindsCategory = {
var name:String;
var settings:Array<KeybindsSettings>;
var ?devModeOnly:Bool;
}
typedef KeybindsSettings = {
var name:String;
var control:String;
}
class KeybindsOptions extends MusicBeatSubstate {
public static var instance:KeybindsOptions;
public var categories = [
public var categories:Array<KeybindsCategory> = [
{
name: 'Notes',
settings: [
@@ -93,12 +103,23 @@ class KeybindsOptions extends MusicBeatSubstate {
]
},
{
name: 'DEBUG',
name: 'Developer',
devModeOnly: true,
settings: [
{
name: 'Reload',
control: 'DEBUG_RELOAD'
name: 'Developer Menus',
control: 'DEV_ACCESS'
},
#if GLOBAL_SCRIPT // since theyre integrated into global script - Nex
{
name: 'Open Console',
control: 'DEV_CONSOLE'
},
{
name: 'Reload State',
control: 'DEV_RELOAD'
},
#end
]
}
];
@@ -154,7 +175,9 @@ class KeybindsOptions extends MusicBeatSubstate {
}
var k:Int = 0;
for(category in categories) {
for (category in categories) {
if (category.devModeOnly && !Options.devMode) continue;
k++;
var title = new Alphabet(0, k * 75, category.name, true);
title.screenCenter(X);