-
Notifications
You must be signed in to change notification settings - Fork 1
display.items_frame documentation
BlocksPane
inner class representing area in which block is displayed and might interact with Pygame events.
-
pos
- position on which object displayed screen -
side_length
- side length of displayed block's texture -
block
- blocks that is displayed by object
Sets all properties to values of arguments of their name.
Handles left mouse button click on given position pos
from screen. If it overlaps with displayed object, returns the object. Otherwise returns None
.
Displays wrapped block on screen
on position equal to current pos
property value.
Class representing side pane with all blocks available for placing on board by player.
- board - game board, on which dragged blocks might be placed
- blocks - list of blocks available to place on board, which are displayed on side pane
- level_view -
gameplay.levelView
type object that blocks from blocks pane are transfered to while dragging. - item_areas - list of
gameplay.items_frame.BlocksPane.ItemArea
objects, used to display list of available blocks and interact with Pygame events. - inactive_index - index of element of
blocks
list to remember block, which is being dragged on a screen. - side_lenght - side length of each block displayed on blocks side pane.
Sets board
, blocks
and level_view
properties to values of arguments of their name. Sets rest of properties to None
.
Displays side pane with blocks available for dragging, where screen
is main application frame and side pane should be displayed in items_frame
, with each displayed blocks' side length of block_side_length
.
Handles left mouse button click with mouse pos
position on screen.
Method used to notify blocks pane, that dragged block was successfully placed on board.
Adds block
to list of blocks displayed on side pane. Given block should be one of blocks initially displayed by side blocks pane, and then placed on board and returned from it.
Replaces available blocks' list with new list blocks
.