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:
parent
b4058fd7b0
commit
ccbae3da7d
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue