Widget Selection¶
Selection Effect¶
-
class
pygame_menu.widgets.core.
Selection
(margin_left, margin_right, margin_top, margin_bottom)[source]¶ Widget selection effect class.
Note
All selection classes must be copyable.
- Parameters
-
copy
()[source]¶ Creates a deep copy of the object.
- Return type
Selection
- Returns
Copied selection effect
-
get_height
()[source]¶ Return the selection height as sum of top and bottom margins.
- Return type
- Returns
Height in px
-
get_width
()[source]¶ Return the selection width as sum of left and right margins.
- Return type
- Returns
Width in px
Highlight Selection Effect¶
Left Arrow Selection Effect¶
-
class
pygame_menu.widgets.
LeftArrowSelection
(arrow_size=(10, 15), arrow_right_margin=5, arrow_vertical_offset=0, blink_ms=0)[source]¶ Bases:
pygame_menu.widgets.selection.arrow_selection.ArrowSelection
Widget selection left arrow class. Creates an arrow to the left of the selected Menu item.
- Parameters
arrow_size (
Tuple
[int
,int
]) – Size of arrow on x-axis and y-axis (width, height) in pxarrow_right_margin (
int
) – Distance from the arrow to the widgetarrow_vertical_offset (
int
) – Vertical offset of the arrowblink_ms (
Union
[int
,float
]) – Milliseconds between each blink, if0
blinking is disabled
None Selection Effect¶
Right Arrow Selection Effect¶
-
class
pygame_menu.widgets.
RightArrowSelection
(arrow_size=(10, 15), arrow_left_margin=3, arrow_vertical_offset=0, blink_ms=0)[source]¶ Bases:
pygame_menu.widgets.selection.arrow_selection.ArrowSelection
Widget selection right arrow class. Creates an arrow to the right of the selected Menu item.
- Parameters
arrow_size (
Tuple
[int
,int
]) – Size of arrow on x-axis and y-axis (width, height) in pxarrow_left_margin (
int
) – Distance from the arrow to the widgetarrow_vertical_offset (
int
) – Vertical offset of the arrowblink_ms (
Union
[int
,float
]) – Milliseconds between each blink, if0
blinking is disabled