new settings sucks ass
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"clientID": "1027994136193810442",
|
||||
"logoKey": "logo"
|
||||
"logoKey": "icon"
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
2414
|
||||
2460
|
||||
@@ -1291,6 +1291,9 @@ class PlayState extends MusicBeatState
|
||||
|
||||
|
||||
if (__pressed.contains(true)) {
|
||||
for(c in p.characters)
|
||||
c.__lockAnimThisFrame = true;
|
||||
|
||||
__funcsToExec.push(function(note:Note) {
|
||||
if (__pressed[note.strumID] && note.isSustainNote && note.canBeHit && !note.wasGoodHit) {
|
||||
goodNoteHit(p, note);
|
||||
@@ -1300,9 +1303,6 @@ class PlayState extends MusicBeatState
|
||||
|
||||
var notePerStrum = [for(_ in 0...4) null];
|
||||
if (__justPressed.contains(true)) {
|
||||
for(c in p.characters)
|
||||
c.__lockAnimThisFrame = true;
|
||||
|
||||
__funcsToExec.push(function(note:Note) {
|
||||
if (__justPressed[note.strumID] && !note.isSustainNote && !note.wasGoodHit && note.canBeHit) {
|
||||
if (notePerStrum[note.strumID] == null) notePerStrum[note.strumID] = note;
|
||||
|
||||
@@ -3,7 +3,7 @@ package funkin.menus;
|
||||
import haxe.Json;
|
||||
import funkin.ui.FunkinText;
|
||||
import funkin.options.Options;
|
||||
import funkin.menus.credits.CreditsMain;
|
||||
// import funkin.menus.credits.CreditsMain;
|
||||
import flixel.FlxState;
|
||||
import flixel.addons.transition.FlxTransitionableState;
|
||||
import flixel.effects.FlxFlicker;
|
||||
@@ -179,11 +179,13 @@ class MainMenuState extends MusicBeatState
|
||||
trace("Freeplay Menu Selected");
|
||||
|
||||
case 'donate':
|
||||
/*
|
||||
FlxG.switchState(new CreditsMain());
|
||||
trace("Credits Menu Selected");
|
||||
*/
|
||||
|
||||
case 'options':
|
||||
FlxG.switchState(new OptionsMenu(false));
|
||||
FlxG.switchState(new OptionsMenu());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ class PauseSubState extends MusicBeatSubstate
|
||||
persistentDraw = false;
|
||||
openSubState(new KeybindsOptions());
|
||||
case "Options":
|
||||
FlxG.switchState(new OptionsMenu(true));
|
||||
FlxG.switchState(new OptionsMenu());
|
||||
case "Exit to menu":
|
||||
FlxG.switchState(PlayState.isStoryMode ? new StoryMenuState() : new FreeplayState());
|
||||
CoolUtil.playMenuSong();
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
package funkin.options;
|
||||
|
||||
import flixel.FlxState;
|
||||
import flixel.text.FlxText;
|
||||
|
||||
class LatencyState extends FlxState
|
||||
{
|
||||
var offsetText:FlxText;
|
||||
var noteGrp:FlxTypedGroup<Note>;
|
||||
var strumLine:FlxSprite;
|
||||
|
||||
override function create()
|
||||
{
|
||||
FlxG.sound.playMusic(Paths.sound('soundTest'));
|
||||
|
||||
noteGrp = new FlxTypedGroup<Note>();
|
||||
add(noteGrp);
|
||||
|
||||
for (i in 0...32)
|
||||
{
|
||||
var note:Note = new Note(Conductor.crochet * i, 1);
|
||||
noteGrp.add(note);
|
||||
}
|
||||
|
||||
offsetText = new FlxText();
|
||||
offsetText.screenCenter();
|
||||
add(offsetText);
|
||||
|
||||
strumLine = new FlxSprite(FlxG.width / 2, 100).makeGraphic(FlxG.width, 5);
|
||||
add(strumLine);
|
||||
|
||||
Conductor.changeBPM(120);
|
||||
|
||||
super.create();
|
||||
}
|
||||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
offsetText.text = "Offset: " + Conductor.offset + "ms";
|
||||
|
||||
Conductor.songPosition = FlxG.sound.music.time - Conductor.offset;
|
||||
|
||||
var multiply:Float = 1;
|
||||
|
||||
if (FlxG.keys.pressed.SHIFT)
|
||||
multiply = 10;
|
||||
|
||||
if (FlxG.keys.justPressed.RIGHT)
|
||||
Conductor.offset += 1 * multiply;
|
||||
if (FlxG.keys.justPressed.LEFT)
|
||||
Conductor.offset -= 1 * multiply;
|
||||
|
||||
if (FlxG.keys.justPressed.SPACE)
|
||||
{
|
||||
FlxG.sound.music.stop();
|
||||
|
||||
FlxG.resetState();
|
||||
}
|
||||
|
||||
noteGrp.forEach(function(daNote:Note)
|
||||
{
|
||||
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * 0.45);
|
||||
daNote.x = strumLine.x + 30;
|
||||
|
||||
if (daNote.y < strumLine.y)
|
||||
daNote.kill();
|
||||
});
|
||||
|
||||
super.update(elapsed);
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,20 @@
|
||||
package funkin.options;
|
||||
|
||||
import flixel.util.typeLimit.OneOfTwo;
|
||||
import flixel.FlxState;
|
||||
import flixel.addons.transition.FlxTransitionableState;
|
||||
import flixel.effects.FlxFlicker;
|
||||
import funkin.options.OptionsScreen;
|
||||
import funkin.menus.MainMenuState;
|
||||
|
||||
import funkin.options.type.TextOption;
|
||||
import flixel.util.typeLimit.OneOfTwo;
|
||||
import funkin.options.type.OptionType;
|
||||
import funkin.options.categories.*;
|
||||
|
||||
typedef OptionCategory = {
|
||||
var name:String;
|
||||
var desc:String;
|
||||
var state:OneOfTwo<Class<FlxState>, FlxState>;
|
||||
}
|
||||
class OptionsMenu extends MusicBeatState {
|
||||
public static var fromPlayState:Bool = false;
|
||||
public var options:Array<OptionCategory> = [
|
||||
|
||||
public static var mainOptions:Array<OptionCategory> = [
|
||||
{
|
||||
name: 'Controls',
|
||||
desc: 'Change Controls for Player 1 and Player 2!',
|
||||
state: funkin.options.keybinds.KeybindsOptions
|
||||
state: null,
|
||||
substate: funkin.options.keybinds.KeybindsOptions
|
||||
},
|
||||
{
|
||||
name: 'Gameplay',
|
||||
@@ -42,67 +37,93 @@ class OptionsMenu extends MusicBeatState {
|
||||
state: DebugOptions
|
||||
}
|
||||
];
|
||||
|
||||
public var curSelected:Int = -1;
|
||||
public var canSelect:Bool = true;
|
||||
public var alphabets:FlxTypedGroup<Alphabet>;
|
||||
|
||||
public function new(?fromPlayState:Bool) {
|
||||
|
||||
public var options:Array<OptionTypeDef>;
|
||||
public var optionsTree:OptionsTree;
|
||||
public function new(?options:Array<OptionTypeDef>) {
|
||||
super();
|
||||
if (fromPlayState != null) OptionsMenu.fromPlayState = fromPlayState;
|
||||
}
|
||||
|
||||
public override function create() {
|
||||
var bg:FlxSprite = new FlxSprite(-80).loadAnimatedGraphic(Paths.image('menus/menuBGBlue'));
|
||||
bg.scrollFactor.set();
|
||||
super.create();
|
||||
|
||||
var optionSprites:Array<OptionType> = [];
|
||||
if (options == null) {
|
||||
optionSprites = [for(o in mainOptions) new TextOption(o.name, o.desc, function() {
|
||||
if (o.substate != null) {
|
||||
persistentUpdate = false;
|
||||
persistentDraw = true;
|
||||
if (o.substate is MusicBeatSubstate) {
|
||||
openSubState(o.substate);
|
||||
} else {
|
||||
openSubState(Type.createInstance(o.substate, []));
|
||||
}
|
||||
} else {
|
||||
if (o.state is OptionsScreen) {
|
||||
optionsTree.add(o.state);
|
||||
} else {
|
||||
optionsTree.add(Type.createInstance(o.state, []));
|
||||
}
|
||||
}
|
||||
})];
|
||||
} else {
|
||||
optionSprites = [for(o in options) Type.createInstance(o.type, o.args)];
|
||||
}
|
||||
|
||||
var bg:FlxSprite = new FlxSprite(-80).loadAnimatedGraphic(Paths.image('menus/menuBGBlue'));
|
||||
// bg.scrollFactor.set();
|
||||
bg.scale.set(1.15, 1.15);
|
||||
bg.updateHitbox();
|
||||
bg.screenCenter();
|
||||
bg.scrollFactor.set();
|
||||
bg.antialiasing = true;
|
||||
add(bg);
|
||||
|
||||
super.create();
|
||||
alphabets = new FlxTypedGroup<Alphabet>();
|
||||
for(k=>e in options) {
|
||||
var alphabet = new Alphabet(0, (k+1) * (100), e.name, true, false);
|
||||
alphabet.screenCenter(X);
|
||||
alphabets.add(alphabet);
|
||||
}
|
||||
add(alphabets);
|
||||
changeSelection(1);
|
||||
optionsTree = new OptionsTree();
|
||||
optionsTree.onMenuChange = onMenuChange;
|
||||
optionsTree.onMenuClose = onMenuClose;
|
||||
var mainOptionScreen:OptionsScreen = new OptionsScreen();
|
||||
for(o in optionSprites)
|
||||
mainOptionScreen.add(o);
|
||||
optionsTree.add(mainOptionScreen);
|
||||
add(optionsTree);
|
||||
|
||||
CoolUtil.playMenuSong();
|
||||
FlxG.camera.scroll.set(-FlxG.width, 0);
|
||||
}
|
||||
|
||||
public function onMenuChange() {
|
||||
if (optionsTree.members.length <= 0) {
|
||||
exit();
|
||||
} else {
|
||||
// TODO: update top info
|
||||
}
|
||||
}
|
||||
|
||||
public function exit() {
|
||||
Options.save();
|
||||
Options.applySettings();
|
||||
FlxG.switchState(new MainMenuState());
|
||||
}
|
||||
|
||||
public function onMenuClose(m:OptionsScreen) {
|
||||
CoolUtil.playMenuSFX(CANCEL);
|
||||
}
|
||||
|
||||
public override function update(elapsed:Float) {
|
||||
super.update(elapsed);
|
||||
if (!canSelect) return;
|
||||
changeSelection((controls.UP_P ? -1 : 0) + (controls.DOWN_P ? 1 : 0));
|
||||
if (controls.ACCEPT && alphabets.members[curSelected] != null) {
|
||||
CoolUtil.playMenuSFX(CONFIRM);
|
||||
canSelect = false;
|
||||
FlxFlicker.flicker(alphabets.members[curSelected], 1, Options.flashingMenu ? 0.06 : 0.15, false, false, function(flick:FlxFlicker)
|
||||
{
|
||||
FlxTransitionableState.skipNextTransOut = true;
|
||||
if (options[curSelected].state is FlxState)
|
||||
FlxG.switchState(options[curSelected].state);
|
||||
else
|
||||
FlxG.switchState(Type.createInstance(options[curSelected].state, []));
|
||||
});
|
||||
} else if (controls.BACK) {
|
||||
if (fromPlayState)
|
||||
FlxG.switchState(new PlayState());
|
||||
else
|
||||
FlxG.switchState(new MainMenuState());
|
||||
}
|
||||
}
|
||||
|
||||
public function changeSelection(change:Int) {
|
||||
if (change == 0) return;
|
||||
CoolUtil.playMenuSFX(SCROLL, 0.7);
|
||||
curSelected = FlxMath.wrap(curSelected + change, 0, options.length-1);
|
||||
alphabets.forEach(function(e) {
|
||||
e.alpha = 0.6;
|
||||
});
|
||||
if (alphabets.members[curSelected] != null) alphabets.members[curSelected].alpha = 1;
|
||||
FlxG.camera.scroll.x = lerp(FlxG.camera.scroll.x, FlxG.width * Math.max(0, (optionsTree.members.length-1)), 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
typedef OptionCategory = {
|
||||
var name:String;
|
||||
var desc:String;
|
||||
var state:OneOfTwo<OptionsScreen, Class<OptionsScreen>>;
|
||||
var ?substate:OneOfTwo<MusicBeatSubstate, Class<MusicBeatSubstate>>;
|
||||
}
|
||||
|
||||
typedef OptionTypeDef = {
|
||||
var type:Class<OptionType>;
|
||||
var args:Array<Dynamic>;
|
||||
}
|
||||
@@ -1,143 +1,62 @@
|
||||
package funkin.options;
|
||||
|
||||
import flixel.addons.display.FlxBackdrop;
|
||||
import funkin.ui.FunkinText;
|
||||
import flixel.text.FlxText;
|
||||
import flixel.math.FlxPoint;
|
||||
import flixel.util.FlxColor;
|
||||
import flixel.addons.transition.FlxTransitionableState;
|
||||
import funkin.options.type.OptionType;
|
||||
/**
|
||||
* Direct replica from Week 7 lol
|
||||
*/
|
||||
class OptionsScreen extends MusicBeatState {
|
||||
public static inline var defaultBGColor:FlxColor = 0xFFFDE871;
|
||||
|
||||
public static var instance:OptionsScreen;
|
||||
class OptionsScreen extends FlxTypedSpriteGroup<OptionType> {
|
||||
public static var optionHeight:Float = 120;
|
||||
|
||||
public var bg:FlxSprite;
|
||||
public var parent:OptionsTree;
|
||||
|
||||
public var descDrop:FlxBackdrop;
|
||||
public var descBG:FlxSprite;
|
||||
public var descText:FunkinText;
|
||||
public var curSelected:Int = 0;
|
||||
public var id:Int = 0;
|
||||
|
||||
public var curSelected:Int = -1;
|
||||
|
||||
public var options:Array<OptionType> = [];
|
||||
|
||||
private var descLetters:Float = 0;
|
||||
|
||||
public var descSpeed:Float = 35;
|
||||
private var __firstFrame:Bool = true;
|
||||
|
||||
public function new() {
|
||||
super();
|
||||
instance = this;
|
||||
// EXTEND then add options
|
||||
}
|
||||
|
||||
public override function create() {
|
||||
FlxTransitionableState.skipNextTransIn = true;
|
||||
super.create();
|
||||
|
||||
bg = new FlxSprite(-80).loadAnimatedGraphic(Paths.image('menus/menuDesat'));
|
||||
bg.scrollFactor.set();
|
||||
bg.scale.set(1.15, 1.15);
|
||||
bg.updateHitbox();
|
||||
bg.screenCenter();
|
||||
bg.color = defaultBGColor;
|
||||
bg.antialiasing = true;
|
||||
add(bg);
|
||||
|
||||
|
||||
for(k=>option in options) {
|
||||
option.setPosition(k * 20, 10 + (k * optionHeight));
|
||||
add(option);
|
||||
}
|
||||
|
||||
createAdditional();
|
||||
|
||||
descText = new FunkinText(0, 0);
|
||||
descText.alignment = CENTER;
|
||||
descText.scrollFactor.set();
|
||||
descText.y = FlxG.height - 50 - descText.height;
|
||||
|
||||
descBG = new FlxSprite(-1, 0).makeGraphic(1, 1, 0xFF000000);
|
||||
descBG.scrollFactor.set();
|
||||
add(descBG);
|
||||
|
||||
descDrop = new FlxBackdrop(null, 1, 0, true, false, 0, 0);
|
||||
descDrop.scrollFactor.set();
|
||||
add(descDrop);
|
||||
|
||||
descText.antialiasing = descDrop.antialiasing = true;
|
||||
changeSelection(1);
|
||||
}
|
||||
|
||||
public function createAdditional() {}
|
||||
public var scrollDest:FlxPoint = FlxPoint.get(0, 0);
|
||||
public override function update(elapsed:Float) {
|
||||
super.update(elapsed);
|
||||
changeSelection((controls.DOWN_P ? 1 : 0) + (controls.UP_P ? -1 : 0));
|
||||
if (controls.ACCEPT) {
|
||||
options[curSelected].onSelect();
|
||||
}
|
||||
if (controls.BACK) {
|
||||
Options.save();
|
||||
Options.applySettings();
|
||||
exit();
|
||||
}
|
||||
FlxG.camera.scroll.x = lerp(FlxG.camera.scroll.x, scrollDest.x, 0.25);
|
||||
FlxG.camera.scroll.y = lerp(FlxG.camera.scroll.y, scrollDest.y, 0.25);
|
||||
|
||||
for(option in options) {
|
||||
var angle = Math.cos((option.y + (optionHeight / 2) - (FlxG.camera.scroll.y + ((FlxG.height - descBG.height) / 2))) / (FlxG.height * 1.25) * Math.PI);
|
||||
var controls = PlayerSettings.solo.controls;
|
||||
|
||||
option.x = -50 + (Math.abs(angle) * 150);
|
||||
changeSelection((controls.UP_P ? -1 : 0) + (controls.DOWN_P ? 1 : 0) - FlxG.mouse.wheel);
|
||||
x = id * FlxG.width;
|
||||
for(k=>option in members) {
|
||||
var y:Float = ((FlxG.height - optionHeight) / 2) + ((k - curSelected) * optionHeight);
|
||||
|
||||
option.selected = false;
|
||||
option.y = __firstFrame ? y : CoolUtil.fpsLerp(option.y, y, 0.25);
|
||||
option.x = x + (-50 + (Math.abs(Math.cos((option.y + (optionHeight / 2) - (FlxG.camera.scroll.y + (FlxG.height / 2))) / (FlxG.height * 1.25) * Math.PI)) * 150));
|
||||
}
|
||||
|
||||
descBG.alpha = (descDrop.alpha = lerp(descDrop.alpha, 1, 0.25)) * 0.75;
|
||||
descDrop.x -= elapsed * 200;
|
||||
}
|
||||
__firstFrame = false;
|
||||
|
||||
public function exit() {
|
||||
FlxTransitionableState.skipNextTransOut = true;
|
||||
FlxTransitionableState.skipNextTransIn = true;
|
||||
FlxG.switchState(new OptionsMenu());
|
||||
}
|
||||
|
||||
public function changeSelection(change:Int) {
|
||||
if (change == 0 && curSelected != -1) return;
|
||||
CoolUtil.playMenuSFX(SCROLL, 0.7);
|
||||
if (curSelected != (curSelected = FlxMath.wrap(curSelected + change, 0, options.length - 1))) {
|
||||
for(e in options)
|
||||
e.selected = false;
|
||||
options[curSelected].selected = true;
|
||||
scrollDest.set(-50, -((FlxG.height - descBG.height) / 2) + ((curSelected + 0.5) * optionHeight));
|
||||
updateDesc();
|
||||
if (members.length > 0) {
|
||||
members[curSelected].selected = true;
|
||||
if (controls.ACCEPT || FlxG.mouse.justReleased)
|
||||
members[curSelected].onSelect();
|
||||
}
|
||||
if (controls.BACK || FlxG.mouse.justReleasedRight)
|
||||
close();
|
||||
}
|
||||
|
||||
public function updateDesc() {
|
||||
updateDescText(options[curSelected].desc);
|
||||
public function close() {
|
||||
onClose(this);
|
||||
}
|
||||
|
||||
public function updateDescText(text:String) {
|
||||
descText.text = '/ ${text} /';
|
||||
@:privateAccess descText.regenGraphic(); //updates the thing
|
||||
public function changeSelection(sel:Int) {
|
||||
if (members.length <= 0 || sel == 0) return;
|
||||
|
||||
descDrop.loadFrame(descText.frame);
|
||||
descDrop.y = Std.int(FlxG.height - 10 - descText.height);
|
||||
CoolUtil.playMenuSFX(SCROLL);
|
||||
|
||||
descBG.setGraphicSize(FlxG.width + 2, Std.int(descText.height + 20) + 1);
|
||||
descBG.updateHitbox();
|
||||
curSelected = FlxMath.wrap(curSelected + sel, 0, members.length-1);
|
||||
|
||||
descBG.alpha = descDrop.alpha = 0;
|
||||
descBG.y = FlxG.height - descBG.height + 1;
|
||||
for(o in members)
|
||||
members[curSelected].selected = true;
|
||||
}
|
||||
|
||||
public override function destroy() {
|
||||
super.destroy();
|
||||
instance = null;
|
||||
scrollDest.put();
|
||||
}
|
||||
public dynamic function onClose(o:OptionsScreen) {}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package funkin.options;
|
||||
|
||||
class OptionsTree extends FlxTypedGroup<OptionsScreen> {
|
||||
public override function new() {
|
||||
super();
|
||||
|
||||
}
|
||||
|
||||
public override function update(elapsed:Float) {
|
||||
var last = members.last();
|
||||
if (last != null)
|
||||
last.update(elapsed);
|
||||
}
|
||||
|
||||
public override function add(m:OptionsScreen) {
|
||||
super.add(m);
|
||||
setup(m);
|
||||
onMenuChange();
|
||||
return m;
|
||||
}
|
||||
public override function insert(pos:Int, m:OptionsScreen) {
|
||||
var last = members.last();
|
||||
super.insert(pos, m);
|
||||
setup(m);
|
||||
if (last != members.last())
|
||||
onMenuChange();
|
||||
return m;
|
||||
}
|
||||
|
||||
public function setup(m:OptionsScreen) {
|
||||
m.onClose = __subMenuClose;
|
||||
m.id = members.indexOf(m);
|
||||
m.parent = this;
|
||||
}
|
||||
|
||||
function __subMenuClose(m:OptionsScreen) {
|
||||
remove(m, true);
|
||||
onMenuChange();
|
||||
onMenuClose(m);
|
||||
}
|
||||
|
||||
public dynamic function onMenuChange() {
|
||||
|
||||
}
|
||||
|
||||
public dynamic function onMenuClose(m:OptionsScreen) {
|
||||
}
|
||||
}
|
||||
@@ -1,33 +1,27 @@
|
||||
package funkin.options.categories;
|
||||
|
||||
class AppearanceOptions extends OptionsScreen {
|
||||
public override function create() {
|
||||
options = [
|
||||
new Checkbox(
|
||||
"Antialiasing",
|
||||
"If unchecked, will disable antialiasing on every sprite. Can boost performances at the cost of sharper, more pixely sprites",
|
||||
"antialiasing"),
|
||||
new Checkbox(
|
||||
"Pixel Perfect Effect",
|
||||
"If checked, Week 6 will have a pixel perfect effect to it enabled, aligning every pixel on the screen.",
|
||||
"week6PixelPerfect"),
|
||||
new Checkbox(
|
||||
"Enable splashes",
|
||||
"If checked, the game will show a note impact effect everytime you hit a note with a Sick! rating.",
|
||||
"splashesEnabled"),
|
||||
new Checkbox(
|
||||
"Flashing Menu",
|
||||
"If unchecked, will disable menu flashing when you select an option in the Main Menu, and other flashs will be slower",
|
||||
"flashingMenu"),
|
||||
new Checkbox(
|
||||
"Low Memory Mode",
|
||||
"If checked, will disable certain background elements in stages to reduce memory usage.",
|
||||
"lowMemoryMode"),
|
||||
new Checkbox(
|
||||
"Auto Pause",
|
||||
"If checked, switching windows will pause the game",
|
||||
"autoPause"),
|
||||
];
|
||||
super.create();
|
||||
public override function new() {
|
||||
super();
|
||||
add(new Checkbox(
|
||||
"Antialiasing",
|
||||
"If unchecked, will disable antialiasing on every sprite. Can boost performances at the cost of sharper, more pixely sprites",
|
||||
"antialiasing"));
|
||||
add(new Checkbox(
|
||||
"Pixel Perfect Effect",
|
||||
"If checked, Week 6 will have a pixel perfect effect to it enabled, aligning every pixel on the screen.",
|
||||
"week6PixelPerfect"));
|
||||
add(new Checkbox(
|
||||
"Flashing Menu",
|
||||
"If unchecked, will disable menu flashing when you select an option in the Main Menu, and other flashs will be slower",
|
||||
"flashingMenu"));
|
||||
add(new Checkbox(
|
||||
"Low Memory Mode",
|
||||
"If checked, will disable certain background elements in stages to reduce memory usage.",
|
||||
"lowMemoryMode"));
|
||||
add(new Checkbox(
|
||||
"Auto Pause",
|
||||
"If checked, switching windows will pause the game",
|
||||
"autoPause"));
|
||||
}
|
||||
}
|
||||
@@ -3,17 +3,15 @@ package funkin.options.categories;
|
||||
import funkin.windows.WindowsAPI;
|
||||
|
||||
class DebugOptions extends OptionsScreen {
|
||||
public override function create() {
|
||||
options = [
|
||||
#if windows
|
||||
new TextOption(
|
||||
"Show Console",
|
||||
"Select this to show the debug console, which contains log information about the game.",
|
||||
function() {
|
||||
WindowsAPI.allocConsole();
|
||||
}),
|
||||
#end
|
||||
];
|
||||
super.create();
|
||||
public override function new() {
|
||||
super();
|
||||
#if windows
|
||||
add(new TextOption(
|
||||
"Show Console",
|
||||
"Select this to show the debug console, which contains log information about the game.",
|
||||
function() {
|
||||
WindowsAPI.allocConsole();
|
||||
}));
|
||||
#end
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,23 @@
|
||||
package funkin.options.categories;
|
||||
|
||||
class GameplayOptions extends OptionsScreen {
|
||||
public override function create() {
|
||||
options = [
|
||||
new Checkbox(
|
||||
"Downscroll",
|
||||
"If checked, notes will go from up to down instead of down to up, like if they were falling",
|
||||
"downscroll"),
|
||||
new Checkbox(
|
||||
"Ghost Tapping",
|
||||
"If unchecked, trying to hit any strum that have no note that can be hit will cause a miss.",
|
||||
"ghostTapping"),
|
||||
new Checkbox(
|
||||
"Naughtyness",
|
||||
"If unchecked, will censor Week 7 cutscenes",
|
||||
"naughtyness"),
|
||||
new Checkbox(
|
||||
"Camera Zoom on Beat",
|
||||
"If unchecked, will disable camera zooming every 4 beats",
|
||||
"camZoomOnBeat"),
|
||||
];
|
||||
super.create();
|
||||
public override function new() {
|
||||
super();
|
||||
add(new Checkbox(
|
||||
"Downscroll",
|
||||
"If checked, notes will go from up to down instead of down to up, like if they were falling",
|
||||
"downscroll"));
|
||||
add(new Checkbox(
|
||||
"Ghost Tapping",
|
||||
"If unchecked, trying to hit any strum that have no note that can be hit will cause a miss.",
|
||||
"ghostTapping"));
|
||||
add(new Checkbox(
|
||||
"Naughtyness",
|
||||
"If unchecked, will censor Week 7 cutscenes",
|
||||
"naughtyness"));
|
||||
add(new Checkbox(
|
||||
"Camera Zoom on Beat",
|
||||
"If unchecked, will disable camera zooming every 4 beats",
|
||||
"camZoomOnBeat"));
|
||||
}
|
||||
}
|
||||
@@ -2,33 +2,31 @@ package funkin.options.categories;
|
||||
|
||||
|
||||
class MiscOptions extends OptionsScreen {
|
||||
public override function create() {
|
||||
options = [
|
||||
#if UPDATE_CHECKING
|
||||
new Checkbox(
|
||||
"Enable Beta Updates",
|
||||
"If checked, will also include beta (prereleases) updates in the update checking.",
|
||||
"betaUpdates"),
|
||||
new TextOption(
|
||||
"Check for Updates",
|
||||
"Select this option to check for new engine updates.",
|
||||
function() {
|
||||
var report = funkin.updating.UpdateUtil.checkForUpdates();
|
||||
if (report.newUpdate) {
|
||||
FlxG.switchState(new funkin.updating.UpdateAvailableScreen(report));
|
||||
} else {
|
||||
CoolUtil.playMenuSFX(CANCEL);
|
||||
updateDescText("No update found.");
|
||||
}
|
||||
}),
|
||||
#end
|
||||
new TextOption(
|
||||
"Reset Save Data",
|
||||
"Select this option to reset save data. This will remove all of your highscores",
|
||||
function() {
|
||||
|
||||
})
|
||||
];
|
||||
super.create();
|
||||
public override function new() {
|
||||
super();
|
||||
#if UPDATE_CHECKING
|
||||
add(new Checkbox(
|
||||
"Enable Beta Updates",
|
||||
"If checked, will also include beta (prereleases) updates in the update checking.",
|
||||
"betaUpdates"));,
|
||||
add(new TextOption(
|
||||
"Check for Updates",
|
||||
"Select this option to check for new engine updates.",
|
||||
function() {
|
||||
var report = funkin.updating.UpdateUtil.checkForUpdates();
|
||||
if (report.newUpdate) {
|
||||
FlxG.switchState(new funkin.updating.UpdateAvailableScreen(report));
|
||||
} else {
|
||||
CoolUtil.playMenuSFX(CANCEL);
|
||||
updateDescText("No update found.");
|
||||
}
|
||||
}));,
|
||||
#end
|
||||
add(new TextOption(
|
||||
"Reset Save Data",
|
||||
"Select this option to reset save data. This will remove all of your highscores",
|
||||
function() {
|
||||
// TODO: SAVE DATA RESETTING
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package funkin.options.type;
|
||||
|
||||
import flixel.effects.FlxFlicker;
|
||||
|
||||
class TextOption extends OptionType {
|
||||
public var selectCallback:Void->Void;
|
||||
@@ -16,8 +17,15 @@ class TextOption extends OptionType {
|
||||
add(__text = new Alphabet(100, 20, text, true));
|
||||
}
|
||||
|
||||
public override function draw() {
|
||||
super.draw();
|
||||
}
|
||||
public override function onSelect() {
|
||||
super.onSelect();
|
||||
CoolUtil.playMenuSFX(CONFIRM);
|
||||
FlxFlicker.flicker(this, 1, Options.flashingMenu ? 0.06 : 0.15, true, false, function(t) {
|
||||
|
||||
});
|
||||
selectCallback();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user