Create and return a Canvas within a JFrame using a bunch of optional settings and callbacks with one function.
In Leiningen:
[super-simple-window "0.1.0"]
There's just one function, new-super-simple-window
.
(new-super-simple-window {:title "Bad example"
:on-render my-render-fn
:on-key-press my-keypress-handler}))
Create and return a Canvas within a JFrame using a bunch of optional settings and callbacks. Options:
:title | Exactly what it sounds like. Defaults to \"Super simple window\". |
:width | The width of the Canvas within the window. Defaults to 640. |
:height | The height of the Canvas within the window. Defaults to 480. |
:fps | How often the timer (if used) runs. Defaults to 30. |
:on-key-press | Callback that receives a KeyEvent object. |
:on-mouse-move | Callback that receives a MouseEvent object. |
:on-mouse-click | Callback that receives a MouseEvent object. |
:on-render | Callback that receives a Graphics object. |
:on-timer | Callback that receives an ActionEvent object. |
Copyright © 2015 Trystan
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.