Skip to content

Commit 6087b2d

Browse files
KoloInDaCribAbnormalPoof
authored andcommitted
tooltips....BUT FOR NOTES!
1 parent 44cdbb0 commit 6087b2d

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

source/funkin/data/song/SongData.hx

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

11211121
public function buildTooltip():String
11221122
{
1123-
if ((this.kind?.length ?? 0) == 0) return "";
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;
11241132

1125-
var result:String = 'Kind: ${this.kind}';
11261133
if (this.params.length == 0) return result;
11271134

11281135
result += "\nParams:";

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

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ 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-
7974
public function new(parent:ChartEditorState, isGhost:Bool = false)
8075
{
8176
super();
@@ -228,7 +223,7 @@ class ChartEditorNoteSprite extends FlxSprite
228223
// No tooltip for ghost sprites.
229224
if (this.isGhost) return;
230225

231-
if (this.noteData == null || (this.tooltip.tipData?.text ?? "").length == 0)
226+
if (this.noteData == null)
232227
{
233228
// Disable the tooltip.
234229
ToolTipManager.instance.unregisterTooltipRegion(this.tooltip);
@@ -246,18 +241,6 @@ class ChartEditorNoteSprite extends FlxSprite
246241
}
247242
}
248243

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-
261244
function get_noteStyle():Null<String>
262245
{
263246
if (this.noteStyle == null)

0 commit comments

Comments
 (0)