class documentation
A simple scrollbar class for a GUI.
| Method | __del__ |
Clean up resources. |
| Method | __init__ |
Initialize the scrollbar with position, size, and colors. |
| Method | clear |
Clear the scrollbar. |
| Method | draw |
Draw the scrollbar. |
| Method | set |
Set the properties of the scrollbar. |
| Instance Variable | display |
Undocumented |
| Instance Variable | fill |
Undocumented |
| Instance Variable | is |
Undocumented |
| Instance Variable | outline |
Undocumented |
| Instance Variable | position |
Undocumented |
| Instance Variable | size |
Undocumented |
def __init__(self, draw, position, size, outline_color:
int = 0, fill_color: int = 16777215, is_horizontal: bool = False):
¶
Initialize the scrollbar with position, size, and colors.
| Parameters | |
draw:Draw | The drawing context to render the scrollbar. |
position:Vector | The position of the scrollbar. |
size:Vector | The size of the scrollbar. |
outlineint | The outline color. Defaults to 0x0000. |
fillint | The fill color. Defaults to 0xFFFFFF. |
isbool | Whether the scrollbar is horizontal. Defaults to False. |
def set_all(self, position, size, outline_color:
int, fill_color: int, is_horizontal: bool = False, should_draw: bool = True, should_clear: bool = True):
¶
Set the properties of the scrollbar.
| Parameters | |
position:Vector | The new position of the scrollbar. |
size:Vector | The new size of the scrollbar. |
outlineint | The new outline color. |
fillint | The new fill color. |
isbool | Whether the scrollbar is horizontal. Defaults to False. |
shouldbool | Whether to redraw after setting. Defaults to True. |
shouldbool | Whether to clear before setting. Defaults to True. |