mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-23 16:17:53 -05:00
autopause bullshit
This commit is contained in:
parent
08074f56a5
commit
6205470907
1 changed files with 14 additions and 5 deletions
|
@ -35,6 +35,7 @@ class PreferencesMenu extends ui.OptionsState.Page
|
|||
createPrefItem('flashing menu', 'flashing-menu', true);
|
||||
createPrefItem('Camera Zooming on Beat', 'camera-zoom', true);
|
||||
createPrefItem('FPS Counter', 'fps-counter', true);
|
||||
createPrefItem('Auto Pause', 'auto-pause', false);
|
||||
|
||||
camFollow = new FlxObject(FlxG.width / 2, 0, 140, 70);
|
||||
if (items != null)
|
||||
|
@ -63,9 +64,12 @@ class PreferencesMenu extends ui.OptionsState.Page
|
|||
preferenceCheck('flashing-menu', true);
|
||||
preferenceCheck('camera-zoom', true);
|
||||
preferenceCheck('fps-counter', true);
|
||||
preferenceCheck('auto-pause', false);
|
||||
|
||||
if (!getPref('fps-counter'))
|
||||
FlxG.stage.removeChild(Main.fpsCounter);
|
||||
|
||||
FlxG.autoPause = getPref('auto-pause');
|
||||
}
|
||||
|
||||
private function createPrefItem(prefName:String, prefString:String, prefValue:Dynamic):Void
|
||||
|
@ -114,13 +118,18 @@ class PreferencesMenu extends ui.OptionsState.Page
|
|||
checkboxes[items.selectedIndex].daValue = daSwap;
|
||||
trace('toggled? ' + preferences.get(prefName));
|
||||
|
||||
if (prefName == 'fps-counter')
|
||||
switch (prefName)
|
||||
{
|
||||
if (getPref('fps-counter'))
|
||||
FlxG.stage.addChild(Main.fpsCounter);
|
||||
else
|
||||
FlxG.stage.removeChild(Main.fpsCounter);
|
||||
case 'fps-counter':
|
||||
if (getPref('fps-counter'))
|
||||
FlxG.stage.addChild(Main.fpsCounter);
|
||||
else
|
||||
FlxG.stage.removeChild(Main.fpsCounter);
|
||||
case 'auto-pause':
|
||||
FlxG.autoPause = getPref('auto-pause');
|
||||
}
|
||||
|
||||
if (prefName == 'fps-counter') {}
|
||||
}
|
||||
|
||||
override function update(elapsed:Float)
|
||||
|
|
Loading…
Reference in a new issue