Note
This module and its documentation is still a work in progress.
GUI Widgets
Bases: gui.widgets.NumberInput
Extra arguments: :type step_size: number :param step_size: Amount to add per pixel on mouse_dragged.
Bases: gui.widgets.TextInput
Extra arguments: :type convert_func: function :param convert_func:
Used to convert the string input to a number
Parameters: |
|
---|
Bases: gui.base.Widget
Unvisible Widget to define click areas.
Bases: gui.base.Layer
Bases: gui.base.Layer
Scrollable Layer. Not yet for productive use!
Use the scroll_size property to set the scrolled area (ie. what you can reach by scrolling)
Parameter: | p (int) – Relative horizontal position, between 0 and 100 |
---|
Parameter: | p (int) – Relative vertical position, between 0 and 100 |
---|
Parameter: | new_x (int) – Absolute horizontal position to scroll to |
---|
Parameter: | new_y (int) – Absolute vertical position to scroll to |
---|
Parameter: | offset (int) – amount to scroll to the right |
---|
Scroll the layer horizontally.
Parameter: | offset (int) – amount to scroll down |
---|
Scroll the layer vertically.
Bases: gui.base.Widget
Parameters: |
|
---|
Bases: gui.base.Widget
Bases: gui.base.Layer
Bases: gui.base.Layer
Parameter: | body (gui.base.Layer) – A Layer to use as body. This allows you to use child classes of Layer, eg. ScrolledLayer |
---|
Bases: gui.base.Widget
In addition to the default Widget parameters and events, this widget provides the following:
Parameters: |
|
---|
Parameter: | line (String) – One line of text to render. |
---|---|
Return type: | pygame.Surface |
Returns: | The rendered text. |
Render a line of text.
Bases: gui.widgets.Text
An editable text widget. Extra arguments: :type multiline: boolean :param multiline:
If True (default), newlines are allowed.
Extra events:
Bases: gui.base.Layer