Skip to content

Commit 712db54

Browse files
KoloInDaCribAbnormalPoof
authored andcommitted
gyafyhaswguhyshbughsd
1 parent 6087b2d commit 712db54

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

assets

Submodule assets updated 325 files

source/funkin/data/song/SongData.hx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,16 +1120,9 @@ class SongNoteDataRaw implements ICloneable<SongNoteDataRaw>
11201120

11211121
public function buildTooltip():String
11221122
{
1123-
var result:String = "Kind: ";
1124-
1125-
if ((this.kind?.length ?? 0) == 0)
1126-
{
1127-
result += "Default";
1128-
return result;
1129-
}
1130-
1131-
result += this.kind;
1123+
if ((this.kind?.length ?? 0) == 0) return "";
11321124

1125+
var result:String = 'Kind: ${this.kind}';
11331126
if (this.params.length == 0) return result;
11341127

11351128
result += "\nParams:";

source/funkin/ui/debug/charting/components/ChartEditorNoteSprite.hx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ class ChartEditorNoteSprite extends FlxSprite
7171
public var isGhost:Bool = false;
7272
public var tooltip:ToolTipRegionOptions;
7373

74+
/**
75+
* An indicator if the note is a note kind different than Default ("").
76+
*/
77+
public var kindIndicator:FlxText = new FlxText(5, 5, 100, '*', 16);
78+
7479
public function new(parent:ChartEditorState, isGhost:Bool = false)
7580
{
7681
super();
@@ -223,7 +228,7 @@ class ChartEditorNoteSprite extends FlxSprite
223228
// No tooltip for ghost sprites.
224229
if (this.isGhost) return;
225230

226-
if (this.noteData == null)
231+
if (this.noteData == null || (this.tooltip.tipData?.text ?? "").length == 0)
227232
{
228233
// Disable the tooltip.
229234
ToolTipManager.instance.unregisterTooltipRegion(this.tooltip);
@@ -241,6 +246,18 @@ class ChartEditorNoteSprite extends FlxSprite
241246
}
242247
}
243248

249+
override public function draw()
250+
{
251+
super.draw();
252+
253+
if (!parentState.showNoteKindIndicators) return;
254+
if ((this.noteData?.kind ?? "").length == 0) return; // Do not render the note kind indicator if the note kind is default.
255+
256+
kindIndicator.x = this.x;
257+
kindIndicator.y = this.y;
258+
kindIndicator.draw();
259+
}
260+
244261
function get_noteStyle():Null<String>
245262
{
246263
if (this.noteStyle == null)

0 commit comments

Comments
 (0)