From 1ba9fb87452af87248749552ee6a41299212fab9 Mon Sep 17 00:00:00 2001 From: JordanSantiagoYT Date: Sun, 15 Oct 2023 15:05:16 -0400 Subject: [PATCH] changes Added Song Credits, which can be placed in the new Data section in Chart Editor Added events to toggle camera bouncing Fixed icon positions Added SUtil.getPath to paths, hoping to fix crashes on Android builds Added the timebar color change from Leather Engine --- assets/shared/images/JSEHeading.png | Bin 0 -> 315 bytes source/CoolUtil.hx | 13 ++++ source/CreditsPopUp.hx | 92 ++++++++++++++++++++++++++++ source/GameplayChangersSubstate.hx | 18 ++++++ source/HealthIcon.hx | 13 ++++ source/Paths.hx | 12 ++-- source/PauseSubState.hx | 14 ++++- source/PlayState.hx | 73 +++++++++++++++++++--- source/Song.hx | 3 + source/editors/ChartingState.hx | 22 +++++++ source/openfl/display/FPS.hx | 1 + source/options/VisualsUISubState.hx | 2 +- 12 files changed, 246 insertions(+), 17 deletions(-) create mode 100644 assets/shared/images/JSEHeading.png create mode 100644 source/CreditsPopUp.hx diff --git a/assets/shared/images/JSEHeading.png b/assets/shared/images/JSEHeading.png new file mode 100644 index 0000000000000000000000000000000000000000..06e492152029cbcb645357c62857ffbbdc5f8f20 GIT binary patch literal 315 zcmeAS@N?(olHy`uVBq!ia0y~yV4MJC8*#7!$s(EFxj>4sILO_JVcj{Imp~3nx}&cn z1H;CC?mvmFKt5-IM`SSr1K%MKW)#)%Y5)pe@N{tusfc@f)sXRk0ndRAIX}3S0>1Y+ z)Oz + { + var minAndMaxs = new Array(); + + var min = Math.min(value1, value2); + var max = Math.max(value1, value2); + + minAndMaxs.push(min); + minAndMaxs.push(max); + + return minAndMaxs; + } + inline public static function boundTo(value:Float, min:Float, max:Float):Float { return Math.max(min, Math.min(max, value)); } diff --git a/source/CreditsPopUp.hx b/source/CreditsPopUp.hx new file mode 100644 index 00000000000..437399b8cf9 --- /dev/null +++ b/source/CreditsPopUp.hx @@ -0,0 +1,92 @@ +package; + +import sys.FileSystem; +import flixel.group.FlxSpriteGroup; +import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup; +import flixel.FlxObject; +import flixel.text.FlxText; +import flixel.util.FlxColor; +import flixel.FlxSprite; +import flixel.math.FlxMath; + +typedef SongHeading = { + var path:String; + var antiAliasing:Bool; + var iconOffset:Float; +} +class CreditsPopUp extends FlxSpriteGroup +{ + public var bg:FlxSprite; + public var bgHeading:FlxSprite; + + public var funnyText:FlxText; + var curHeading:SongHeading; + + public function new(x:Float, y:Float) + { + super(x, y); + bg = new FlxSprite().makeGraphic(400, 50, FlxColor.WHITE); + add(bg); + var songCreator:String = ''; + var headingPath:SongHeading = null; + + songCreator = PlayState.SONG.songCredit; + headingPath = {path: 'JSEHeading', antiAliasing: false, iconOffset: 0}; + + if (headingPath != null) + { + bg.loadGraphic(Paths.image(headingPath.path)); + bg.antialiasing = headingPath.antiAliasing; + curHeading = headingPath; + } + createHeadingText("Song by" + ' ' + songCreator); + + rescaleBG(); + + var yValues = CoolUtil.getMinAndMax(bg.height, funnyText.height); + funnyText.y = funnyText.y + ((yValues[0] - yValues[1]) / 2); + } + public function switchHeading(newHeading:SongHeading) + { + if (bg != null) + { + remove(bg); + } + bg = new FlxSprite().makeGraphic(400, 50, FlxColor.WHITE); + if (newHeading != null) + { + bg.loadGraphic(Paths.image(newHeading.path)); + } + bg.antialiasing = newHeading.antiAliasing; + curHeading = newHeading; + add(bg); + + rescaleBG(); + } + public function changeText(newText:String, rescaleHeading:Bool = true) + { + createHeadingText(newText); + + if (rescaleHeading) + { + rescaleBG(); + } + } + function createHeadingText(text:String) + { + if (funnyText != null) + { + remove(funnyText); + } + funnyText = new FlxText(1, 0, 650, text, 16); + funnyText.setFormat('vcr.ttf', 30, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); + funnyText.borderSize = 2; + funnyText.antialiasing = true; + add(funnyText); + } + function rescaleBG() + { + bg.setGraphicSize(Std.int((funnyText.textField.textWidth + 0.5)), Std.int(funnyText.height + 0.5)); + bg.updateHitbox(); + } +} \ No newline at end of file diff --git a/source/GameplayChangersSubstate.hx b/source/GameplayChangersSubstate.hx index f8460372600..884eccd694c 100644 --- a/source/GameplayChangersSubstate.hx +++ b/source/GameplayChangersSubstate.hx @@ -40,6 +40,7 @@ class GameplayChangersSubstate extends MusicBeatSubstate private var checkboxGroup:FlxTypedGroup; private var grpTexts:FlxTypedGroup; public static var inThePauseMenu:Bool = false; + public var pauseState:PauseSubState; function getOptions() { @@ -113,6 +114,7 @@ class GameplayChangersSubstate extends MusicBeatSubstate option.onChange = onChangeBotplay; //Changing onChange is only needed if you want to make a special interaction after it changes the value var option:GameplayOption = new GameplayOption('Play as Opponent', 'opponentplay', 'bool', false); + option.onChange = onChangeChartOption; optionsArray.push(option); var option:GameplayOption = new GameplayOption('Opponent Health Drain', 'opponentdrain', 'bool', false); @@ -127,21 +129,27 @@ class GameplayChangersSubstate extends MusicBeatSubstate optionsArray.push(option); var option:GameplayOption = new GameplayOption('Random Mode', 'randommode', 'bool', false); + option.onChange = onChangeChartOption; optionsArray.push(option); var option:GameplayOption = new GameplayOption('Stair Mode', 'stairmode', 'bool', false); + option.onChange = onChangeChartOption; optionsArray.push(option); var option:GameplayOption = new GameplayOption('Wave Mode', 'wavemode', 'bool', false); + option.onChange = onChangeChartOption; optionsArray.push(option); var option:GameplayOption = new GameplayOption('Flip Mode', 'flip', 'bool', false); + option.onChange = onChangeChartOption; optionsArray.push(option); var option:GameplayOption = new GameplayOption('One Key', 'onekey', 'bool', false); + option.onChange = onChangeChartOption; optionsArray.push(option); var option:GameplayOption = new GameplayOption('Jack Amount: ', 'jacks', 'float', 0); + option.onChange = onChangeChartOption; option.scrollSpeed = 6; option.minValue = 0; option.maxValue = 100; @@ -150,9 +158,11 @@ class GameplayChangersSubstate extends MusicBeatSubstate optionsArray.push(option); var option:GameplayOption = new GameplayOption('Random Playback Rate', 'randomspeed', 'bool', false); + option.onChange = onChangeChartOption; optionsArray.push(option); var option:GameplayOption = new GameplayOption('Troll Mode', 'thetrollingever', 'bool', false); + option.onChange = onChangeChartOption; optionsArray.push(option); } @@ -459,6 +469,14 @@ class GameplayChangersSubstate extends MusicBeatSubstate PlayState.playerIsCheating = true; } } + function onChangeChartOption() + { + if(inThePauseMenu) + { + trace ("HEY! You changed an option that requires a chart restart!"); + PauseSubState.requireRestart = true; + } + } function onChangeBotplay() { if(inThePauseMenu) diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index 8cef8e50ca8..fc5ce9bf2fb 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -3,6 +3,7 @@ package; import flixel.math.FlxMath; import flixel.FlxSprite; import openfl.utils.Assets as OpenFlAssets; +import flixel.FlxG; using StringTools; @@ -87,6 +88,18 @@ class HealthIcon extends FlxSprite } } + override function updateHitbox() + { + if (ClientPrefs.iconBounceType != 'Golden Apple' && ClientPrefs.iconBounceType != 'Dave and Bambi' || Type.getClassName(Type.getClass(FlxG.state)) != 'PlayState') + { + super.updateHitbox(); + offset.x = iconOffsets[0]; + offset.y = iconOffsets[1]; + } else { + super.updateHitbox(); + } + } + public function getCharacter():String { return char; } diff --git a/source/Paths.hx b/source/Paths.hx index 7ae3aa7de76..97f648b5ef2 100644 --- a/source/Paths.hx +++ b/source/Paths.hx @@ -177,30 +177,30 @@ class Paths inline static public function txt(key:String, ?library:String) { - return getPath('data/$key.txt', TEXT, library); + return getPath(SUtil.getPath() + 'data/$key.txt', TEXT, library); } inline static public function xml(key:String, ?library:String) { - return getPath('data/$key.xml', TEXT, library); + return getPath(SUtil.getPath() + 'data/$key.xml', TEXT, library); } inline static public function json(key:String, ?library:String) { - return getPath('data/$key.json', TEXT, library); + return getPath(SUtil.getPath() + 'data/$key.json', TEXT, library); } inline static public function shaderFragment(key:String, ?library:String) { - return getPath('shaders/$key.frag', TEXT, library); + return getPath(SUtil.getPath() + 'shaders/$key.frag', TEXT, library); } inline static public function shaderVertex(key:String, ?library:String) { - return getPath('shaders/$key.vert', TEXT, library); + return getPath(SUtil.getPath() + 'shaders/$key.vert', TEXT, library); } inline static public function lua(key:String, ?library:String) { - return getPath('$key.lua', TEXT, library); + return getPath(SUtil.getPath() + '$key.lua', TEXT, library); } //Video loading (part of it) static public function video(key:String) diff --git a/source/PauseSubState.hx b/source/PauseSubState.hx index 938b0a6d62a..79cf455d10f 100644 --- a/source/PauseSubState.hx +++ b/source/PauseSubState.hx @@ -34,6 +34,7 @@ class PauseSubState extends MusicBeatSubstate //var botplayText:FlxText; public static var botplayLockout:Bool = false; public static var inPause:Bool = false; + public static var requireRestart:Bool = false; public static var songName:String = ''; @@ -41,6 +42,7 @@ class PauseSubState extends MusicBeatSubstate { super(); if(CoolUtil.difficulties.length < 2) menuItemsOG.remove('Change Difficulty'); //No need to change difficulty if there is only one! + if(botplayLockout) menuItemsOG.remove('Toggle Botplay'); //you cant toggle it on MWAHAHAHAHAHA if(PlayState.chartingMode) { @@ -54,7 +56,7 @@ class PauseSubState extends MusicBeatSubstate } menuItemsOG.insert(3 + num, 'End Song'); menuItemsOG.insert(4 + num, 'Toggle Practice Mode'); - if (!botplayLockout) menuItemsOG.insert(5 + num, 'Toggle Botplay'); + menuItemsOG.insert(5 + num, 'Toggle Botplay'); } menuItems = menuItemsOG; @@ -148,6 +150,11 @@ class PauseSubState extends MusicBeatSubstate var cantUnpause:Float = 0.1; override function update(elapsed:Float) { + if(requireRestart) { + menuItemsOG.remove('Resume'); //technically that's the logical thing to do + regenMenu(); + requireRestart = false; + } cantUnpause -= elapsed; if (pauseMusic.volume < 0.5) pauseMusic.volume += 0.01 * elapsed; @@ -269,9 +276,12 @@ class PauseSubState extends MusicBeatSubstate case 'Toggle Botplay': PlayState.instance.cpuControlled = !PlayState.instance.cpuControlled; PlayState.changedDifficulty = true; + if (PlayState.instance.botplayTxt != null) + { PlayState.instance.botplayTxt.visible = PlayState.instance.cpuControlled; PlayState.instance.botplayTxt.alpha = 1; PlayState.instance.botplaySine = 0; + } case "Options": MusicBeatState.switchState(new OptionsState()); inPause = true; @@ -370,7 +380,7 @@ class PauseSubState extends MusicBeatSubstate } } - function regenMenu():Void { + public function regenMenu():Void { for (i in 0...grpMenuShit.members.length) { var obj = grpMenuShit.members[0]; obj.kill(); diff --git a/source/PlayState.hx b/source/PlayState.hx index 33f27c728e2..755aaef1cfb 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1530,7 +1530,7 @@ class PlayState extends MusicBeatState timeBar = new FlxBar(timeBarBG.x + 4, timeBarBG.y + 4, LEFT_TO_RIGHT, Std.int(timeBarBG.width - 8), Std.int(timeBarBG.height - 8), this, 'songPercent', 0, 1); timeBar.scrollFactor.set(); - timeBar.createFilledBar(FlxColor.BLACK, FlxColor.CYAN); + timeBar.createFilledBar(FlxColor.BLACK, FlxColor.WHITE); timeBar.numDivisions = 400; timeBar.alpha = 0; timeBar.visible = showTime; @@ -1917,7 +1917,7 @@ class PlayState extends MusicBeatState } if (ClientPrefs.hudType == 'JS Engine') { // Add Engine watermark - EngineWatermark = new FlxText(4,FlxG.height * 0.1 - 70,0,"", 18); + EngineWatermark = new FlxText(4,FlxG.height * 0.1 - 70,0,"", 15); EngineWatermark.setFormat(Paths.font("vcr.ttf"), 18, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE,FlxColor.BLACK); EngineWatermark.scrollFactor.set(); if (ClientPrefs.downScroll) EngineWatermark.y = (FlxG.height * 0.9 + 50); @@ -3718,6 +3718,22 @@ class PlayState extends MusicBeatState }); FlxG.sound.play(Paths.sound('introGo' + introSoundsSuffix), 0.6); case 4: + if (SONG.songCredit != null) + { + var creditsPopup:CreditsPopUp = new CreditsPopUp(FlxG.width, 200); + creditsPopup.camera = camHUD; + creditsPopup.scrollFactor.set(); + creditsPopup.x = creditsPopup.width * -1; + add(creditsPopup); + + FlxTween.tween(creditsPopup, {x: 0}, 0.5, {ease: FlxEase.backOut, onComplete: function(tweeen:FlxTween) + { + FlxTween.tween(creditsPopup, {x: creditsPopup.width * -1} , 1, {ease: FlxEase.backIn, onComplete: function(tween:FlxTween) + { + creditsPopup.destroy(); + }, startDelay: 3}); + }}); + } } notes.forEachAlive(function(note:Note) { @@ -5035,6 +5051,8 @@ class PlayState extends MusicBeatState moveCamTo[0] = FlxMath.lerp(moveCamTo[0], 0, panLerpVal); moveCamTo[1] = FlxMath.lerp(moveCamTo[1], 0, panLerpVal); } + + if (ClientPrefs.hudType == 'Leather Engine' && SONG.notes[curSection] != null) timeBar.color = SONG.notes[curSection].mustHitSection ? FlxColor.fromRGB(boyfriend.healthColorArray[0], boyfriend.healthColorArray[1], boyfriend.healthColorArray[2]) : FlxColor.fromRGB(dad.healthColorArray[0], dad.healthColorArray[1], dad.healthColorArray[2]); if (ClientPrefs.showNPS) { var currentTime = Date.now().getTime(); var timeThreshold = ClientPrefs.npsWithSpeed ? 1000 / playbackRate : 1000; @@ -5324,9 +5342,16 @@ if (ClientPrefs.showNPS) { iconP1.setGraphicSize(Std.int(FlxMath.lerp(150, iconP1.width, CoolUtil.boundTo(1 - (elapsed * 30 * playbackRate), 0, 1)))); iconP2.setGraphicSize(Std.int(FlxMath.lerp(150, iconP2.width, CoolUtil.boundTo(1 - (elapsed * 30 * playbackRate), 0, 1)))); } + if (ClientPrefs.iconBounceType == 'Strident Crisis') { + iconP1.setGraphicSize(Std.int(FlxMath.lerp(150, iconP1.width, 0.50 / playbackRate))); + iconP1.updateHitbox(); + + iconP2.setGraphicSize(Std.int(FlxMath.lerp(150, iconP2.width, 0.50 / playbackRate))); + iconP2.updateHitbox(); + } if (ClientPrefs.iconBounceType == 'Dave and Bambi') { - iconP1.setGraphicSize(Std.int(FlxMath.lerp(150, iconP1.width, 0.9 * playbackRate)),Std.int(FlxMath.lerp(150, iconP1.height, 0.9 * playbackRate))); - iconP2.setGraphicSize(Std.int(FlxMath.lerp(150, iconP2.width, 0.9 * playbackRate)),Std.int(FlxMath.lerp(150, iconP2.height, 0.9 * playbackRate))); + iconP1.setGraphicSize(Std.int(FlxMath.lerp(150, iconP1.width, 0.8 / playbackRate)),Std.int(FlxMath.lerp(150, iconP1.height, 0.8 / playbackRate))); + iconP2.setGraphicSize(Std.int(FlxMath.lerp(150, iconP2.width, 0.8 / playbackRate)),Std.int(FlxMath.lerp(150, iconP2.height, 0.8 / playbackRate))); } if (ClientPrefs.iconBounceType == 'Plank Engine') { var funnyBeat = (Conductor.songPosition / 1000) * (Conductor.bpm / 60); @@ -6527,6 +6552,12 @@ if (unspawnNotes[0] != null && (Conductor.songPosition + 1800 / songSpeed) >= fi case 'Kill Henchmen': killHenchmen(); + case 'Enable Camera Bop': + camZooming = true; + + case 'Disable Camera Bop': + camZooming = false; + case 'Camera Bopping': var _interval:Int = Std.parseInt(value1); if (Math.isNaN(_interval)) @@ -9256,7 +9287,7 @@ if (!allSicks && ClientPrefs.colorRatingFC && songMisses > 0 && ClientPrefs.hudT var randomShit = FlxMath.roundDecimal(FlxG.random.float(0.4, 3), 2); lerpSongSpeed(randomShit, 1); } - if (camZooming && enemyHits != 0 && !endingSong && !startingSong && FlxG.camera.zoom < 1.35 && ClientPrefs.camZooms && curBeat % camBopInterval == 0 && !softlocked) + if (camZooming && !endingSong && !startingSong && FlxG.camera.zoom < 1.35 && ClientPrefs.camZooms && curBeat % camBopInterval == 0 && !softlocked) { FlxG.camera.zoom += 0.015 * camBopIntensity; camHUD.zoom += 0.03 * camBopIntensity; @@ -9268,15 +9299,41 @@ if (!allSicks && ClientPrefs.colorRatingFC && songMisses > 0 && ClientPrefs.hudT } if (ClientPrefs.iconBounceType == 'Dave and Bambi') { - var funny:Float = Math.max(Math.min(healthBar.value,1.9),0.01); + var funny:Float = Math.max(Math.min(healthBar.value,(maxHealth/0.95)),0.1); - iconP2.setGraphicSize(Std.int(iconP2.width + (50 / funny)),Std.int(iconP2.height - (25 * funny))); - iconP1.setGraphicSize(Std.int(iconP1.width + (50 / ((2 - funny) + 0.1))),Std.int(iconP1.height - (25 * ((2 - funny) + 0.1)))); + //health icon bounce but epic + if (!opponentChart) + { + iconP1.setGraphicSize(Std.int(iconP1.width + (50 * (funny + 0.1))),Std.int(iconP1.height - (25 * funny))); + iconP2.setGraphicSize(Std.int(iconP2.width + (50 * ((2 - funny) + 0.1))),Std.int(iconP2.height - (25 * ((2 - funny) + 0.1)))); + } else { + iconP2.setGraphicSize(Std.int(iconP2.width + (50 * funny)),Std.int(iconP2.height - (25 * funny))); + iconP1.setGraphicSize(Std.int(iconP1.width + (50 * ((2 - funny) + 0.1))),Std.int(iconP1.height - (25 * ((2 - funny) + 0.1)))); + } } if (ClientPrefs.iconBounceType == 'Old Psych') { iconP1.setGraphicSize(Std.int(iconP1.width + 30)); iconP2.setGraphicSize(Std.int(iconP2.width + 30)); } + if (ClientPrefs.iconBounceType == 'Strident Crisis') { + var funny:Float = (healthBar.percent * 0.01) + 0.01; + + //health icon bounce but epic + iconP1.setGraphicSize(Std.int(iconP1.width + (50 * (2 + funny))),Std.int(iconP2.height - (25 * (2 + funny)))); + iconP2.setGraphicSize(Std.int(iconP2.width + (50 * (2 - funny))),Std.int(iconP2.height - (25 * (2 - funny)))); + + iconP1.scale.set(1.1, 0.8); + iconP2.scale.set(1.1, 0.8); + + FlxTween.angle(iconP1, -15, 0, Conductor.crochet / 1300 * gfSpeed, {ease: FlxEase.quadOut}); + FlxTween.angle(iconP2, 15, 0, Conductor.crochet / 1300 * gfSpeed, {ease: FlxEase.quadOut}); + + FlxTween.tween(iconP1, {'scale.x': 1, 'scale.y': 1}, Conductor.crochet / 1250 * gfSpeed, {ease: FlxEase.quadOut}); + FlxTween.tween(iconP2, {'scale.x': 1, 'scale.y': 1}, Conductor.crochet / 1250 * gfSpeed, {ease: FlxEase.quadOut}); + + iconP1.updateHitbox(); + iconP2.updateHitbox(); + } if (ClientPrefs.iconBounceType == 'Plank Engine') { iconP1.scale.x = 1.3; iconP1.scale.y = 0.75; diff --git a/source/Song.hx b/source/Song.hx index 1dbd600242d..9e02ad8aaaa 100644 --- a/source/Song.hx +++ b/source/Song.hx @@ -26,6 +26,8 @@ typedef SwagSong = var gfVersion:String; var stage:String; + var songCredit:String; + var arrowSkin:String; var splashSkin:String; var validScore:Bool; @@ -42,6 +44,7 @@ class Song public var splashSkin:String; public var speed:Float = 1; public var stage:String; + public var songCredit:String; public var player1:String = 'bf'; public var player2:String = 'dad'; public var gfVersion:String = 'gf'; diff --git a/source/editors/ChartingState.hx b/source/editors/ChartingState.hx index 0e8dfe90046..923783b9893 100644 --- a/source/editors/ChartingState.hx +++ b/source/editors/ChartingState.hx @@ -96,6 +96,8 @@ class ChartingState extends MusicBeatState ['Play Animation', "Plays an animation on a Character,\nonce the animation is completed,\nthe animation changes to Idle\n\nValue 1: Animation to play.\nValue 2: Character (Dad, BF, GF)"], ['Camera Follow Pos', "Value 1: X\nValue 2: Y\n\nThe camera won't change the follow point\nafter using this, for getting it back\nto normal, leave both values blank."], ['Alt Idle Animation', "Sets a specified suffix after the idle animation name.\nYou can use this to trigger 'idle-alt' if you set\nValue 2 to -alt\n\nValue 1: Character to set (Dad, BF or GF)\nValue 2: New suffix (Leave it blank to disable)"], + ['Enable Camera Bop', "Enables camera bopping. Useful if you don't want the\nopponent to hit a note, but you want camera bouncing."], + ['Disable Camera Bop', "Same thing as 'Enable Camera Bopping', but disables it\ninstead."], ['Screen Shake', "Value 1: Camera shake\nValue 2: HUD shake\n\nEvery value works as the following example: \"1, 0.05\".\nThe first number (1) is the duration.\nThe second number (0.05) is the intensity."], ['Camera Bopping', "Makes the camera do funny bopping\n\nValue 1: Bopping Speed (how many beats you want before it bops)\nValue 2: Bopping Intensity (how hard you want it to bop, default is 1)\n\nTo reset camera bopping, place a new event and put both values as '4' and '1' respectively."], ['Change Note Multiplier', "Changes the amount of notes played every time you hit a note.\n\nValue 1: Note Multiplier that you want."], @@ -250,6 +252,7 @@ class ChartingState extends MusicBeatState player1: 'bf', player2: 'dad', gfVersion: 'gf', + songCredit: '', speed: 1, stage: 'stage', validScore: false, @@ -391,6 +394,7 @@ class ChartingState extends MusicBeatState {name: "Note", label: 'Note'}, {name: "Events", label: 'Events'}, {name: "Charting", label: 'Charting'}, + {name: "Data", label: 'Data'}, {name: "Note Spamming", label: 'Note Spamming'}, ]; @@ -447,6 +451,7 @@ class ChartingState extends MusicBeatState addEventsUI(); addChartingUI(); addNoteStackingUI(); + addSongDataUI(); updateHeads(); updateWaveform(); //UI_box.selected_tab = 4; @@ -770,6 +775,21 @@ class ChartingState extends MusicBeatState FlxG.camera.follow(camPos); } + var creditInputText:FlxUIInputText; + function addSongDataUI():Void //therell be more added here later + { + var tab_group_songdata = new FlxUI(null, UI_box); + tab_group_songdata.name = "Data"; + + creditInputText = new FlxUIInputText(10, 30, 100, _song.songCredit, 8); + blockPressWhileTypingOn.push(creditInputText); + + tab_group_songdata.add(creditInputText); + tab_group_songdata.add(new FlxText(creditInputText.x, creditInputText.y - 15, 0, 'Song Credit:')); + + UI_box.addGroup(tab_group_songdata); + } + var stepperBeats:FlxUINumericStepper; var check_mustHitSection:FlxUICheckBox; var check_gfSection:FlxUICheckBox; @@ -1857,6 +1877,8 @@ class ChartingState extends MusicBeatState Conductor.songPosition = FlxG.sound.music.time; _song.song = UI_songTitle.text; + _song.songCredit = creditInputText.text; + strumLineUpdateY(); for (i in 0...8){ strumLineNotes.members[i].y = strumLine.y; diff --git a/source/openfl/display/FPS.hx b/source/openfl/display/FPS.hx index 3e0cce92f57..e66ad25471d 100644 --- a/source/openfl/display/FPS.hx +++ b/source/openfl/display/FPS.hx @@ -30,6 +30,7 @@ class FPS extends TextField /** The current frame rate, expressed using frames-per-second **/ + public static var instance:FPS; public var currentFPS(default, null):Float; @:noCompletion private var cacheCount:Float; diff --git a/source/options/VisualsUISubState.hx b/source/options/VisualsUISubState.hx index e3b748f054a..7f6c49bfbed 100644 --- a/source/options/VisualsUISubState.hx +++ b/source/options/VisualsUISubState.hx @@ -310,7 +310,7 @@ class VisualsUISubState extends BaseOptionsMenu 'iconBounceType', 'string', 'Golden Apple', - ['Golden Apple', 'Dave and Bambi', 'Old Psych', 'New Psych', 'VS Steve', 'Plank Engine']); + ['Golden Apple', 'Dave and Bambi', 'Old Psych', 'New Psych', 'VS Steve', 'Plank Engine', 'Strident Crisis']); addOption(option); var option:Option = new Option('Note Splash Type:',