-
Notifications
You must be signed in to change notification settings - Fork 0
Utilities
GolemNikidastrov edited this page Apr 21, 2026
·
1 revision
Global object for mouse interaction.
-
mouse.pos(NvVector2) — mouse coordinates. -
mouse.left_fdown(bool) — LMB was pressed exactly in this frame (First Down). -
mouse.left_down(bool) — LMB is being held down. -
mouse.left_up(bool) — LMB was released in this frame. -
mouse.any_wheel,mouse.wheel_up,mouse.wheel_down— mouse wheel state.
Global object for keyboard interaction.
-
keyboard.is_fdown(Keys.A)— Key 'A' was pressed in this frame. -
keyboard.is_down(Keys.Space)— Spacebar is being held down.
Global time object.
-
time.dt(float) — Delta time (time between frames). Multiply any movements by this for FPS independence. -
time.fps(int) — Current FPS.
Event subscription system.
from nevu_ui import NevuEvent, EventType
def my_callback():
print("Hovered!")
my_button.subscribe(NevuEvent(sender=my_button, function=my_callback, type=EventType.OnHover))Available types (EventType): OnHover, OnUnhover, OnKeyDown (click), OnKeyUp, OnChange, Update, Draw.