1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-04 13:54:22 +00:00

Fix cursor modes on toolboxes.

This commit is contained in:
EliteMasterEric 2023-09-12 23:37:07 -04:00
parent 257fa2da6a
commit b42e4ceb67
4 changed files with 91 additions and 0 deletions

View file

@ -1,5 +1,6 @@
package funkin.ui.debug.charting; package funkin.ui.debug.charting;
import haxe.ui.components.HorizontalSlider;
import haxe.ui.containers.TreeView; import haxe.ui.containers.TreeView;
import haxe.ui.containers.TreeViewNode; import haxe.ui.containers.TreeViewNode;
import funkin.play.character.BaseCharacter.CharacterType; import funkin.play.character.BaseCharacter.CharacterType;

View file

@ -0,0 +1,30 @@
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;
}
}

View file

@ -0,0 +1,30 @@
package funkin.ui.haxeui.components;
import haxe.ui.components.NumberStepper;
import funkin.input.Cursor;
import haxe.ui.events.MouseEvent;
/**
* A HaxeUI number stepper which:
* - Changes the current cursor when hovered over.
*/
class FunkinNumberStepper extends NumberStepper
{
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;
}
}

View file

@ -0,0 +1,30 @@
package funkin.ui.haxeui.components;
import haxe.ui.components.TextField;
import funkin.input.Cursor;
import haxe.ui.events.MouseEvent;
/**
* A HaxeUI text field which:
* - Changes the current cursor when hovered over.
*/
class FunkinTextField extends TextField
{
public function new()
{
super();
this.onMouseOver = handleMouseOver;
this.onMouseOut = handleMouseOut;
}
private function handleMouseOver(event:MouseEvent)
{
Cursor.cursorMode = Text;
}
private function handleMouseOut(event:MouseEvent)
{
Cursor.cursorMode = Default;
}
}