From 8f57989ba6fbc28f4cde20f2dee52b695e0edea6 Mon Sep 17 00:00:00 2001 From: lunarcleint <88809950+lunarcleint@users.noreply.github.com> Date: Mon, 20 Nov 2023 01:32:50 -0700 Subject: [PATCH] test --- source/funkin/editors/charter/Charter.hx | 6 +++--- source/funkin/editors/charter/CharterNote.hx | 20 ++++++++++++++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index a3864c4a..0aa884ea 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -403,7 +403,7 @@ class Charter extends UIState { noteHoverer = new CharterNote(); noteHoverer.snappedToStrumline = noteHoverer.selectable = noteHoverer.autoAlpha = false; - @:privateAccess noteHoverer.__animSpeed = 1.25; + @:privateAccess noteHoverer.__animSpeed = 1.25; noteHoverer.typeText.visible = false; selectionBox.cameras = notesGroup.cameras = gridBackdrops.cameras = noteHoverer.cameras = [charterCamera]; @@ -501,8 +501,8 @@ class Charter extends UIState { PlayState.loadSong(__song, __diff, false, false); } Conductor.setupSong(PlayState.SONG); - noteTypes = PlayState.SONG.noteTypes; - //noteTypes = ["Hurt Note", "Bullet Note", "Penis Note", "Boobs Note"]; + // noteTypes = PlayState.SONG.noteTypes; + noteTypes = ["Hurt Note", "Bullet Note", "Penis Note", "Boobs Note"]; FlxG.sound.setMusic(FlxG.sound.load(Paths.inst(__song, __diff))); vocals = FlxG.sound.load(Paths.voices(__song, __diff)); diff --git a/source/funkin/editors/charter/CharterNote.hx b/source/funkin/editors/charter/CharterNote.hx index 28156367..c710e268 100644 --- a/source/funkin/editors/charter/CharterNote.hx +++ b/source/funkin/editors/charter/CharterNote.hx @@ -18,6 +18,7 @@ class CharterNote extends UISprite implements ICharterSelectable { ]; public var sustainSpr:FlxSprite; + public var typeText:UIText; var __doAnim:Bool = false; var __animSpeed:Float = 1; @@ -33,12 +34,14 @@ class CharterNote extends UISprite implements ICharterSelectable { this.setUnstretchedGraphicSize(40, 40, false); cursor = BUTTON; - moves = false; sustainSpr = new FlxSprite(10, 40); sustainSpr.makeGraphic(1, 1, -1); members.push(sustainSpr); + + typeText = new UIText(x, y, 0, Std.string(type)); + //typeText.borderSize = 1.5; } public override function updateButtonHandler() { @@ -71,6 +74,10 @@ class CharterNote extends UISprite implements ICharterSelectable { this.susLength = susLength; this.type = type; if (strumLine != null) this.strumLine = strumLine; + + typeText.exists = type != 0; + typeText.text = Std.string(this.type); + y = step * 40; sustainSpr.scale.set(10, (40 * susLength)); @@ -124,16 +131,20 @@ class CharterNote extends UISprite implements ICharterSelectable { var __passed:Bool = false; public override function update(elapsed:Float) { super.update(elapsed); - if(sustainSpr.exists) + if (sustainSpr.exists) sustainSpr.follow(this, 15, 20); + if (typeText.exists) + typeText.follow(this, 20 - (typeText.frameWidth/2), 20 - (typeText.frameHeight/2)); if (__passed != (__passed = step < Conductor.curStepFloat)) { if (__passed && FlxG.sound.music.playing && Charter.instance.hitsoundsEnabled(strumLineID)) Charter.instance.hitsound.replay(); } - if (strumLine != null) alpha = !strumLine.strumLine.visible ? (__passed ? 0.2 : 0.4) : (__passed ? 0.6 : 1); - if(sustainSpr.exists) sustainSpr.alpha = alpha; + if (strumLine != null) { + sustainSpr.alpha = alpha = !strumLine.strumLine.visible ? (__passed ? 0.2 : 0.4) : (__passed ? 0.6 : 1); + typeText.alpha = !strumLine.strumLine.visible ? (__passed ? 0.4 : 0.6) : (__passed ? 0.8 : 1); + } colorTransform.redMultiplier = colorTransform.greenMultiplier = colorTransform.blueMultiplier = selected ? 0.75 : 1; colorTransform.redOffset = colorTransform.greenOffset = selected ? 96 : 0; @@ -164,5 +175,6 @@ class CharterNote extends UISprite implements ICharterSelectable { drawMembers(); drawSuper(); + if(typeText.exists && typeText.visible) typeText.draw(); } } \ No newline at end of file