1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-12-08 13:08:26 +00:00

Implement a checkbox to hide the waveform, which improves FPS.

This commit is contained in:
EliteMasterEric 2025-11-24 23:48:15 -05:00 committed by Hundrec
parent b4058fd7b0
commit ccbae3da7d
2 changed files with 17 additions and 0 deletions

View file

@ -87,6 +87,15 @@ class WaveformSprite extends MeshRender
return time;
}
override function set_visible(value:Bool):Bool
{
if (visible == value) return value;
visible = value;
isWaveformDirty = true;
return visible;
}
/**
* The duration, in seconds, that the waveform represents.
* The section of waveform from `time` to `time + duration` and `width` are used to determine how many samples each pixel represents.

View file

@ -1939,6 +1939,11 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
*/
var menubarItemViewSubtitles:MenuCheckBox;
/**
* The `View -> Waveforms` menu item.
*/
var menubarItemViewWaveforms:MenuCheckBox;
/**
* The `View -> Increase Difficulty` menu item.
*/
@ -3240,6 +3245,9 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
menubarItemViewSubtitles.onClick = event -> showSubtitles = menubarItemViewSubtitles.selected;
menubarItemViewSubtitles.selected = showSubtitles;
menubarItemViewWaveforms.onClick = event -> audioWaveforms.visible = menubarItemViewWaveforms.selected;
menubarItemViewWaveforms.selected = audioWaveforms.visible;
menubarItemDifficultyUp.onClick = _ -> incrementDifficulty(1);
menubarItemDifficultyDown.onClick = _ -> incrementDifficulty(-1);