Пример #1
0
def load():
    """ Load the menu """
    # Modules
    graph.set_camera_position(geometry.Vector3(16, 16, 16))
    graph.set_camera_rotation(64, 0)
    events.connect(EVENT_MOUSE_MOVED_RELATIVE, rotate_camera)
    events.connect(EVENT_MOUSE_BUTTON_PRESSED, destroy_block)
    switch_mouse_lock()

    # Cursor
    global cursor
    cursor = graph.Sprite(IMG_POINTER, 32, 32)
    on_window_resize(window.get_size()[0], window.get_size()[1])
    events.connect(EVENT_RESIZED, on_window_resize)
Пример #2
0
def init_events():
    """ Initialize the events module """
    events.set_window(window.get_window())
    events.connect(EVENT_RESIZED, graph.set_right_bottom)