mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-15 03:35:18 -05:00
adapt to minimize problem
This commit is contained in:
parent
93475ae8aa
commit
437cc68ba7
1 changed files with 11 additions and 3 deletions
|
@ -17,8 +17,18 @@ import funkin.play.notes.notekind.NoteKindManager;
|
|||
@:build(haxe.ui.ComponentBuilder.build("assets/exclude/data/ui/chart-editor/toolboxes/note-data.xml"))
|
||||
class ChartEditorNoteDataToolbox extends ChartEditorBaseToolbox
|
||||
{
|
||||
// 100 is the height used in note-data.xml
|
||||
static final DIALOG_HEIGHT:Int = 100;
|
||||
|
||||
// toolboxNotesGrid.height + 45
|
||||
// this is what i found out by printing this.height and grid.height
|
||||
// and then seeing that this.height is 100 and grid.height is 55
|
||||
static final HEIGHT_OFFSET:Int = 45;
|
||||
|
||||
// minimizing creates a gray bar the bottom, which would obscure the components,
|
||||
// which is why we use an extra offset of 20
|
||||
static final MINIMIZE_FIX:Int = 20;
|
||||
|
||||
var toolboxNotesGrid:Grid;
|
||||
var toolboxNotesNoteKind:DropDown;
|
||||
var toolboxNotesCustomKind:TextField;
|
||||
|
@ -176,9 +186,7 @@ class ChartEditorNoteDataToolbox extends ChartEditorBaseToolbox
|
|||
return;
|
||||
}
|
||||
|
||||
// toolboxNotesGrid.height + 45
|
||||
// this is what i found out is the calculation by printing this.height and grid.height
|
||||
var heightToSet:Int = Std.int(Math.max(DIALOG_HEIGHT, toolboxNotesGrid.height + 45));
|
||||
var heightToSet:Int = Std.int(Math.max(DIALOG_HEIGHT, toolboxNotesGrid.height + HEIGHT_OFFSET)) + MINIMIZE_FIX;
|
||||
if (this.height != heightToSet)
|
||||
{
|
||||
this.height = heightToSet;
|
||||
|
|
Loading…
Reference in a new issue