| | |
- builtins.object
-
- GeneralUI
- Options
- pygame_gui.elements.ui_window.UIWindow(pygame_gui.core.ui_element.UIElement, pygame_gui.core.interfaces.container_interface.IContainerLikeInterface, pygame_gui.core.interfaces.window_interface.IWindowInterface)
-
- UIMessageWindow
- UIRotateWindow
- UISaveFile
- UIScaleWindow
- UIToolbarWindow
- UITranslateWindow
class Options(builtins.object) |
| |
Options(width, height)
|
| |
Methods defined here:
- __init__(self, width, height)
- Initialize self. See help(type(self)) for accurate signature.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class UIMessageWindow(pygame_gui.elements.ui_window.UIWindow) |
| |
UIMessageWindow(rect, ui_manager, c_draw, c_update, c_status, options, title, message)
A base class for window GUI elements, any windows should inherit from this class.
:param rect: A rectangle, representing size and position of the window (including title bar,
shadow and borders).
:param manager: The UIManager that manages this UIWindow.
:param window_display_title: A string that will appear in the windows title bar if it has one.
:param element_id: An element ID for this window, if one is not supplied it defaults to
'window'.
:param object_id: An optional object ID for this window, useful for distinguishing different
windows.
:param resizable: Whether this window is resizable or not, defaults to False.
:param visible: Whether the element is visible by default. Warning - container visibility may
override this. |
| |
- Method resolution order:
- UIMessageWindow
- pygame_gui.elements.ui_window.UIWindow
- pygame_gui.core.ui_element.UIElement
- pygame_gui.core.layered_gui_group.GUISprite
- pygame_gui.core.interfaces.element_interface.IUIElementInterface
- pygame_gui.core.interfaces.container_interface.IContainerLikeInterface
- pygame_gui.core.interfaces.window_interface.IWindowInterface
- builtins.object
Methods defined here:
- __init__(self, rect, ui_manager, c_draw, c_update, c_status, options, title, message)
- Initialize self. See help(type(self)) for accurate signature.
- event(self, event)
- update(self, time_delta)
- A method called every update cycle of our application. Designed to be overridden by
derived classes but also has a little functionality to make sure the window's layer
'thickness' is accurate and to handle window resizing.
:param time_delta: time passed in seconds between one call to this method and the next.
Data and other attributes defined here:
- __abstractmethods__ = frozenset()
Methods inherited from pygame_gui.elements.ui_window.UIWindow:
- can_hover(self) -> bool
- Called to test if this window can be hovered.
- change_layer(self, new_layer: int)
- Move this window, and it's contents, to a new layer in the UI.
:param new_layer: The layer to move to.
- check_clicked_inside_or_blocking(self, event: <built-in function Event>) -> bool
- A quick event check outside of the normal event processing so that this window is brought
to the front of the window stack if we click on any of the elements contained within it.
:param event: The event to check.
:return: returns True if the event represents a click inside this window or the window
is blocking.
- check_hover(self, time_delta: float, hovered_higher_element: bool) -> bool
- For the window the only hovering we care about is the edges if this is a resizable window.
:param time_delta: time passed in seconds between one call to this method and the next.
:param hovered_higher_element: Have we already hovered an element/window above this one.
- disable(self)
- Disables the window and it's contents so it is no longer interactive.
- enable(self)
- Enables the window and it's contents so it is interactive again.
- get_container(self) -> pygame_gui.core.interfaces.container_interface.IUIContainerInterface
- Returns the container that should contain all the UI elements in this window.
:return UIContainer: The window's container.
- get_hovering_edge_id(self) -> str
- Gets the ID of the combination of edges we are hovering for use by the cursor system.
:return: a string containing the edge combination ID (e.g. xy,yx,xl,xr,yt,yb)
- get_top_layer(self) -> int
- Returns the 'highest' layer used by this window so that we can correctly place other
windows on top of it.
:return: The top layer for this window as a number (greater numbers are higher layers).
- hide(self)
- In addition to the base UIElement.hide() - hide the _window_root_container which will
propagate and hide all the children.
- kill(self)
- Overrides the basic kill() method of a pygame sprite so that we also kill all the UI
elements in this window, and remove if from the window stack.
- on_moved_to_front(self)
- Called when a window is moved to the front of the stack.
- process_event(self, event: <built-in function Event>) -> bool
- Handles resizing & closing windows. Gives UI Windows access to pygame events. Derived
windows should super() call this class if they implement their own process_event method.
:param event: The event to process.
:return bool: Return True if this element should consume this event and not pass it to the
rest of the UI.
- rebuild(self)
- Rebuilds the window when the theme has changed.
- rebuild_from_changed_theme_data(self)
- Called by the UIManager to check the theming data and rebuild whatever needs rebuilding
for this element when the theme data has changed.
- set_blocking(self, state: bool)
- Sets whether this window being open should block clicks to the rest of the UI or not.
Defaults to False.
:param state: True if this window should block mouse clicks.
- set_dimensions(self, dimensions: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Set the size of this window and then re-sizes and shifts the contents of the windows
container to fit the new size.
:param dimensions: The new dimensions to set.
- set_display_title(self, new_title: str)
- Set the title of the window.
:param new_title: The title to set.
- set_minimum_dimensions(self, dimensions: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- If this window is resizable, then the dimensions we set here will be the minimum that
users can change the window to. They are also used as the minimum size when
'set_dimensions' is called.
:param dimensions: The new minimum dimension for the window.
- set_position(self, position: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Method to directly set the absolute screen rect position of an element.
:param position: The new position to set.
- set_relative_position(self, position: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Method to directly set the relative rect position of an element.
:param position: The new position to set.
- should_use_window_edge_resize_cursor(self) -> bool
- Returns true if this window is in a state where we should display one of the resizing
cursors
:return: True if a resizing cursor is needed.
- show(self)
- In addition to the base UIElement.show() - show the _window_root_container which will
propagate and show all the children.
Methods inherited from pygame_gui.core.ui_element.UIElement:
- focus(self)
- A stub to override. Called when we focus this UI element.
- get_abs_rect(self) -> pygame.Rect
- The absolute positioning rect.
:return: A pygame rect.
- get_element_ids(self) -> List[str]
- A list of all the element IDs in this element's theming/event hierarchy.
:return: a list of strings, one ofr each element in the hierarchy.
- get_focus_set(self) -> Set[ForwardRef('UIElement')]
- Return the set of elements to focus when we focus this element.
- get_image_clipping_rect(self) -> Union[pygame.Rect, NoneType]
- Obtain the current image clipping rect.
:return: The current clipping rect. May be None.
- get_relative_rect(self) -> pygame.Rect
- The relative positioning rect.
:return: A pygame rect.
- get_starting_height(self) -> int
- Get the starting layer height of this element. (i.e. the layer we start placing it on
*above* it's container, it may use more layers above this layer)
:return: an integer representing the starting layer height.
- hover_point(self, hover_x: float, hover_y: float) -> bool
- Test if a given point counts as 'hovering' this UI element. Normally that is a
straightforward matter of seeing if a point is inside the rectangle. Occasionally it
will also check if we are in a wider zone around a UI element once it is already active,
this makes it easier to move scroll bars and the like.
:param hover_x: The x (horizontal) position of the point.
:param hover_y: The y (vertical) position of the point.
:return: Returns True if we are hovering this element.
- join_focus_sets(self, element: 'UIElement')
- Join this element's focus set with another's.
:param element: The other element whose focus set we are joining with.
- on_fresh_drawable_shape_ready(self)
- Called when our drawable shape has finished rebuilding the active surface. This is needed
because sometimes we defer rebuilding until a more advantageous (read quieter) moment.
- on_hovered(self)
- A stub to override. Called when this UI element first enters the 'hovered' state.
- on_unhovered(self)
- A stub to override. Called when this UI element leaves the 'hovered' state.
- remove_element_from_focus_set(self, element)
- remove an element from this sets focus group.
:param element: The element to remove.
- set_focus_set(self, focus_set: Set[ForwardRef('UIElement')])
- Set the focus set to a specific set of elements.
:param focus_set: The focus set to set.
- set_image(self, new_image: Union[pygame.Surface, NoneType])
- Wraps setting the image variable of this element so that we also set the current image
clip on the image at the same time.
:param new_image: The new image to set.
- set_image_clip(self, rect: Union[pygame.Rect, NoneType])
- Sets a clipping rectangle on this element's image determining what portion of it will
actually be displayed when this element is blitted to the screen.
:param rect: A clipping rectangle, or None to clear the clip.
- set_visual_debug_mode(self, activate_mode: bool)
- Enables a debug mode for the element which displays layer information on top of it in
a tiny font.
:param activate_mode: True or False to enable or disable the mode.
- unfocus(self)
- A stub to override. Called when we stop focusing this UI element.
- update_containing_rect_position(self)
- Updates the position of this element based on the position of it's container. Usually
called when the container has moved.
- while_hovering(self, time_delta: float, mouse_pos: pygame.math.Vector2)
- A stub method to override. Called when this UI element is currently hovered.
:param time_delta: A float, the time in seconds between the last call to this function
and now (roughly).
:param mouse_pos: The current position of the mouse as 2D Vector.
Methods inherited from pygame_gui.core.layered_gui_group.GUISprite:
- __repr__(self)
- Return repr(self).
- add(self, *groups)
- add the sprite to groups
Sprite.add(*groups): return None
Any number of Group instances can be passed as arguments. The
Sprite will be added to the Groups it is not already a member of.
- add_internal(self, group)
- For adding this sprite to a group internally.
:param group: The group we are adding to.
- alive(self)
- does the sprite belong to any groups
Sprite.alive(): return bool
Returns True when the Sprite belongs to one or more Groups.
- groups(self)
- list of Groups that contain this Sprite
Sprite.groups(): return group_list
Returns a list of all the Groups that contain this Sprite.
- remove(self, *groups)
- remove the sprite from groups
Sprite.remove(*groups): return None
Any number of Group instances can be passed as arguments. The Sprite
will be removed from the Groups it is currently a member of.
- remove_internal(self, group)
- For removing this sprite from a group internally.
:param group: The group we are removing from.
Data descriptors inherited from pygame_gui.core.layered_gui_group.GUISprite:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- blendmode
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- image
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- layer
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- rect
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- visible
- You can make this sprite disappear without removing it from the group
assign 0 for invisible and 1 for visible
|
class UIRotateWindow(pygame_gui.elements.ui_window.UIWindow) |
| |
UIRotateWindow(rect, ui_manager, c_draw, c_update, c_status, options)
A base class for window GUI elements, any windows should inherit from this class.
:param rect: A rectangle, representing size and position of the window (including title bar,
shadow and borders).
:param manager: The UIManager that manages this UIWindow.
:param window_display_title: A string that will appear in the windows title bar if it has one.
:param element_id: An element ID for this window, if one is not supplied it defaults to
'window'.
:param object_id: An optional object ID for this window, useful for distinguishing different
windows.
:param resizable: Whether this window is resizable or not, defaults to False.
:param visible: Whether the element is visible by default. Warning - container visibility may
override this. |
| |
- Method resolution order:
- UIRotateWindow
- pygame_gui.elements.ui_window.UIWindow
- pygame_gui.core.ui_element.UIElement
- pygame_gui.core.layered_gui_group.GUISprite
- pygame_gui.core.interfaces.element_interface.IUIElementInterface
- pygame_gui.core.interfaces.container_interface.IContainerLikeInterface
- pygame_gui.core.interfaces.window_interface.IWindowInterface
- builtins.object
Methods defined here:
- __init__(self, rect, ui_manager, c_draw, c_update, c_status, options)
- Initialize self. See help(type(self)) for accurate signature.
- applyRotate(self)
- event(self, event)
- mapFromTo(self, x, a, b, c, d)
- statusAutomaticRotate(self, status)
- update(self, time_delta)
- A method called every update cycle of our application. Designed to be overridden by
derived classes but also has a little functionality to make sure the window's layer
'thickness' is accurate and to handle window resizing.
:param time_delta: time passed in seconds between one call to this method and the next.
Data and other attributes defined here:
- __abstractmethods__ = frozenset()
Methods inherited from pygame_gui.elements.ui_window.UIWindow:
- can_hover(self) -> bool
- Called to test if this window can be hovered.
- change_layer(self, new_layer: int)
- Move this window, and it's contents, to a new layer in the UI.
:param new_layer: The layer to move to.
- check_clicked_inside_or_blocking(self, event: <built-in function Event>) -> bool
- A quick event check outside of the normal event processing so that this window is brought
to the front of the window stack if we click on any of the elements contained within it.
:param event: The event to check.
:return: returns True if the event represents a click inside this window or the window
is blocking.
- check_hover(self, time_delta: float, hovered_higher_element: bool) -> bool
- For the window the only hovering we care about is the edges if this is a resizable window.
:param time_delta: time passed in seconds between one call to this method and the next.
:param hovered_higher_element: Have we already hovered an element/window above this one.
- disable(self)
- Disables the window and it's contents so it is no longer interactive.
- enable(self)
- Enables the window and it's contents so it is interactive again.
- get_container(self) -> pygame_gui.core.interfaces.container_interface.IUIContainerInterface
- Returns the container that should contain all the UI elements in this window.
:return UIContainer: The window's container.
- get_hovering_edge_id(self) -> str
- Gets the ID of the combination of edges we are hovering for use by the cursor system.
:return: a string containing the edge combination ID (e.g. xy,yx,xl,xr,yt,yb)
- get_top_layer(self) -> int
- Returns the 'highest' layer used by this window so that we can correctly place other
windows on top of it.
:return: The top layer for this window as a number (greater numbers are higher layers).
- hide(self)
- In addition to the base UIElement.hide() - hide the _window_root_container which will
propagate and hide all the children.
- kill(self)
- Overrides the basic kill() method of a pygame sprite so that we also kill all the UI
elements in this window, and remove if from the window stack.
- on_moved_to_front(self)
- Called when a window is moved to the front of the stack.
- process_event(self, event: <built-in function Event>) -> bool
- Handles resizing & closing windows. Gives UI Windows access to pygame events. Derived
windows should super() call this class if they implement their own process_event method.
:param event: The event to process.
:return bool: Return True if this element should consume this event and not pass it to the
rest of the UI.
- rebuild(self)
- Rebuilds the window when the theme has changed.
- rebuild_from_changed_theme_data(self)
- Called by the UIManager to check the theming data and rebuild whatever needs rebuilding
for this element when the theme data has changed.
- set_blocking(self, state: bool)
- Sets whether this window being open should block clicks to the rest of the UI or not.
Defaults to False.
:param state: True if this window should block mouse clicks.
- set_dimensions(self, dimensions: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Set the size of this window and then re-sizes and shifts the contents of the windows
container to fit the new size.
:param dimensions: The new dimensions to set.
- set_display_title(self, new_title: str)
- Set the title of the window.
:param new_title: The title to set.
- set_minimum_dimensions(self, dimensions: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- If this window is resizable, then the dimensions we set here will be the minimum that
users can change the window to. They are also used as the minimum size when
'set_dimensions' is called.
:param dimensions: The new minimum dimension for the window.
- set_position(self, position: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Method to directly set the absolute screen rect position of an element.
:param position: The new position to set.
- set_relative_position(self, position: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Method to directly set the relative rect position of an element.
:param position: The new position to set.
- should_use_window_edge_resize_cursor(self) -> bool
- Returns true if this window is in a state where we should display one of the resizing
cursors
:return: True if a resizing cursor is needed.
- show(self)
- In addition to the base UIElement.show() - show the _window_root_container which will
propagate and show all the children.
Methods inherited from pygame_gui.core.ui_element.UIElement:
- focus(self)
- A stub to override. Called when we focus this UI element.
- get_abs_rect(self) -> pygame.Rect
- The absolute positioning rect.
:return: A pygame rect.
- get_element_ids(self) -> List[str]
- A list of all the element IDs in this element's theming/event hierarchy.
:return: a list of strings, one ofr each element in the hierarchy.
- get_focus_set(self) -> Set[ForwardRef('UIElement')]
- Return the set of elements to focus when we focus this element.
- get_image_clipping_rect(self) -> Union[pygame.Rect, NoneType]
- Obtain the current image clipping rect.
:return: The current clipping rect. May be None.
- get_relative_rect(self) -> pygame.Rect
- The relative positioning rect.
:return: A pygame rect.
- get_starting_height(self) -> int
- Get the starting layer height of this element. (i.e. the layer we start placing it on
*above* it's container, it may use more layers above this layer)
:return: an integer representing the starting layer height.
- hover_point(self, hover_x: float, hover_y: float) -> bool
- Test if a given point counts as 'hovering' this UI element. Normally that is a
straightforward matter of seeing if a point is inside the rectangle. Occasionally it
will also check if we are in a wider zone around a UI element once it is already active,
this makes it easier to move scroll bars and the like.
:param hover_x: The x (horizontal) position of the point.
:param hover_y: The y (vertical) position of the point.
:return: Returns True if we are hovering this element.
- join_focus_sets(self, element: 'UIElement')
- Join this element's focus set with another's.
:param element: The other element whose focus set we are joining with.
- on_fresh_drawable_shape_ready(self)
- Called when our drawable shape has finished rebuilding the active surface. This is needed
because sometimes we defer rebuilding until a more advantageous (read quieter) moment.
- on_hovered(self)
- A stub to override. Called when this UI element first enters the 'hovered' state.
- on_unhovered(self)
- A stub to override. Called when this UI element leaves the 'hovered' state.
- remove_element_from_focus_set(self, element)
- remove an element from this sets focus group.
:param element: The element to remove.
- set_focus_set(self, focus_set: Set[ForwardRef('UIElement')])
- Set the focus set to a specific set of elements.
:param focus_set: The focus set to set.
- set_image(self, new_image: Union[pygame.Surface, NoneType])
- Wraps setting the image variable of this element so that we also set the current image
clip on the image at the same time.
:param new_image: The new image to set.
- set_image_clip(self, rect: Union[pygame.Rect, NoneType])
- Sets a clipping rectangle on this element's image determining what portion of it will
actually be displayed when this element is blitted to the screen.
:param rect: A clipping rectangle, or None to clear the clip.
- set_visual_debug_mode(self, activate_mode: bool)
- Enables a debug mode for the element which displays layer information on top of it in
a tiny font.
:param activate_mode: True or False to enable or disable the mode.
- unfocus(self)
- A stub to override. Called when we stop focusing this UI element.
- update_containing_rect_position(self)
- Updates the position of this element based on the position of it's container. Usually
called when the container has moved.
- while_hovering(self, time_delta: float, mouse_pos: pygame.math.Vector2)
- A stub method to override. Called when this UI element is currently hovered.
:param time_delta: A float, the time in seconds between the last call to this function
and now (roughly).
:param mouse_pos: The current position of the mouse as 2D Vector.
Methods inherited from pygame_gui.core.layered_gui_group.GUISprite:
- __repr__(self)
- Return repr(self).
- add(self, *groups)
- add the sprite to groups
Sprite.add(*groups): return None
Any number of Group instances can be passed as arguments. The
Sprite will be added to the Groups it is not already a member of.
- add_internal(self, group)
- For adding this sprite to a group internally.
:param group: The group we are adding to.
- alive(self)
- does the sprite belong to any groups
Sprite.alive(): return bool
Returns True when the Sprite belongs to one or more Groups.
- groups(self)
- list of Groups that contain this Sprite
Sprite.groups(): return group_list
Returns a list of all the Groups that contain this Sprite.
- remove(self, *groups)
- remove the sprite from groups
Sprite.remove(*groups): return None
Any number of Group instances can be passed as arguments. The Sprite
will be removed from the Groups it is currently a member of.
- remove_internal(self, group)
- For removing this sprite from a group internally.
:param group: The group we are removing from.
Data descriptors inherited from pygame_gui.core.layered_gui_group.GUISprite:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- blendmode
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- image
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- layer
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- rect
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- visible
- You can make this sprite disappear without removing it from the group
assign 0 for invisible and 1 for visible
|
class UISaveFile(pygame_gui.elements.ui_window.UIWindow) |
| |
UISaveFile(rect, ui_manager, c_draw, c_update, c_status, options)
A base class for window GUI elements, any windows should inherit from this class.
:param rect: A rectangle, representing size and position of the window (including title bar,
shadow and borders).
:param manager: The UIManager that manages this UIWindow.
:param window_display_title: A string that will appear in the windows title bar if it has one.
:param element_id: An element ID for this window, if one is not supplied it defaults to
'window'.
:param object_id: An optional object ID for this window, useful for distinguishing different
windows.
:param resizable: Whether this window is resizable or not, defaults to False.
:param visible: Whether the element is visible by default. Warning - container visibility may
override this. |
| |
- Method resolution order:
- UISaveFile
- pygame_gui.elements.ui_window.UIWindow
- pygame_gui.core.ui_element.UIElement
- pygame_gui.core.layered_gui_group.GUISprite
- pygame_gui.core.interfaces.element_interface.IUIElementInterface
- pygame_gui.core.interfaces.container_interface.IContainerLikeInterface
- pygame_gui.core.interfaces.window_interface.IWindowInterface
- builtins.object
Methods defined here:
- __init__(self, rect, ui_manager, c_draw, c_update, c_status, options)
- Initialize self. See help(type(self)) for accurate signature.
- event(self, event)
- update(self, time_delta)
- A method called every update cycle of our application. Designed to be overridden by
derived classes but also has a little functionality to make sure the window's layer
'thickness' is accurate and to handle window resizing.
:param time_delta: time passed in seconds between one call to this method and the next.
Data and other attributes defined here:
- __abstractmethods__ = frozenset()
Methods inherited from pygame_gui.elements.ui_window.UIWindow:
- can_hover(self) -> bool
- Called to test if this window can be hovered.
- change_layer(self, new_layer: int)
- Move this window, and it's contents, to a new layer in the UI.
:param new_layer: The layer to move to.
- check_clicked_inside_or_blocking(self, event: <built-in function Event>) -> bool
- A quick event check outside of the normal event processing so that this window is brought
to the front of the window stack if we click on any of the elements contained within it.
:param event: The event to check.
:return: returns True if the event represents a click inside this window or the window
is blocking.
- check_hover(self, time_delta: float, hovered_higher_element: bool) -> bool
- For the window the only hovering we care about is the edges if this is a resizable window.
:param time_delta: time passed in seconds between one call to this method and the next.
:param hovered_higher_element: Have we already hovered an element/window above this one.
- disable(self)
- Disables the window and it's contents so it is no longer interactive.
- enable(self)
- Enables the window and it's contents so it is interactive again.
- get_container(self) -> pygame_gui.core.interfaces.container_interface.IUIContainerInterface
- Returns the container that should contain all the UI elements in this window.
:return UIContainer: The window's container.
- get_hovering_edge_id(self) -> str
- Gets the ID of the combination of edges we are hovering for use by the cursor system.
:return: a string containing the edge combination ID (e.g. xy,yx,xl,xr,yt,yb)
- get_top_layer(self) -> int
- Returns the 'highest' layer used by this window so that we can correctly place other
windows on top of it.
:return: The top layer for this window as a number (greater numbers are higher layers).
- hide(self)
- In addition to the base UIElement.hide() - hide the _window_root_container which will
propagate and hide all the children.
- kill(self)
- Overrides the basic kill() method of a pygame sprite so that we also kill all the UI
elements in this window, and remove if from the window stack.
- on_moved_to_front(self)
- Called when a window is moved to the front of the stack.
- process_event(self, event: <built-in function Event>) -> bool
- Handles resizing & closing windows. Gives UI Windows access to pygame events. Derived
windows should super() call this class if they implement their own process_event method.
:param event: The event to process.
:return bool: Return True if this element should consume this event and not pass it to the
rest of the UI.
- rebuild(self)
- Rebuilds the window when the theme has changed.
- rebuild_from_changed_theme_data(self)
- Called by the UIManager to check the theming data and rebuild whatever needs rebuilding
for this element when the theme data has changed.
- set_blocking(self, state: bool)
- Sets whether this window being open should block clicks to the rest of the UI or not.
Defaults to False.
:param state: True if this window should block mouse clicks.
- set_dimensions(self, dimensions: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Set the size of this window and then re-sizes and shifts the contents of the windows
container to fit the new size.
:param dimensions: The new dimensions to set.
- set_display_title(self, new_title: str)
- Set the title of the window.
:param new_title: The title to set.
- set_minimum_dimensions(self, dimensions: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- If this window is resizable, then the dimensions we set here will be the minimum that
users can change the window to. They are also used as the minimum size when
'set_dimensions' is called.
:param dimensions: The new minimum dimension for the window.
- set_position(self, position: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Method to directly set the absolute screen rect position of an element.
:param position: The new position to set.
- set_relative_position(self, position: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Method to directly set the relative rect position of an element.
:param position: The new position to set.
- should_use_window_edge_resize_cursor(self) -> bool
- Returns true if this window is in a state where we should display one of the resizing
cursors
:return: True if a resizing cursor is needed.
- show(self)
- In addition to the base UIElement.show() - show the _window_root_container which will
propagate and show all the children.
Methods inherited from pygame_gui.core.ui_element.UIElement:
- focus(self)
- A stub to override. Called when we focus this UI element.
- get_abs_rect(self) -> pygame.Rect
- The absolute positioning rect.
:return: A pygame rect.
- get_element_ids(self) -> List[str]
- A list of all the element IDs in this element's theming/event hierarchy.
:return: a list of strings, one ofr each element in the hierarchy.
- get_focus_set(self) -> Set[ForwardRef('UIElement')]
- Return the set of elements to focus when we focus this element.
- get_image_clipping_rect(self) -> Union[pygame.Rect, NoneType]
- Obtain the current image clipping rect.
:return: The current clipping rect. May be None.
- get_relative_rect(self) -> pygame.Rect
- The relative positioning rect.
:return: A pygame rect.
- get_starting_height(self) -> int
- Get the starting layer height of this element. (i.e. the layer we start placing it on
*above* it's container, it may use more layers above this layer)
:return: an integer representing the starting layer height.
- hover_point(self, hover_x: float, hover_y: float) -> bool
- Test if a given point counts as 'hovering' this UI element. Normally that is a
straightforward matter of seeing if a point is inside the rectangle. Occasionally it
will also check if we are in a wider zone around a UI element once it is already active,
this makes it easier to move scroll bars and the like.
:param hover_x: The x (horizontal) position of the point.
:param hover_y: The y (vertical) position of the point.
:return: Returns True if we are hovering this element.
- join_focus_sets(self, element: 'UIElement')
- Join this element's focus set with another's.
:param element: The other element whose focus set we are joining with.
- on_fresh_drawable_shape_ready(self)
- Called when our drawable shape has finished rebuilding the active surface. This is needed
because sometimes we defer rebuilding until a more advantageous (read quieter) moment.
- on_hovered(self)
- A stub to override. Called when this UI element first enters the 'hovered' state.
- on_unhovered(self)
- A stub to override. Called when this UI element leaves the 'hovered' state.
- remove_element_from_focus_set(self, element)
- remove an element from this sets focus group.
:param element: The element to remove.
- set_focus_set(self, focus_set: Set[ForwardRef('UIElement')])
- Set the focus set to a specific set of elements.
:param focus_set: The focus set to set.
- set_image(self, new_image: Union[pygame.Surface, NoneType])
- Wraps setting the image variable of this element so that we also set the current image
clip on the image at the same time.
:param new_image: The new image to set.
- set_image_clip(self, rect: Union[pygame.Rect, NoneType])
- Sets a clipping rectangle on this element's image determining what portion of it will
actually be displayed when this element is blitted to the screen.
:param rect: A clipping rectangle, or None to clear the clip.
- set_visual_debug_mode(self, activate_mode: bool)
- Enables a debug mode for the element which displays layer information on top of it in
a tiny font.
:param activate_mode: True or False to enable or disable the mode.
- unfocus(self)
- A stub to override. Called when we stop focusing this UI element.
- update_containing_rect_position(self)
- Updates the position of this element based on the position of it's container. Usually
called when the container has moved.
- while_hovering(self, time_delta: float, mouse_pos: pygame.math.Vector2)
- A stub method to override. Called when this UI element is currently hovered.
:param time_delta: A float, the time in seconds between the last call to this function
and now (roughly).
:param mouse_pos: The current position of the mouse as 2D Vector.
Methods inherited from pygame_gui.core.layered_gui_group.GUISprite:
- __repr__(self)
- Return repr(self).
- add(self, *groups)
- add the sprite to groups
Sprite.add(*groups): return None
Any number of Group instances can be passed as arguments. The
Sprite will be added to the Groups it is not already a member of.
- add_internal(self, group)
- For adding this sprite to a group internally.
:param group: The group we are adding to.
- alive(self)
- does the sprite belong to any groups
Sprite.alive(): return bool
Returns True when the Sprite belongs to one or more Groups.
- groups(self)
- list of Groups that contain this Sprite
Sprite.groups(): return group_list
Returns a list of all the Groups that contain this Sprite.
- remove(self, *groups)
- remove the sprite from groups
Sprite.remove(*groups): return None
Any number of Group instances can be passed as arguments. The Sprite
will be removed from the Groups it is currently a member of.
- remove_internal(self, group)
- For removing this sprite from a group internally.
:param group: The group we are removing from.
Data descriptors inherited from pygame_gui.core.layered_gui_group.GUISprite:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- blendmode
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- image
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- layer
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- rect
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- visible
- You can make this sprite disappear without removing it from the group
assign 0 for invisible and 1 for visible
|
class UIScaleWindow(pygame_gui.elements.ui_window.UIWindow) |
| |
UIScaleWindow(rect, ui_manager, c_draw, c_update, c_status, options)
A base class for window GUI elements, any windows should inherit from this class.
:param rect: A rectangle, representing size and position of the window (including title bar,
shadow and borders).
:param manager: The UIManager that manages this UIWindow.
:param window_display_title: A string that will appear in the windows title bar if it has one.
:param element_id: An element ID for this window, if one is not supplied it defaults to
'window'.
:param object_id: An optional object ID for this window, useful for distinguishing different
windows.
:param resizable: Whether this window is resizable or not, defaults to False.
:param visible: Whether the element is visible by default. Warning - container visibility may
override this. |
| |
- Method resolution order:
- UIScaleWindow
- pygame_gui.elements.ui_window.UIWindow
- pygame_gui.core.ui_element.UIElement
- pygame_gui.core.layered_gui_group.GUISprite
- pygame_gui.core.interfaces.element_interface.IUIElementInterface
- pygame_gui.core.interfaces.container_interface.IContainerLikeInterface
- pygame_gui.core.interfaces.window_interface.IWindowInterface
- builtins.object
Methods defined here:
- __init__(self, rect, ui_manager, c_draw, c_update, c_status, options)
- Initialize self. See help(type(self)) for accurate signature.
- applyScale(self)
- event(self, event)
- update(self, time_delta)
- A method called every update cycle of our application. Designed to be overridden by
derived classes but also has a little functionality to make sure the window's layer
'thickness' is accurate and to handle window resizing.
:param time_delta: time passed in seconds between one call to this method and the next.
Data and other attributes defined here:
- __abstractmethods__ = frozenset()
Methods inherited from pygame_gui.elements.ui_window.UIWindow:
- can_hover(self) -> bool
- Called to test if this window can be hovered.
- change_layer(self, new_layer: int)
- Move this window, and it's contents, to a new layer in the UI.
:param new_layer: The layer to move to.
- check_clicked_inside_or_blocking(self, event: <built-in function Event>) -> bool
- A quick event check outside of the normal event processing so that this window is brought
to the front of the window stack if we click on any of the elements contained within it.
:param event: The event to check.
:return: returns True if the event represents a click inside this window or the window
is blocking.
- check_hover(self, time_delta: float, hovered_higher_element: bool) -> bool
- For the window the only hovering we care about is the edges if this is a resizable window.
:param time_delta: time passed in seconds between one call to this method and the next.
:param hovered_higher_element: Have we already hovered an element/window above this one.
- disable(self)
- Disables the window and it's contents so it is no longer interactive.
- enable(self)
- Enables the window and it's contents so it is interactive again.
- get_container(self) -> pygame_gui.core.interfaces.container_interface.IUIContainerInterface
- Returns the container that should contain all the UI elements in this window.
:return UIContainer: The window's container.
- get_hovering_edge_id(self) -> str
- Gets the ID of the combination of edges we are hovering for use by the cursor system.
:return: a string containing the edge combination ID (e.g. xy,yx,xl,xr,yt,yb)
- get_top_layer(self) -> int
- Returns the 'highest' layer used by this window so that we can correctly place other
windows on top of it.
:return: The top layer for this window as a number (greater numbers are higher layers).
- hide(self)
- In addition to the base UIElement.hide() - hide the _window_root_container which will
propagate and hide all the children.
- kill(self)
- Overrides the basic kill() method of a pygame sprite so that we also kill all the UI
elements in this window, and remove if from the window stack.
- on_moved_to_front(self)
- Called when a window is moved to the front of the stack.
- process_event(self, event: <built-in function Event>) -> bool
- Handles resizing & closing windows. Gives UI Windows access to pygame events. Derived
windows should super() call this class if they implement their own process_event method.
:param event: The event to process.
:return bool: Return True if this element should consume this event and not pass it to the
rest of the UI.
- rebuild(self)
- Rebuilds the window when the theme has changed.
- rebuild_from_changed_theme_data(self)
- Called by the UIManager to check the theming data and rebuild whatever needs rebuilding
for this element when the theme data has changed.
- set_blocking(self, state: bool)
- Sets whether this window being open should block clicks to the rest of the UI or not.
Defaults to False.
:param state: True if this window should block mouse clicks.
- set_dimensions(self, dimensions: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Set the size of this window and then re-sizes and shifts the contents of the windows
container to fit the new size.
:param dimensions: The new dimensions to set.
- set_display_title(self, new_title: str)
- Set the title of the window.
:param new_title: The title to set.
- set_minimum_dimensions(self, dimensions: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- If this window is resizable, then the dimensions we set here will be the minimum that
users can change the window to. They are also used as the minimum size when
'set_dimensions' is called.
:param dimensions: The new minimum dimension for the window.
- set_position(self, position: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Method to directly set the absolute screen rect position of an element.
:param position: The new position to set.
- set_relative_position(self, position: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Method to directly set the relative rect position of an element.
:param position: The new position to set.
- should_use_window_edge_resize_cursor(self) -> bool
- Returns true if this window is in a state where we should display one of the resizing
cursors
:return: True if a resizing cursor is needed.
- show(self)
- In addition to the base UIElement.show() - show the _window_root_container which will
propagate and show all the children.
Methods inherited from pygame_gui.core.ui_element.UIElement:
- focus(self)
- A stub to override. Called when we focus this UI element.
- get_abs_rect(self) -> pygame.Rect
- The absolute positioning rect.
:return: A pygame rect.
- get_element_ids(self) -> List[str]
- A list of all the element IDs in this element's theming/event hierarchy.
:return: a list of strings, one ofr each element in the hierarchy.
- get_focus_set(self) -> Set[ForwardRef('UIElement')]
- Return the set of elements to focus when we focus this element.
- get_image_clipping_rect(self) -> Union[pygame.Rect, NoneType]
- Obtain the current image clipping rect.
:return: The current clipping rect. May be None.
- get_relative_rect(self) -> pygame.Rect
- The relative positioning rect.
:return: A pygame rect.
- get_starting_height(self) -> int
- Get the starting layer height of this element. (i.e. the layer we start placing it on
*above* it's container, it may use more layers above this layer)
:return: an integer representing the starting layer height.
- hover_point(self, hover_x: float, hover_y: float) -> bool
- Test if a given point counts as 'hovering' this UI element. Normally that is a
straightforward matter of seeing if a point is inside the rectangle. Occasionally it
will also check if we are in a wider zone around a UI element once it is already active,
this makes it easier to move scroll bars and the like.
:param hover_x: The x (horizontal) position of the point.
:param hover_y: The y (vertical) position of the point.
:return: Returns True if we are hovering this element.
- join_focus_sets(self, element: 'UIElement')
- Join this element's focus set with another's.
:param element: The other element whose focus set we are joining with.
- on_fresh_drawable_shape_ready(self)
- Called when our drawable shape has finished rebuilding the active surface. This is needed
because sometimes we defer rebuilding until a more advantageous (read quieter) moment.
- on_hovered(self)
- A stub to override. Called when this UI element first enters the 'hovered' state.
- on_unhovered(self)
- A stub to override. Called when this UI element leaves the 'hovered' state.
- remove_element_from_focus_set(self, element)
- remove an element from this sets focus group.
:param element: The element to remove.
- set_focus_set(self, focus_set: Set[ForwardRef('UIElement')])
- Set the focus set to a specific set of elements.
:param focus_set: The focus set to set.
- set_image(self, new_image: Union[pygame.Surface, NoneType])
- Wraps setting the image variable of this element so that we also set the current image
clip on the image at the same time.
:param new_image: The new image to set.
- set_image_clip(self, rect: Union[pygame.Rect, NoneType])
- Sets a clipping rectangle on this element's image determining what portion of it will
actually be displayed when this element is blitted to the screen.
:param rect: A clipping rectangle, or None to clear the clip.
- set_visual_debug_mode(self, activate_mode: bool)
- Enables a debug mode for the element which displays layer information on top of it in
a tiny font.
:param activate_mode: True or False to enable or disable the mode.
- unfocus(self)
- A stub to override. Called when we stop focusing this UI element.
- update_containing_rect_position(self)
- Updates the position of this element based on the position of it's container. Usually
called when the container has moved.
- while_hovering(self, time_delta: float, mouse_pos: pygame.math.Vector2)
- A stub method to override. Called when this UI element is currently hovered.
:param time_delta: A float, the time in seconds between the last call to this function
and now (roughly).
:param mouse_pos: The current position of the mouse as 2D Vector.
Methods inherited from pygame_gui.core.layered_gui_group.GUISprite:
- __repr__(self)
- Return repr(self).
- add(self, *groups)
- add the sprite to groups
Sprite.add(*groups): return None
Any number of Group instances can be passed as arguments. The
Sprite will be added to the Groups it is not already a member of.
- add_internal(self, group)
- For adding this sprite to a group internally.
:param group: The group we are adding to.
- alive(self)
- does the sprite belong to any groups
Sprite.alive(): return bool
Returns True when the Sprite belongs to one or more Groups.
- groups(self)
- list of Groups that contain this Sprite
Sprite.groups(): return group_list
Returns a list of all the Groups that contain this Sprite.
- remove(self, *groups)
- remove the sprite from groups
Sprite.remove(*groups): return None
Any number of Group instances can be passed as arguments. The Sprite
will be removed from the Groups it is currently a member of.
- remove_internal(self, group)
- For removing this sprite from a group internally.
:param group: The group we are removing from.
Data descriptors inherited from pygame_gui.core.layered_gui_group.GUISprite:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- blendmode
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- image
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- layer
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- rect
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- visible
- You can make this sprite disappear without removing it from the group
assign 0 for invisible and 1 for visible
|
class UIToolbarWindow(pygame_gui.elements.ui_window.UIWindow) |
| |
UIToolbarWindow(rect, ui_manager, c_draw, c_update, c_status, options)
A base class for window GUI elements, any windows should inherit from this class.
:param rect: A rectangle, representing size and position of the window (including title bar,
shadow and borders).
:param manager: The UIManager that manages this UIWindow.
:param window_display_title: A string that will appear in the windows title bar if it has one.
:param element_id: An element ID for this window, if one is not supplied it defaults to
'window'.
:param object_id: An optional object ID for this window, useful for distinguishing different
windows.
:param resizable: Whether this window is resizable or not, defaults to False.
:param visible: Whether the element is visible by default. Warning - container visibility may
override this. |
| |
- Method resolution order:
- UIToolbarWindow
- pygame_gui.elements.ui_window.UIWindow
- pygame_gui.core.ui_element.UIElement
- pygame_gui.core.layered_gui_group.GUISprite
- pygame_gui.core.interfaces.element_interface.IUIElementInterface
- pygame_gui.core.interfaces.container_interface.IContainerLikeInterface
- pygame_gui.core.interfaces.window_interface.IWindowInterface
- builtins.object
Methods defined here:
- __init__(self, rect, ui_manager, c_draw, c_update, c_status, options)
- Initialize self. See help(type(self)) for accurate signature.
- createMessageWindow(self, title, message)
- createRotateWindow(self)
- createSaveFile(self)
- createScaleWindow(self)
- createTranslateWindow(self)
- event(self, event)
- update(self, time_delta)
- A method called every update cycle of our application. Designed to be overridden by
derived classes but also has a little functionality to make sure the window's layer
'thickness' is accurate and to handle window resizing.
:param time_delta: time passed in seconds between one call to this method and the next.
- updateCommand(self)
- updateLists(self)
Data and other attributes defined here:
- __abstractmethods__ = frozenset()
Methods inherited from pygame_gui.elements.ui_window.UIWindow:
- can_hover(self) -> bool
- Called to test if this window can be hovered.
- change_layer(self, new_layer: int)
- Move this window, and it's contents, to a new layer in the UI.
:param new_layer: The layer to move to.
- check_clicked_inside_or_blocking(self, event: <built-in function Event>) -> bool
- A quick event check outside of the normal event processing so that this window is brought
to the front of the window stack if we click on any of the elements contained within it.
:param event: The event to check.
:return: returns True if the event represents a click inside this window or the window
is blocking.
- check_hover(self, time_delta: float, hovered_higher_element: bool) -> bool
- For the window the only hovering we care about is the edges if this is a resizable window.
:param time_delta: time passed in seconds between one call to this method and the next.
:param hovered_higher_element: Have we already hovered an element/window above this one.
- disable(self)
- Disables the window and it's contents so it is no longer interactive.
- enable(self)
- Enables the window and it's contents so it is interactive again.
- get_container(self) -> pygame_gui.core.interfaces.container_interface.IUIContainerInterface
- Returns the container that should contain all the UI elements in this window.
:return UIContainer: The window's container.
- get_hovering_edge_id(self) -> str
- Gets the ID of the combination of edges we are hovering for use by the cursor system.
:return: a string containing the edge combination ID (e.g. xy,yx,xl,xr,yt,yb)
- get_top_layer(self) -> int
- Returns the 'highest' layer used by this window so that we can correctly place other
windows on top of it.
:return: The top layer for this window as a number (greater numbers are higher layers).
- hide(self)
- In addition to the base UIElement.hide() - hide the _window_root_container which will
propagate and hide all the children.
- kill(self)
- Overrides the basic kill() method of a pygame sprite so that we also kill all the UI
elements in this window, and remove if from the window stack.
- on_moved_to_front(self)
- Called when a window is moved to the front of the stack.
- process_event(self, event: <built-in function Event>) -> bool
- Handles resizing & closing windows. Gives UI Windows access to pygame events. Derived
windows should super() call this class if they implement their own process_event method.
:param event: The event to process.
:return bool: Return True if this element should consume this event and not pass it to the
rest of the UI.
- rebuild(self)
- Rebuilds the window when the theme has changed.
- rebuild_from_changed_theme_data(self)
- Called by the UIManager to check the theming data and rebuild whatever needs rebuilding
for this element when the theme data has changed.
- set_blocking(self, state: bool)
- Sets whether this window being open should block clicks to the rest of the UI or not.
Defaults to False.
:param state: True if this window should block mouse clicks.
- set_dimensions(self, dimensions: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Set the size of this window and then re-sizes and shifts the contents of the windows
container to fit the new size.
:param dimensions: The new dimensions to set.
- set_display_title(self, new_title: str)
- Set the title of the window.
:param new_title: The title to set.
- set_minimum_dimensions(self, dimensions: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- If this window is resizable, then the dimensions we set here will be the minimum that
users can change the window to. They are also used as the minimum size when
'set_dimensions' is called.
:param dimensions: The new minimum dimension for the window.
- set_position(self, position: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Method to directly set the absolute screen rect position of an element.
:param position: The new position to set.
- set_relative_position(self, position: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Method to directly set the relative rect position of an element.
:param position: The new position to set.
- should_use_window_edge_resize_cursor(self) -> bool
- Returns true if this window is in a state where we should display one of the resizing
cursors
:return: True if a resizing cursor is needed.
- show(self)
- In addition to the base UIElement.show() - show the _window_root_container which will
propagate and show all the children.
Methods inherited from pygame_gui.core.ui_element.UIElement:
- focus(self)
- A stub to override. Called when we focus this UI element.
- get_abs_rect(self) -> pygame.Rect
- The absolute positioning rect.
:return: A pygame rect.
- get_element_ids(self) -> List[str]
- A list of all the element IDs in this element's theming/event hierarchy.
:return: a list of strings, one ofr each element in the hierarchy.
- get_focus_set(self) -> Set[ForwardRef('UIElement')]
- Return the set of elements to focus when we focus this element.
- get_image_clipping_rect(self) -> Union[pygame.Rect, NoneType]
- Obtain the current image clipping rect.
:return: The current clipping rect. May be None.
- get_relative_rect(self) -> pygame.Rect
- The relative positioning rect.
:return: A pygame rect.
- get_starting_height(self) -> int
- Get the starting layer height of this element. (i.e. the layer we start placing it on
*above* it's container, it may use more layers above this layer)
:return: an integer representing the starting layer height.
- hover_point(self, hover_x: float, hover_y: float) -> bool
- Test if a given point counts as 'hovering' this UI element. Normally that is a
straightforward matter of seeing if a point is inside the rectangle. Occasionally it
will also check if we are in a wider zone around a UI element once it is already active,
this makes it easier to move scroll bars and the like.
:param hover_x: The x (horizontal) position of the point.
:param hover_y: The y (vertical) position of the point.
:return: Returns True if we are hovering this element.
- join_focus_sets(self, element: 'UIElement')
- Join this element's focus set with another's.
:param element: The other element whose focus set we are joining with.
- on_fresh_drawable_shape_ready(self)
- Called when our drawable shape has finished rebuilding the active surface. This is needed
because sometimes we defer rebuilding until a more advantageous (read quieter) moment.
- on_hovered(self)
- A stub to override. Called when this UI element first enters the 'hovered' state.
- on_unhovered(self)
- A stub to override. Called when this UI element leaves the 'hovered' state.
- remove_element_from_focus_set(self, element)
- remove an element from this sets focus group.
:param element: The element to remove.
- set_focus_set(self, focus_set: Set[ForwardRef('UIElement')])
- Set the focus set to a specific set of elements.
:param focus_set: The focus set to set.
- set_image(self, new_image: Union[pygame.Surface, NoneType])
- Wraps setting the image variable of this element so that we also set the current image
clip on the image at the same time.
:param new_image: The new image to set.
- set_image_clip(self, rect: Union[pygame.Rect, NoneType])
- Sets a clipping rectangle on this element's image determining what portion of it will
actually be displayed when this element is blitted to the screen.
:param rect: A clipping rectangle, or None to clear the clip.
- set_visual_debug_mode(self, activate_mode: bool)
- Enables a debug mode for the element which displays layer information on top of it in
a tiny font.
:param activate_mode: True or False to enable or disable the mode.
- unfocus(self)
- A stub to override. Called when we stop focusing this UI element.
- update_containing_rect_position(self)
- Updates the position of this element based on the position of it's container. Usually
called when the container has moved.
- while_hovering(self, time_delta: float, mouse_pos: pygame.math.Vector2)
- A stub method to override. Called when this UI element is currently hovered.
:param time_delta: A float, the time in seconds between the last call to this function
and now (roughly).
:param mouse_pos: The current position of the mouse as 2D Vector.
Methods inherited from pygame_gui.core.layered_gui_group.GUISprite:
- __repr__(self)
- Return repr(self).
- add(self, *groups)
- add the sprite to groups
Sprite.add(*groups): return None
Any number of Group instances can be passed as arguments. The
Sprite will be added to the Groups it is not already a member of.
- add_internal(self, group)
- For adding this sprite to a group internally.
:param group: The group we are adding to.
- alive(self)
- does the sprite belong to any groups
Sprite.alive(): return bool
Returns True when the Sprite belongs to one or more Groups.
- groups(self)
- list of Groups that contain this Sprite
Sprite.groups(): return group_list
Returns a list of all the Groups that contain this Sprite.
- remove(self, *groups)
- remove the sprite from groups
Sprite.remove(*groups): return None
Any number of Group instances can be passed as arguments. The Sprite
will be removed from the Groups it is currently a member of.
- remove_internal(self, group)
- For removing this sprite from a group internally.
:param group: The group we are removing from.
Data descriptors inherited from pygame_gui.core.layered_gui_group.GUISprite:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- blendmode
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- image
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- layer
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- rect
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- visible
- You can make this sprite disappear without removing it from the group
assign 0 for invisible and 1 for visible
|
class UITranslateWindow(pygame_gui.elements.ui_window.UIWindow) |
| |
UITranslateWindow(rect, ui_manager, c_draw, c_update, c_status, options)
A base class for window GUI elements, any windows should inherit from this class.
:param rect: A rectangle, representing size and position of the window (including title bar,
shadow and borders).
:param manager: The UIManager that manages this UIWindow.
:param window_display_title: A string that will appear in the windows title bar if it has one.
:param element_id: An element ID for this window, if one is not supplied it defaults to
'window'.
:param object_id: An optional object ID for this window, useful for distinguishing different
windows.
:param resizable: Whether this window is resizable or not, defaults to False.
:param visible: Whether the element is visible by default. Warning - container visibility may
override this. |
| |
- Method resolution order:
- UITranslateWindow
- pygame_gui.elements.ui_window.UIWindow
- pygame_gui.core.ui_element.UIElement
- pygame_gui.core.layered_gui_group.GUISprite
- pygame_gui.core.interfaces.element_interface.IUIElementInterface
- pygame_gui.core.interfaces.container_interface.IContainerLikeInterface
- pygame_gui.core.interfaces.window_interface.IWindowInterface
- builtins.object
Methods defined here:
- __init__(self, rect, ui_manager, c_draw, c_update, c_status, options)
- Initialize self. See help(type(self)) for accurate signature.
- applyTranslate(self)
- event(self, event)
- update(self, time_delta)
- A method called every update cycle of our application. Designed to be overridden by
derived classes but also has a little functionality to make sure the window's layer
'thickness' is accurate and to handle window resizing.
:param time_delta: time passed in seconds between one call to this method and the next.
Data and other attributes defined here:
- __abstractmethods__ = frozenset()
Methods inherited from pygame_gui.elements.ui_window.UIWindow:
- can_hover(self) -> bool
- Called to test if this window can be hovered.
- change_layer(self, new_layer: int)
- Move this window, and it's contents, to a new layer in the UI.
:param new_layer: The layer to move to.
- check_clicked_inside_or_blocking(self, event: <built-in function Event>) -> bool
- A quick event check outside of the normal event processing so that this window is brought
to the front of the window stack if we click on any of the elements contained within it.
:param event: The event to check.
:return: returns True if the event represents a click inside this window or the window
is blocking.
- check_hover(self, time_delta: float, hovered_higher_element: bool) -> bool
- For the window the only hovering we care about is the edges if this is a resizable window.
:param time_delta: time passed in seconds between one call to this method and the next.
:param hovered_higher_element: Have we already hovered an element/window above this one.
- disable(self)
- Disables the window and it's contents so it is no longer interactive.
- enable(self)
- Enables the window and it's contents so it is interactive again.
- get_container(self) -> pygame_gui.core.interfaces.container_interface.IUIContainerInterface
- Returns the container that should contain all the UI elements in this window.
:return UIContainer: The window's container.
- get_hovering_edge_id(self) -> str
- Gets the ID of the combination of edges we are hovering for use by the cursor system.
:return: a string containing the edge combination ID (e.g. xy,yx,xl,xr,yt,yb)
- get_top_layer(self) -> int
- Returns the 'highest' layer used by this window so that we can correctly place other
windows on top of it.
:return: The top layer for this window as a number (greater numbers are higher layers).
- hide(self)
- In addition to the base UIElement.hide() - hide the _window_root_container which will
propagate and hide all the children.
- kill(self)
- Overrides the basic kill() method of a pygame sprite so that we also kill all the UI
elements in this window, and remove if from the window stack.
- on_moved_to_front(self)
- Called when a window is moved to the front of the stack.
- process_event(self, event: <built-in function Event>) -> bool
- Handles resizing & closing windows. Gives UI Windows access to pygame events. Derived
windows should super() call this class if they implement their own process_event method.
:param event: The event to process.
:return bool: Return True if this element should consume this event and not pass it to the
rest of the UI.
- rebuild(self)
- Rebuilds the window when the theme has changed.
- rebuild_from_changed_theme_data(self)
- Called by the UIManager to check the theming data and rebuild whatever needs rebuilding
for this element when the theme data has changed.
- set_blocking(self, state: bool)
- Sets whether this window being open should block clicks to the rest of the UI or not.
Defaults to False.
:param state: True if this window should block mouse clicks.
- set_dimensions(self, dimensions: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Set the size of this window and then re-sizes and shifts the contents of the windows
container to fit the new size.
:param dimensions: The new dimensions to set.
- set_display_title(self, new_title: str)
- Set the title of the window.
:param new_title: The title to set.
- set_minimum_dimensions(self, dimensions: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- If this window is resizable, then the dimensions we set here will be the minimum that
users can change the window to. They are also used as the minimum size when
'set_dimensions' is called.
:param dimensions: The new minimum dimension for the window.
- set_position(self, position: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Method to directly set the absolute screen rect position of an element.
:param position: The new position to set.
- set_relative_position(self, position: Union[pygame.math.Vector2, Tuple[int, int], Tuple[float, float]])
- Method to directly set the relative rect position of an element.
:param position: The new position to set.
- should_use_window_edge_resize_cursor(self) -> bool
- Returns true if this window is in a state where we should display one of the resizing
cursors
:return: True if a resizing cursor is needed.
- show(self)
- In addition to the base UIElement.show() - show the _window_root_container which will
propagate and show all the children.
Methods inherited from pygame_gui.core.ui_element.UIElement:
- focus(self)
- A stub to override. Called when we focus this UI element.
- get_abs_rect(self) -> pygame.Rect
- The absolute positioning rect.
:return: A pygame rect.
- get_element_ids(self) -> List[str]
- A list of all the element IDs in this element's theming/event hierarchy.
:return: a list of strings, one ofr each element in the hierarchy.
- get_focus_set(self) -> Set[ForwardRef('UIElement')]
- Return the set of elements to focus when we focus this element.
- get_image_clipping_rect(self) -> Union[pygame.Rect, NoneType]
- Obtain the current image clipping rect.
:return: The current clipping rect. May be None.
- get_relative_rect(self) -> pygame.Rect
- The relative positioning rect.
:return: A pygame rect.
- get_starting_height(self) -> int
- Get the starting layer height of this element. (i.e. the layer we start placing it on
*above* it's container, it may use more layers above this layer)
:return: an integer representing the starting layer height.
- hover_point(self, hover_x: float, hover_y: float) -> bool
- Test if a given point counts as 'hovering' this UI element. Normally that is a
straightforward matter of seeing if a point is inside the rectangle. Occasionally it
will also check if we are in a wider zone around a UI element once it is already active,
this makes it easier to move scroll bars and the like.
:param hover_x: The x (horizontal) position of the point.
:param hover_y: The y (vertical) position of the point.
:return: Returns True if we are hovering this element.
- join_focus_sets(self, element: 'UIElement')
- Join this element's focus set with another's.
:param element: The other element whose focus set we are joining with.
- on_fresh_drawable_shape_ready(self)
- Called when our drawable shape has finished rebuilding the active surface. This is needed
because sometimes we defer rebuilding until a more advantageous (read quieter) moment.
- on_hovered(self)
- A stub to override. Called when this UI element first enters the 'hovered' state.
- on_unhovered(self)
- A stub to override. Called when this UI element leaves the 'hovered' state.
- remove_element_from_focus_set(self, element)
- remove an element from this sets focus group.
:param element: The element to remove.
- set_focus_set(self, focus_set: Set[ForwardRef('UIElement')])
- Set the focus set to a specific set of elements.
:param focus_set: The focus set to set.
- set_image(self, new_image: Union[pygame.Surface, NoneType])
- Wraps setting the image variable of this element so that we also set the current image
clip on the image at the same time.
:param new_image: The new image to set.
- set_image_clip(self, rect: Union[pygame.Rect, NoneType])
- Sets a clipping rectangle on this element's image determining what portion of it will
actually be displayed when this element is blitted to the screen.
:param rect: A clipping rectangle, or None to clear the clip.
- set_visual_debug_mode(self, activate_mode: bool)
- Enables a debug mode for the element which displays layer information on top of it in
a tiny font.
:param activate_mode: True or False to enable or disable the mode.
- unfocus(self)
- A stub to override. Called when we stop focusing this UI element.
- update_containing_rect_position(self)
- Updates the position of this element based on the position of it's container. Usually
called when the container has moved.
- while_hovering(self, time_delta: float, mouse_pos: pygame.math.Vector2)
- A stub method to override. Called when this UI element is currently hovered.
:param time_delta: A float, the time in seconds between the last call to this function
and now (roughly).
:param mouse_pos: The current position of the mouse as 2D Vector.
Methods inherited from pygame_gui.core.layered_gui_group.GUISprite:
- __repr__(self)
- Return repr(self).
- add(self, *groups)
- add the sprite to groups
Sprite.add(*groups): return None
Any number of Group instances can be passed as arguments. The
Sprite will be added to the Groups it is not already a member of.
- add_internal(self, group)
- For adding this sprite to a group internally.
:param group: The group we are adding to.
- alive(self)
- does the sprite belong to any groups
Sprite.alive(): return bool
Returns True when the Sprite belongs to one or more Groups.
- groups(self)
- list of Groups that contain this Sprite
Sprite.groups(): return group_list
Returns a list of all the Groups that contain this Sprite.
- remove(self, *groups)
- remove the sprite from groups
Sprite.remove(*groups): return None
Any number of Group instances can be passed as arguments. The Sprite
will be removed from the Groups it is currently a member of.
- remove_internal(self, group)
- For removing this sprite from a group internally.
:param group: The group we are removing from.
Data descriptors inherited from pygame_gui.core.layered_gui_group.GUISprite:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- blendmode
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- image
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- layer
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- rect
- Layer property can only be set before the sprite is added to a group,
after that it is read only and a sprite's layer in a group should be
set via the group's change_layer() method.
Overwrites dynamic property from sprite class for speed.
- visible
- You can make this sprite disappear without removing it from the group
assign 0 for invisible and 1 for visible
| |


Autocomplete Action Predictor
Resource Prefetch Predictor
Filter zero confidences
User Text
URL
Hit Count
Miss Count
Confidence
Autocomplete Action Predictor is disabled.
Host
Origin
Num Hits
Num Misses
Consec Misses
Average Position
Always Access Net
Accessed Net
Score
Resource prefetch prediction is disabled.


Accessories
Go that extra mile
Want even more style, comfort and technology? Renault offers a wide range of accessories, specially designed and developed for your Captur.
Styling Pack
Enhance the dynamic look of your Captur with the styling pack.
Accent Pack
Add a hint of contrast to your Captur with our Accent Pack: Painted rear spoiler and door mirrors. Available in Ivory or Diamond Black.
Protection Pack
Protect your vehicle from the perils of the road and the car park with the protection pack.
Front and rear parking sensors:
Allows you to park with confidence.
Boot Sill Mat:
Roll-down mat to protect your boot sill from scratches when loading large items.
Alarm:
The essential accessory to ensure the car’s security. It will protect effectively from theft of the car and objects inside it.
Touring pack
Explore in your new Captur with our Touring pack.

Quick release towbar:
Enjoy the convenience of being able to remove the towbar in seconds when it is not required.
Armrest:
Front centre armrest for your comfort.
Chrome Pack
Add an extra touch of class to your Captur with our Chrome Pack.
Door sill plates:
Stylish protection from scuffs and natural wear and tear.
Chrome exhaust pipe:
Add that sporty edge.
Chrome mirror shell:
Make your Captur stand out by adding a stylish touch with these chrome parts.
Individual Accessories
Optional extras for your Captur.
Running boards:
Give your Captur a stylish outdoor look with running boards made from stainless steel for maximum quality and durability.
Leather seat covers:
Add an extra touch of class and luxury to your Captur with leather covers for the front and rear seats (Dynamique and Dynamique S versions only). In Black, with Portland Grey Inserts.
Artisan leather seat covers:
Combine luxury with up to the minute design with quilted leather seat covers in Black with Portland Grey inserts.
FOCAL MUSIC PREMIUM
Provides outstanding sound output and quality for all types of music (peak power 380w with a 200w RMS) Includes: set of 7 speakers (2 tweeters on dashboard, 2 front speakers, 2 coaxial rear speakers, 1 subwoofer), maximum bandwidth performance, optimised sound staging and power handling, smaller amplifying enclosure (H7 x L34 x W25), 20cm speaker reserved for low frequencies, remote control to adjust base level and 2-channel amplifiers for the front.
Ready to take Captur for a spin?
Go even further


Breaking: GBP/USD jumps over 1.29 as Brexit Party abandons 43 additional seats, assisting Conservatives
by Yohay ElamNigel Farage's Brexit Party has decided to step down from 43 additional constituencies where Labour won, facilitating the way for a Conservative majority. Markets prefer an outright Tory majority that will ratify the Brexit deal and enact market-friendly policies.
The final lists for the elections have been published, and they have shown that Farage's right-wing outfit has abandoned seats where the opposition party won in 2017, or at least where the Conservative Party came second. Prime Minister Boris Johnson's odds of winning seem to have increased.
GBP/USD has jumped above 1.29, the highest since early November. On its way up, sterling has broken above the downtrend resistance line that has accompanied it since late October. The next targets are 1.2950, 1.2980, and 1.3013. Support awaits at 1.29, 1.2820, and 1.2760. Momentum on the four-hour chart remains to the upside and the pound has previously broken above the 50, 100, and 200 Simple Moving Averages.


Download Net Framework 3 0 And 2 0 Updates
Technical Solutions Inputsystems Blog Net Framework 3 0 Service Pack 2 Update For Windows Server 2003 And Windows Xp Kb976570 Failed
Net Framework All Versions Offline Installers Direct Download Links
Download Offline Installers Of Net Framework 4 5 4 0 3 5 3 0 2 0 From Microsoft Servers
Net Framework 3 5 Sp1 Net Framework 3 0 Sp2 And Net Framework 2 0 Msi Deployment Bedford Digital Technology Solutions
Microsoft Net Framework 3 0 Service Pack 1 Softexia Com
Install Net Framework 3 5 On Windows 10 8 1 8 Microsoft Docs
Download Net Framework 1 1 4322 Yellowviral
Clarification On The Support Life Cycle For The Net Framework 3 5 The Net Framework 3 0 And The Net Framework 2 0
What Is Microsoft Net Framework Download Links For All Versions Inside Askvg
Net Framework Version 3 0 Download
Net Framework 3 0 Offline Installer Download Free For Windows 10 7 8 64 Bit 32 Bit
Download Microsoft Net Framework 2 0 Offline Installer Lasopatechnology
Download Net Framework 4 8 4 7 2 Offline Installer Windows 10 8 7 Get Pc Apps
Download Microsoft Net Framework 4 7 1
Download Microsoft Net Framework 3 5 Service Pack 1 Full Package From Official Microsoft Download Center
Net Framework Version History Wikipedia
4 Ways To Repair Or Remove Microsoft Net Framework Raymond Cc
Breakorstatid
Microsoft Net Framework 4 Download Ghacks Tech News
Microsoft Dot Net Framework 3 0 Free Download For Windows Uszonesoft
Installing Wsus 3 0 Sp2 On Windows Server Prajwaldesai Com
Net Framework Version History Computing Platforms I
Microsoft Net Framework 3 0 Gabsoftware
Microsoft Net Framework 5 0 5 Download Techspot
Microsoft Net Framework 2 0 Free Download Onesoftwares
Https Downloads Kyoceradocumentsolutions Com Au Documentation Documentation Microsoft 20 Net4 20framework 20pre Installation 20guide Pdf
Microsoft Net Framework Repair Tool Is Available
Net Framework 2 0 Sp2 Download Everfiber
How To Install Net Framework 2 0 3 0 And 3 5 In Windows 10 Make Tech Easier
Yy5 B1iptdz6 M