Mercurial > games > semicongine
diff semiconginev2/events.nim @ 1256:bfb75c934f4e
add: window focus handling, improve window api a bit
author | sam <sam@basx.dev> |
---|---|
date | Sun, 28 Jul 2024 17:33:41 +0700 |
parents | 56781cc0fc7c |
children |
line wrap: on
line diff
--- a/semiconginev2/events.nim Sun Jul 28 00:17:34 2024 +0700 +++ b/semiconginev2/events.nim Sun Jul 28 17:33:41 2024 +0700 @@ -5,6 +5,7 @@ KeyPressed, KeyReleased MousePressed, MouseReleased, MouseMoved, MouseWheel + GotFocus, LostFocus Key* {.size: sizeof(cint), pure.} = enum UNKNOWN Escape, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12 @@ -31,5 +32,9 @@ x*, y*: int of MouseWheel: amount*: float32 + of GotFocus: + discard + of LostFocus: + discard else: discard