1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-10-27 18:05:09 +00:00
Funkin/source/funkin/ui/haxeui/components/FunkinDropdown.hx
2023-09-12 23:37:07 -04:00

31 lines
579 B
Haxe

package funkin.ui.haxeui.components;
import haxe.ui.components.DropDown;
import funkin.input.Cursor;
import haxe.ui.events.MouseEvent;
/**
* A HaxeUI dropdown which:
* - Changes the current cursor when hovered over.
*/
class FunkinDropDown extends DropDown
{
public function new()
{
super();
this.onMouseOver = handleMouseOver;
this.onMouseOut = handleMouseOut;
}
private function handleMouseOver(event:MouseEvent)
{
Cursor.cursorMode = Pointer;
}
private function handleMouseOut(event:MouseEvent)
{
Cursor.cursorMode = Default;
}
}