lol mute debug thing!

This commit is contained in:
Cameron Taylor 2021-04-06 12:27:07 -04:00
parent c72a238782
commit c99297cc14
2 changed files with 14 additions and 2 deletions

View file

@ -20,8 +20,6 @@ import lime.app.Application;
import lime.ui.Window; import lime.ui.Window;
import openfl.Assets; import openfl.Assets;
import shaderslmfao.ColorSwap; import shaderslmfao.ColorSwap;
import sys.FileSystem;
import sys.io.File;
import ui.PreferencesMenu; import ui.PreferencesMenu;
using StringTools; using StringTools;
@ -30,6 +28,8 @@ using StringTools;
import Discord.DiscordClient; import Discord.DiscordClient;
#end #end
#if desktop #if desktop
import sys.FileSystem;
import sys.io.File;
import sys.thread.Thread; import sys.thread.Thread;
#end #end

View file

@ -57,6 +57,12 @@ class PreferencesMenu extends ui.OptionsState.Page
return preferences.get(pref); return preferences.get(pref);
} }
// easy shorthand?
public static function setPref(pref:String, value:Dynamic):Void
{
preferences.set(pref, value);
}
public static function initPrefs():Void public static function initPrefs():Void
{ {
preferenceCheck('censor-naughty', false); preferenceCheck('censor-naughty', false);
@ -65,6 +71,12 @@ class PreferencesMenu extends ui.OptionsState.Page
preferenceCheck('camera-zoom', true); preferenceCheck('camera-zoom', true);
preferenceCheck('fps-counter', true); preferenceCheck('fps-counter', true);
preferenceCheck('auto-pause', false); preferenceCheck('auto-pause', false);
preferenceCheck('master-volume', 1);
#if muted
setPref('master-volume', 0);
FlxG.sound.muted = true;
#end
if (!getPref('fps-counter')) if (!getPref('fps-counter'))
FlxG.stage.removeChild(Main.fpsCounter); FlxG.stage.removeChild(Main.fpsCounter);