mouse_show¶
MiniLibX: mlx_mouse_show
Shows the mouse pointer again after mouse_hide.
Parameters¶
| Name | Type | Description |
|---|---|---|
mlx |
Mlx |
The connection from init |
win |
Window |
The window to show the pointer in |
Returns¶
None.
Raises¶
| Exception | When |
|---|---|
RuntimeError |
The window was closed: window is closed |
Notes¶
- Showing a pointer that's already visible does nothing.
- The pointer is visible by default in every new window.
Example¶
def toggle_pause(st):
st["paused"] = not st["paused"]
if st["paused"]:
malibx.mouse_show(mlx, win) # let the player click menus
else:
malibx.mouse_hide(mlx, win)