Mercurial > repos > tabletprog
diff modules/ui.tp @ 376:d61b1f0e1936
Some minor WIP stuff in UI module
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 15 Aug 2015 22:45:24 -0700 |
parents | b8f721bde066 |
children |
line wrap: on
line diff
--- a/modules/ui.tp Fri Aug 14 23:08:54 2015 -0700 +++ b/modules/ui.tp Sat Aug 15 22:45:24 2015 -0700 @@ -232,6 +232,7 @@ if: (_checkInitSDL: ) { _wind <- sdl createWindow: title pos: x y size: width height flags: 0u32 _wind value: :window { + _visibleWindows <- self | _visibleWindows _renderer <- window createRenderer: -1 flags: ((window renderOpts) accelerated) layout: draw: @@ -407,7 +408,12 @@ _handlers ifget: (event type) :handler { handler: event } else: { - print: "Unhandled event type: " . (event type) . "\n" + + if: (event type) = ((sdl eventTypes) mouseMotion) { + print: "Window ID: " . (event windowID) . ", x: " . (event x) . ", y: " . (event y) . "\n" + } else: { + print: "Unhandled event type: " . (event type) . "\n" + } } } none: {} }