display.board_frame documentation - wladekpal/The-Lazy-Snek GitHub Wiki

BoardFrame

BoardFrame is a class used to handle board clicks in editor depending on which tool is selected.

Properties

  • editor_container - class holding the edited level

handle_add_block_tool_click(pos, active_id, editor_container)

Used to draw selected element on board.

handle_erase_tool_click(pos, active_id, editor_container)

Used to erase the highest element on field of board.

handle_snake_creator_tool_click(pos, active_id, editor_container)

Used to draw snake on board.

handle_snake_rotate_head_tool_click(pos, active_id, editor_container)

Used to rotate head of the clicked snake.

handle_snake_change_color_tool_click(pos, active_id, editor_container)

Used to change color of the clicked snake.

handle_teleport_linker_tool_click(pos, active_id, editor_container)

Used to connect selected teleports.

handle_click(pos, active_tool, active_id, editor_container)

Depending on which tool is selected class executes on of the functions.

refresh()

Draw the created board of the level.