mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-12 08:25:13 +00:00
64 lines
1.8 KiB
Haxe
64 lines
1.8 KiB
Haxe
|
package funkin.ui.debug.charting.toolboxes;
|
||
|
|
||
|
import funkin.play.character.BaseCharacter.CharacterType;
|
||
|
import funkin.play.character.CharacterData;
|
||
|
import funkin.data.stage.StageData;
|
||
|
import funkin.data.stage.StageRegistry;
|
||
|
import funkin.ui.debug.charting.commands.ChangeStartingBPMCommand;
|
||
|
import funkin.ui.debug.charting.util.ChartEditorDropdowns;
|
||
|
import haxe.ui.components.Button;
|
||
|
import haxe.ui.components.CheckBox;
|
||
|
import haxe.ui.components.DropDown;
|
||
|
import haxe.ui.components.HorizontalSlider;
|
||
|
import haxe.ui.components.Label;
|
||
|
import haxe.ui.components.NumberStepper;
|
||
|
import haxe.ui.components.Slider;
|
||
|
import haxe.ui.components.TextField;
|
||
|
import funkin.play.stage.Stage;
|
||
|
import haxe.ui.containers.Box;
|
||
|
import haxe.ui.containers.Frame;
|
||
|
import haxe.ui.events.UIEvent;
|
||
|
|
||
|
/**
|
||
|
* The toolbox which allows modifying information like Song Title, Scroll Speed, Characters/Stages, and starting BPM.
|
||
|
*/
|
||
|
// @:nullSafety // TODO: Fix null safety when used with HaxeUI build macros.
|
||
|
@:access(funkin.ui.debug.charting.ChartEditorState)
|
||
|
@:build(haxe.ui.ComponentBuilder.build("assets/exclude/data/ui/chart-editor/toolboxes/offsets.xml"))
|
||
|
class ChartEditorOffsetsToolbox extends ChartEditorBaseToolbox
|
||
|
{
|
||
|
public function new(chartEditorState2:ChartEditorState)
|
||
|
{
|
||
|
super(chartEditorState2);
|
||
|
|
||
|
initialize();
|
||
|
|
||
|
this.onDialogClosed = onClose;
|
||
|
}
|
||
|
|
||
|
function onClose(event:UIEvent)
|
||
|
{
|
||
|
chartEditorState.menubarItemToggleToolboxOffsets.selected = false;
|
||
|
}
|
||
|
|
||
|
function initialize():Void
|
||
|
{
|
||
|
// Starting position.
|
||
|
// TODO: Save and load this.
|
||
|
this.x = 150;
|
||
|
this.y = 250;
|
||
|
|
||
|
refresh();
|
||
|
}
|
||
|
|
||
|
public override function refresh():Void
|
||
|
{
|
||
|
super.refresh();
|
||
|
}
|
||
|
|
||
|
public static function build(chartEditorState:ChartEditorState):ChartEditorOffsetsToolbox
|
||
|
{
|
||
|
return new ChartEditorOffsetsToolbox(chartEditorState);
|
||
|
}
|
||
|
}
|