options desc
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
975
|
||||
984
|
||||
@@ -429,9 +429,7 @@ class PlayState extends MusicBeatState
|
||||
private function generateSong(dataPath:String, ?songData:SwagSong):Void
|
||||
{
|
||||
if (songData == null) songData = SONG;
|
||||
|
||||
Conductor.reset();
|
||||
|
||||
|
||||
Conductor.changeBPM(songData.bpm);
|
||||
|
||||
curSong = songData.song;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package funkin.options;
|
||||
|
||||
import flixel.addons.display.FlxBackdrop;
|
||||
import funkin.ui.FunkinText;
|
||||
import flixel.text.FlxText;
|
||||
import flixel.math.FlxMath;
|
||||
@@ -21,6 +22,7 @@ class OptionsScreen extends MusicBeatState {
|
||||
// public var bgColor:FlxColor = 0xFFFDE871;
|
||||
public var bg:FlxSprite;
|
||||
|
||||
public var descDrop:FlxBackdrop;
|
||||
public var descBG:FlxSprite;
|
||||
public var descText:FunkinText;
|
||||
|
||||
@@ -28,7 +30,6 @@ class OptionsScreen extends MusicBeatState {
|
||||
|
||||
public var options:Array<OptionType> = [];
|
||||
|
||||
private var transparentFormat:FlxTextFormat;
|
||||
private var descLetters:Float = 0;
|
||||
|
||||
public var descSpeed:Float = 35;
|
||||
@@ -50,16 +51,23 @@ class OptionsScreen extends MusicBeatState {
|
||||
bg.antialiasing = true;
|
||||
add(bg);
|
||||
|
||||
descText = new FunkinText(10, 10, FlxG.width - 20);
|
||||
descText = new FunkinText(0, 0);
|
||||
descText.alignment = CENTER;
|
||||
add(descText);
|
||||
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);
|
||||
|
||||
for(k=>option in options) {
|
||||
option.setPosition(k * 20, 10 + (k * optionHeight));
|
||||
add(option);
|
||||
}
|
||||
|
||||
transparentFormat = new FlxTextFormat(FlxColor.TRANSPARENT);
|
||||
changeSelection(1);
|
||||
}
|
||||
|
||||
@@ -83,11 +91,9 @@ class OptionsScreen extends MusicBeatState {
|
||||
|
||||
option.x = -50 + (Math.abs(angle) * 150);
|
||||
}
|
||||
var offset:Int;
|
||||
if (Std.int(descLetters) != (offset = Std.int(Math.min(descText.text.length, descLetters += elapsed * descSpeed)))) {
|
||||
descText.clearFormats();
|
||||
descText.addFormat(transparentFormat, offset, descText.text.length);
|
||||
}
|
||||
|
||||
descBG.alpha = (descDrop.alpha = lerp(descDrop.alpha, 1, 0.25)) * 0.75;
|
||||
descDrop.x -= elapsed * 200;
|
||||
}
|
||||
|
||||
public function exit() {
|
||||
@@ -110,10 +116,17 @@ class OptionsScreen extends MusicBeatState {
|
||||
}
|
||||
|
||||
public function updateDesc() {
|
||||
descLetters = 0;
|
||||
descText.text = options[curSelected].desc;
|
||||
descSpeed = descText.text.length;
|
||||
descText.addFormat(transparentFormat, 0, descText.text.length);
|
||||
descText.text = '/ ${options[curSelected].desc} /';
|
||||
@:privateAccess descText.regenGraphic(); //updates the thing
|
||||
|
||||
descDrop.loadFrame(descText.frame);
|
||||
descDrop.y = Std.int(FlxG.height - 10 - descText.height);
|
||||
|
||||
descBG.setGraphicSize(FlxG.width + 2, Std.int(descText.height + 20) + 1);
|
||||
descBG.updateHitbox();
|
||||
|
||||
descBG.alpha = descDrop.alpha = 0;
|
||||
descBG.y = FlxG.height - descBG.height + 1;
|
||||
}
|
||||
|
||||
public override function destroy() {
|
||||
|
||||
@@ -5,15 +5,15 @@ class BehaviourOptions extends OptionsScreen {
|
||||
options = [
|
||||
new Checkbox(
|
||||
"Naughtyness",
|
||||
"If unchecked, will censor Week 7 cutscenes.",
|
||||
"If unchecked, will censor Week 7 cutscenes",
|
||||
"naughtyness"),
|
||||
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.",
|
||||
"If unchecked, will disable menu flashing when you select an option in the Main Menu, and other flashs will be slower",
|
||||
"flashingMenu"),
|
||||
new Checkbox(
|
||||
"Camera Zoom on Beat",
|
||||
"If unchecked, will disable camera zooming every 4 beats.",
|
||||
"If unchecked, will disable camera zooming every 4 beats",
|
||||
"camZoomOnBeat"),
|
||||
];
|
||||
super.create();
|
||||
|
||||
@@ -5,15 +5,15 @@ class GameplayOptions extends OptionsScreen {
|
||||
options = [
|
||||
new Checkbox(
|
||||
"Downscroll",
|
||||
"If checked, notes will go from up to down instead of down to up, like if they were falling.",
|
||||
"If checked, notes will go from up to down instead of down to up, like if they were falling",
|
||||
"downscroll"),
|
||||
new Checkbox(
|
||||
"Auto Pause",
|
||||
"If checked, switching windows will pause the game.",
|
||||
"If checked, switching windows will pause the game",
|
||||
"autoPause"),
|
||||
new Checkbox(
|
||||
"Antialiasing",
|
||||
"If unchecked, will disable antialiasing on every sprite. Can boost performances at the cost of sharper, more pixely sprites.",
|
||||
"If unchecked, will disable antialiasing on every sprite. Can boost performances at the cost of sharper, more pixely sprites",
|
||||
"antialiasing"),
|
||||
];
|
||||
super.create();
|
||||
|
||||
@@ -5,7 +5,7 @@ class SaveDataOptions extends OptionsScreen {
|
||||
options = [
|
||||
new TextOption(
|
||||
"Reset Save Data",
|
||||
"Select this option to reset save data. This will remove all of your highscores.",
|
||||
"Select this option to reset save data. This will remove all of your highscores",
|
||||
function() {
|
||||
// TODO!!
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user