From: Alexis Laferrière Date: Tue, 21 Feb 2017 20:53:42 +0000 (-0500) Subject: gamnit: update doc X-Git-Url: http://nitlanguage.org gamnit: update doc Signed-off-by: Alexis Laferrière --- diff --git a/lib/gamnit/README.md b/lib/gamnit/README.md index a9882df..5b12210 100644 --- a/lib/gamnit/README.md +++ b/lib/gamnit/README.md @@ -9,7 +9,13 @@ To compile the _gamnit_ apps packaged with the Nit repositoy on GNU/Linux you ne Under Debian 8.2, this command should install everything needed: ~~~ -apt-get install libgles2-mesa-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev inkscape mpg123 +apt-get install libgles2-mesa-dev libsdl2-dev libsdl2-image-dev inkscape mpg123 +~~~ + +Under Windows 64 bits, using msys2, you can install the required packages with: + +~~~ +pacman -S mingw-w64-x86_64-angleproject-git mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image ~~~ # Services by submodules diff --git a/lib/gamnit/gamnit.nit b/lib/gamnit/gamnit.nit index 3601d5f..41bfb37 100644 --- a/lib/gamnit/gamnit.nit +++ b/lib/gamnit/gamnit.nit @@ -68,13 +68,14 @@ redef class App # The implementation varies per platform. private fun feed_events do end - # Main method to receive `InputEvent` produced by the system + # Hook to receive and respond to `event` triggered by the user or system # # Returns whether or not the event is used or intercepted. # If `true`, the event will not be processed further by the system. # Returns `false` to intercepts events like the back key on mobile devices. # - # This method should be refined by client modules to react to user inputs. + # The instances passed as `event` may be freed (or overwritten), + # right after this method returns. They should not be preserved. fun accept_event(event: InputEvent): Bool do return false end