2023-09-12 22:37:59 +00:00
|
|
|
package funkin.ui.haxeui.components;
|
|
|
|
|
|
|
|
import funkin.input.Cursor;
|
|
|
|
import haxe.ui.events.MouseEvent;
|
|
|
|
import haxe.ui.containers.menus.MenuBar;
|
|
|
|
import haxe.ui.core.CompositeBuilder;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A HaxeUI menu bar which:
|
|
|
|
* - Changes the current cursor when each button is hovered over.
|
|
|
|
*/
|
|
|
|
class FunkinMenuBar extends MenuBar
|
|
|
|
{
|
|
|
|
public function new()
|
|
|
|
{
|
|
|
|
super();
|
|
|
|
|
|
|
|
registerListeners();
|
|
|
|
}
|
|
|
|
|
2023-09-12 23:40:58 +00:00
|
|
|
private function registerListeners():Void {}
|
2023-09-12 22:37:59 +00:00
|
|
|
|
|
|
|
private function handleMouseOver(event:MouseEvent)
|
|
|
|
{
|
|
|
|
Cursor.cursorMode = Pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
private function handleMouseOut(event:MouseEvent)
|
|
|
|
{
|
|
|
|
Cursor.cursorMode = Default;
|
|
|
|
}
|
|
|
|
}
|