diff --git a/source/KadeEngineData.hx b/source/KadeEngineData.hx index 89039ff..eb0b876 100644 --- a/source/KadeEngineData.hx +++ b/source/KadeEngineData.hx @@ -109,6 +109,9 @@ class KadeEngineData if (FlxG.save.data.cacheImages == null) FlxG.save.data.cacheImages = false; + if (FlxG.save.data.editor == null) + FlxG.save.data.editor = true; + var gamepad:FlxGamepad = FlxG.gamepads.lastActive; KeyBinds.gamepad = gamepad != null; diff --git a/source/Options.hx b/source/Options.hx index 37403ff..49cf015 100644 --- a/source/Options.hx +++ b/source/Options.hx @@ -142,6 +142,29 @@ class GraphicLoading extends Option } +class EditorRes extends Option +{ + public function new(desc:String) + { + super(); + description = desc; + } + + public override function press():Bool + { + FlxG.save.data.editor = !FlxG.save.data.editor; + + display = updateDisplay(); + return true; + } + + private override function updateDisplay():String + { + return FlxG.save.data.editor ? "Show Editor Grid" : "Do not Show Editor Grid"; + } + +} + class DownscrollOption extends Option { public function new(desc:String) diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index 495219b..efaef4e 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -40,6 +40,7 @@ class OptionsMenu extends MusicBeatState new CustomizeGameplay("Drag and drop gameplay modules to your prefered positions!") ]), new OptionCategory("Appearance", [ + new EditorRes("Not showing the editor grid will greatly increase editor performance"), new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay."), new CamZoomOption("Toggle the camera zoom in-game."), new StepManiaOption("Sets the colors of the arrows depending on quantization instead of direction."), diff --git a/source/SectionRender.hx b/source/SectionRender.hx index 3410ccb..67cafa8 100644 --- a/source/SectionRender.hx +++ b/source/SectionRender.hx @@ -15,13 +15,14 @@ class SectionRender extends FlxSprite { super(x,y); - makeGraphic(GRID_SIZE * 8, GRID_SIZE * Height,FlxColor.BLACK); + makeGraphic(GRID_SIZE * 8, GRID_SIZE * Height,0xffe7e6e6); var h = GRID_SIZE; if (Math.floor(h) != h) h = GRID_SIZE; - FlxGridOverlay.overlay(this,GRID_SIZE, Std.int(h), GRID_SIZE * 8,GRID_SIZE * Height); + if (FlxG.save.data.editor) + FlxGridOverlay.overlay(this,GRID_SIZE, Std.int(h), GRID_SIZE * 8,GRID_SIZE * Height); }