lil optimization for bad computers
This commit is contained in:
parent
ecb8c9c153
commit
5edc81fd20
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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."),
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user