!!
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
1315
|
||||
1323
|
||||
@@ -1,5 +1,6 @@
|
||||
package funkin.options;
|
||||
|
||||
import flixel.util.typeLimit.OneOfTwo;
|
||||
import flixel.FlxState;
|
||||
import flixel.addons.transition.FlxTransitionableState;
|
||||
import flixel.group.FlxGroup.FlxTypedGroup;
|
||||
@@ -15,7 +16,7 @@ import funkin.options.categories.*;
|
||||
typedef OptionCategory = {
|
||||
var name:String;
|
||||
var desc:String;
|
||||
var state:Class<FlxState>;
|
||||
var state:OneOfTwo<Class<FlxState>, FlxState>;
|
||||
}
|
||||
class OptionsMenu extends MusicBeatState {
|
||||
public static var fromPlayState:Bool = false;
|
||||
@@ -85,7 +86,10 @@ class OptionsMenu extends MusicBeatState {
|
||||
FlxFlicker.flicker(alphabets.members[curSelected], 1, Options.flashingMenu ? 0.06 : 0.15, false, false, function(flick:FlxFlicker)
|
||||
{
|
||||
FlxTransitionableState.skipNextTransOut = true;
|
||||
FlxG.switchState(Type.createInstance(options[curSelected].state, []));
|
||||
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)
|
||||
|
||||
@@ -64,6 +64,8 @@ class OptionsScreen extends MusicBeatState {
|
||||
descDrop.scrollFactor.set();
|
||||
add(descDrop);
|
||||
|
||||
descText.antialiasing = descDrop.antialiasing = true;
|
||||
|
||||
for(k=>option in options) {
|
||||
option.setPosition(k * 20, 10 + (k * optionHeight));
|
||||
add(option);
|
||||
@@ -116,7 +118,7 @@ class OptionsScreen extends MusicBeatState {
|
||||
}
|
||||
|
||||
public function updateDesc() {
|
||||
descText.text = '/ ${options[curSelected].desc} /';
|
||||
descText.text = '/ ${options[curSelected].desc} /';
|
||||
@:privateAccess descText.regenGraphic(); //updates the thing
|
||||
|
||||
descDrop.loadFrame(descText.frame);
|
||||
|
||||
@@ -76,7 +76,7 @@ class Script extends FlxBasic implements IFlxDestroyable {
|
||||
* All available script extensions
|
||||
*/
|
||||
public static var scriptExtensions:Array<String> = [
|
||||
"hx", "hscript", "hsc"
|
||||
"hx", "hscript", "hsc", "hxs", "lua" /** ACTUALLY NOT SUPPORTED, ONLY FOR THE MESSAGE **/
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -101,7 +101,7 @@ class Script extends FlxBasic implements IFlxDestroyable {
|
||||
public static function create(path:String):Script {
|
||||
if (Assets.exists(path)) {
|
||||
return switch(Path.extension(path).toLowerCase()) {
|
||||
case "hx" | "hscript" | "hsc":
|
||||
case "hx" | "hscript" | "hsc" | "hxs":
|
||||
new HScript(path);
|
||||
case "lua":
|
||||
Logs.trace("Lua is not supported in this engine. Use HScript instead.", ERROR);
|
||||
|
||||
@@ -251,6 +251,7 @@ class AlphaCharacter extends FlxSprite
|
||||
letter = letter.toUpperCase();
|
||||
if (boldAnims[letter] == null) {
|
||||
visible = false;
|
||||
scale.set();
|
||||
width = 40;
|
||||
return;
|
||||
}
|
||||
@@ -264,6 +265,7 @@ class AlphaCharacter extends FlxSprite
|
||||
{
|
||||
if (letterAnims[letter] == null) {
|
||||
visible = false;
|
||||
scale.set();
|
||||
width = 40;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user