Mercurial > games > semicongine
comparison src/zamikongine/events.nim @ 499:3f1111f3b9f8
did: tons of stuff, input, refactoring, fix some errors, some template improvment, sorry for super-commit
| author | Sam <sam@basx.dev> |
|---|---|
| date | Wed, 18 Jan 2023 09:52:03 +0700 |
| parents | 14e5151f68d1 |
| children |
comparison
equal
deleted
inserted
replaced
| 498:2fa8e418deae | 499:3f1111f3b9f8 |
|---|---|
| 1 type | 1 type |
| 2 EventType* = enum | 2 EventType* = enum |
| 3 Quit | 3 Quit |
| 4 ResizedWindow | 4 ResizedWindow |
| 5 KeyDown | 5 KeyPressed, KeyReleased |
| 6 KeyUp | 6 MousePressed, MouseReleased, MouseMoved, |
| 7 Key* = enum | 7 Key* {.size: sizeof(cint), pure.} = enum |
| 8 UNKNOWN | 8 UNKNOWN |
| 9 Escape, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12 | |
| 10 NumberRowExtra1, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `0`, NumberRowExtra2, NumberRowExtra3 # tilde, minus, plus | |
| 9 A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z | 11 A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z |
| 10 a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z | 12 Tab, CapsLock, ShiftL, ShiftR, CtrlL, CtrlR, SuperL, SuperR, AltL, AltR, Space, Enter, Backspace |
| 11 `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `0` | 13 LetterRow1Extra1, LetterRow1Extra2, LetterRow1Extra3 # open bracket, close brackt, backslash |
| 12 Minus, Plus, Underscore, Equals, Space, Enter, Backspace, Tab | 14 LetterRow2Extra1, LetterRow2Extra2 # semicolon, quote |
| 13 Comma, Period, Semicolon, Colon, | 15 LetterRow3Extra1, LetterRow3Extra2, LetterRow3Extra3 # comma, period, slash |
| 14 Escape, CtrlL, ShirtL, AltL, CtrlR, ShirtR, AltR | 16 Up, Down, Left, Right |
| 17 PageUp, PageDown, Home, End, Insert, Delete | |
| 18 MouseButton* {.size: sizeof(cint), pure.} = enum | |
| 19 UNKNOWN, Mouse1, Mouse2, Mouse3 | |
| 15 Event* = object | 20 Event* = object |
| 16 case eventType*: EventType | 21 case eventType*: EventType |
| 17 of KeyDown, KeyUp: | 22 of KeyPressed, KeyReleased: |
| 18 key*: Key | 23 key*: Key |
| 24 of MousePressed, MouseReleased: | |
| 25 button*: MouseButton | |
| 26 of MouseMoved: | |
| 27 x*, y*: int | |
| 19 else: | 28 else: |
| 20 discard | 29 discard |
