mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-05-06 06:54:47 +00:00
This bug took me like 4-5 hours of staring at code to fix i am going crazy graaaa
This commit is contained in:
parent
4375dfd13a
commit
027c2843f4
|
@ -1958,7 +1958,6 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
buildGrid();
|
buildGrid();
|
||||||
buildMeasureTicks();
|
buildMeasureTicks();
|
||||||
buildNotePreview();
|
buildNotePreview();
|
||||||
buildSelectionBox();
|
|
||||||
|
|
||||||
buildAdditionalUI();
|
buildAdditionalUI();
|
||||||
populateOpenRecentMenu();
|
populateOpenRecentMenu();
|
||||||
|
@ -2287,17 +2286,6 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
setNotePreviewViewportBounds(calculateNotePreviewViewportBounds());
|
setNotePreviewViewportBounds(calculateNotePreviewViewportBounds());
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildSelectionBox():Void
|
|
||||||
{
|
|
||||||
if (selectionBoxSprite == null) throw 'ERROR: Tried to build selection box, but selectionBoxSprite is null! Check ChartEditorThemeHandler.updateTheme().';
|
|
||||||
|
|
||||||
selectionBoxSprite.scrollFactor.set(0, 0);
|
|
||||||
add(selectionBoxSprite);
|
|
||||||
selectionBoxSprite.zIndex = 30;
|
|
||||||
|
|
||||||
setSelectionBoxBounds();
|
|
||||||
}
|
|
||||||
|
|
||||||
function setSelectionBoxBounds(bounds:FlxRect = null):Void
|
function setSelectionBoxBounds(bounds:FlxRect = null):Void
|
||||||
{
|
{
|
||||||
if (selectionBoxSprite == null)
|
if (selectionBoxSprite == null)
|
||||||
|
@ -2319,6 +2307,19 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Automatically goes through and calls render on everything you added.
|
||||||
|
*/
|
||||||
|
override public function draw():Void
|
||||||
|
{
|
||||||
|
if (selectionBoxStartPos != null)
|
||||||
|
{
|
||||||
|
trace('selectionBoxSprite: ${selectionBoxSprite.visible} ${selectionBoxSprite.exists} ${this.members.contains(selectionBoxSprite)}');
|
||||||
|
}
|
||||||
|
|
||||||
|
super.draw();
|
||||||
|
}
|
||||||
|
|
||||||
function calculateNotePreviewViewportBounds():FlxRect
|
function calculateNotePreviewViewportBounds():FlxRect
|
||||||
{
|
{
|
||||||
var bounds:FlxRect = new FlxRect();
|
var bounds:FlxRect = new FlxRect();
|
||||||
|
|
|
@ -317,6 +317,12 @@ class ChartEditorThemeHandler
|
||||||
ChartEditorState.GRID_SIZE
|
ChartEditorState.GRID_SIZE
|
||||||
- (2 * SELECTION_SQUARE_BORDER_WIDTH + 8)),
|
- (2 * SELECTION_SQUARE_BORDER_WIDTH + 8)),
|
||||||
32, 32);
|
32, 32);
|
||||||
|
|
||||||
|
state.selectionBoxSprite.scrollFactor.set(0, 0);
|
||||||
|
state.selectionBoxSprite.zIndex = 30;
|
||||||
|
state.add(state.selectionBoxSprite);
|
||||||
|
|
||||||
|
state.setSelectionBoxBounds();
|
||||||
}
|
}
|
||||||
|
|
||||||
static function updateNotePreview(state:ChartEditorState):Void
|
static function updateNotePreview(state:ChartEditorState):Void
|
||||||
|
|
Loading…
Reference in a new issue