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