Module catan.gui
Graphical User Interface for the Catan game logic back-end.
Defines callbacks for LÖVE
Functions
load () | Callback triggered once at the beginning of the game. |
draw () | Callback used to draw on the screen every frame. |
mousepressed (x, y, button) | Callback triggered when a mouse button is pressed. |
mousemoved (x, y) | Callback triggered when the mouse is moved. |
update (dt) | Callback used to update the state of the game every frame. |
keypressed (key) | Callback triggered when a key is pressed. |
Functions
- load ()
-
Callback triggered once at the beginning of the game.
See also:
- draw ()
-
Callback used to draw on the screen every frame.
See also:
- mousepressed (x, y, button)
-
Callback triggered when a mouse button is pressed.
Parameters:
- x number Mouse x position, in pixels
- y number Mouse y position, in pixels
- button number The button index that was pressed. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependent.
See also:
- mousemoved (x, y)
-
Callback triggered when the mouse is moved.
Parameters:
- x number Mouse x position, in pixels
- y number Mouse y position, in pixels
See also:
- update (dt)
-
Callback used to update the state of the game every frame.
Parameters:
- dt number Time since the last update in seconds.
See also:
- keypressed (key)
-
Callback triggered when a key is pressed.
Parameters:
- key string Character of the pressed key.
See also: