UPBGE 0.3 - Mouse Cursors

Press Space to switch between all builtin Mouse Cursors.
03_Mouse_Cursors.blend (814.6 KB)

import bpy
import bge

cont = bge.logic.getCurrentController()
own = cont.owner
Space = cont.sensors['Keyboard']

cursors = ['DEFAULT', 'NONE', 'WAIT', 'CROSSHAIR', 'MOVE_X', 'MOVE_Y', 'KNIFE', 'TEXT', 'PAINT_BRUSH', 'PAINT_CROSS', 'DOT', 'ERASER', 'HAND', 'SCROLL_X', 'SCROLL_Y', 'SCROLL_XY', 'EYEDROPPER', 'PICK_AREA', 'STOP', 'COPY', 'CROSS', 'MUTE', 'ZOOM_IN', 'ZOOM_OUT']


if Space.positive:
    text=cursors[own['index']%len(cursors)]
    own['Cursor']= text
    bpy.context.window.cursor_set(text)
    own['index']+=1

0.5 also has ‘HAND_POINT’ and ‘HAND_CLOSED’
https://upbge.org/#/documentation/docs/latest/api/bpy_types_enum_items/window_cursor_items.html#rna-enum-window-cursor-items

2 Likes