whatever agahgh
This commit is contained in:
@@ -45,12 +45,13 @@ class Slider extends FlxSprite {
|
||||
switch (animation.curAnim.name) {
|
||||
case 'selected': if (!selected) playAnimOrDefault('deselect', 'unselected');
|
||||
case 'unselected': if (selected) playAnimOrDefault('selecting', 'selected');
|
||||
case 'selecting': if (animation.finished) animation.play('selected');
|
||||
case 'selecting' | 'segment': if (animation.finished) animation.play('selected');
|
||||
case 'deselect': if (animation.finished) animation.play('unselected');
|
||||
}
|
||||
|
||||
if (__curSegments != (__curSegments = CoolUtil.minInt(segments, Math.floor(value * (segments + 1)))) && playSound) {
|
||||
FlxG.sound.play(Paths.sound('menu/volume')).pitch = 0.75 + __curSegments * 0.5 / (segments + 1);
|
||||
if (animation.curAnim.name == 'selected' && animation.exists('segment')) animation.play('segment');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,6 +86,7 @@ class Slider extends FlxSprite {
|
||||
animation.addByPrefix('selected', 'slider selected0', 24, true);
|
||||
animation.addByPrefix('deselect', 'slider deselect0', 24, false);
|
||||
animation.addByPrefix('selecting', 'slider selecting0', 24, false);
|
||||
animation.addByPrefix('segment', 'slider segment0', 24, false);
|
||||
|
||||
var anim;
|
||||
barHeight = 0;
|
||||
@@ -105,7 +107,7 @@ class Slider extends FlxSprite {
|
||||
|
||||
override function set_frame(v:FlxFrame):FlxFrame {
|
||||
super.set_frame(v);
|
||||
sliderResetFrameSize();
|
||||
if (v != null) sliderResetFrameSize();
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
@@ -88,8 +88,7 @@ class OptionsMenu extends TreeMenu {
|
||||
}
|
||||
})]));
|
||||
|
||||
tree.first().add(debugOption = new TextOption('optionsTree.debug-name', 'optionsTree.debug-desc', ' >', () -> addMenu(new DebugOptions())));
|
||||
debugOption.locked = !Options.devMode;
|
||||
checkDebugOption();
|
||||
|
||||
for (i in funkin.backend.assets.ModsFolder.getLoadedMods()) {
|
||||
var xmlPath = Paths.xml('config/options/LIB_$i');
|
||||
@@ -103,6 +102,22 @@ class OptionsMenu extends TreeMenu {
|
||||
}
|
||||
}
|
||||
|
||||
function checkDebugOption() {
|
||||
var screen = tree.first();
|
||||
if (Options.devMode) {
|
||||
if (debugOption == null) {
|
||||
screen.insert(CoolUtil.minInt(screen.length, mainOptions.length),
|
||||
debugOption = new TextOption('optionsTree.debug-name', 'optionsTree.debug-desc', ' >', () -> addMenu(new DebugOptions()))
|
||||
);
|
||||
}
|
||||
}
|
||||
else if (debugOption != null) {
|
||||
screen.remove(debugOption, true);
|
||||
debugOption = flixel.util.FlxDestroyUtil.destroy(debugOption);
|
||||
if (screen.curSelected >= screen.length) screen.changeSelection(0, true);
|
||||
}
|
||||
}
|
||||
|
||||
public function updateBG() {
|
||||
var scaleX:Float = FlxG.width / bg.width;
|
||||
var scaleY:Float = FlxG.height / bg.height;
|
||||
@@ -119,7 +134,7 @@ class OptionsMenu extends TreeMenu {
|
||||
|
||||
override function menuChanged() {
|
||||
super.menuChanged();
|
||||
debugOption.locked = !Options.devMode;
|
||||
checkDebugOption();
|
||||
}
|
||||
|
||||
override function exit() {
|
||||
|
||||
@@ -16,7 +16,7 @@ class GameplayOptions extends TreeMenuScreen {
|
||||
add(new Checkbox(getNameID('camZoomOnBeat'), getDescID('camZoomOnBeat'), 'camZoomOnBeat'));
|
||||
add(new Checkbox(getNameID('autoPause'), getDescID('autoPause'), 'autoPause', __changeAutoPause));
|
||||
add(offsetSetting = new NumOption(getNameID('songOffset'), getDescID('songOffset'), -999, 999, 1, 'songOffset', __changeOffset));
|
||||
add(new SliderOption(getNameID('volumeSFX'), getDescID('volumeSFX'), 0, 1, 1, 10, 'volumeSFX'));
|
||||
add(new SliderOption(getNameID('volumeSFX'), getDescID('volumeSFX'), 0, 1, 1, 6, 'volumeSFX'));
|
||||
|
||||
add(new Separator());
|
||||
add(new TextOption('optionsMenu.advanced', 'optionsTree.gameplay.advanced-desc', ' >', () ->
|
||||
|
||||
Reference in New Issue
Block a user