pygame_gui package
Subpackages
- pygame_gui.core package
- Subpackages
- pygame_gui.core.drawable_shapes package
- Submodules
- pygame_gui.core.drawable_shapes.drawable_shape module
DrawableShape
DrawableShape.align_all_text_rows()
DrawableShape.apply_active_text_changes()
DrawableShape.build_text_layout()
DrawableShape.clean_up_temp_shapes()
DrawableShape.collide_point()
DrawableShape.finalise_images_and_text()
DrawableShape.finalise_text()
DrawableShape.finalise_text_onto_active_state()
DrawableShape.full_rebuild_on_size_change()
DrawableShape.get_active_state_surface()
DrawableShape.get_fresh_surface()
DrawableShape.get_surface()
DrawableShape.has_fresh_surface()
DrawableShape.insert_text()
DrawableShape.redraw_active_state_no_text()
DrawableShape.redraw_all_states()
DrawableShape.redraw_state()
DrawableShape.set_active_state()
DrawableShape.set_dimensions()
DrawableShape.set_position()
DrawableShape.set_text()
DrawableShape.set_text_alpha()
DrawableShape.toggle_text_cursor()
DrawableShape.update()
DrawableShapeState
DrawableStateTransition
- pygame_gui.core.drawable_shapes.ellipse_drawable_shape module
- pygame_gui.core.drawable_shapes.rect_drawable_shape module
- pygame_gui.core.drawable_shapes.rounded_rect_drawable_shape module
RoundedRectangleShape
RoundedRectangleShape.clean_up_temp_shapes()
RoundedRectangleShape.clear_and_create_shape_surface()
RoundedRectangleShape.collide_point()
RoundedRectangleShape.create_subtract_surface()
RoundedRectangleShape.draw_colourless_rounded_rectangle()
RoundedRectangleShape.full_rebuild_on_size_change()
RoundedRectangleShape.redraw_state()
RoundedRectangleShape.set_dimensions()
RoundedRectangleShape.set_position()
- Module contents
DrawableShape
DrawableShape.align_all_text_rows()
DrawableShape.apply_active_text_changes()
DrawableShape.build_text_layout()
DrawableShape.clean_up_temp_shapes()
DrawableShape.collide_point()
DrawableShape.finalise_images_and_text()
DrawableShape.finalise_text()
DrawableShape.finalise_text_onto_active_state()
DrawableShape.full_rebuild_on_size_change()
DrawableShape.get_active_state_surface()
DrawableShape.get_fresh_surface()
DrawableShape.get_surface()
DrawableShape.has_fresh_surface()
DrawableShape.insert_text()
DrawableShape.redraw_active_state_no_text()
DrawableShape.redraw_all_states()
DrawableShape.redraw_state()
DrawableShape.set_active_state()
DrawableShape.set_dimensions()
DrawableShape.set_position()
DrawableShape.set_text()
DrawableShape.set_text_alpha()
DrawableShape.toggle_text_cursor()
DrawableShape.update()
EllipseDrawableShape
RectDrawableShape
RoundedRectangleShape
RoundedRectangleShape.clean_up_temp_shapes()
RoundedRectangleShape.clear_and_create_shape_surface()
RoundedRectangleShape.collide_point()
RoundedRectangleShape.create_subtract_surface()
RoundedRectangleShape.draw_colourless_rounded_rectangle()
RoundedRectangleShape.full_rebuild_on_size_change()
RoundedRectangleShape.redraw_state()
RoundedRectangleShape.set_dimensions()
RoundedRectangleShape.set_position()
- pygame_gui.core.interfaces package
- Submodules
- pygame_gui.core.interfaces.container_interface module
IContainerLikeInterface
IUIContainerInterface
IUIContainerInterface.add_element()
IUIContainerInterface.calc_add_element_changes_thickness()
IUIContainerInterface.change_layer()
IUIContainerInterface.check_hover()
IUIContainerInterface.clear()
IUIContainerInterface.get_image_clipping_rect()
IUIContainerInterface.get_rect()
IUIContainerInterface.get_size()
IUIContainerInterface.get_thickness()
IUIContainerInterface.get_top_layer()
IUIContainerInterface.kill()
IUIContainerInterface.on_contained_elements_changed()
IUIContainerInterface.recalculate_container_layer_thickness()
IUIContainerInterface.remove_element()
IUIContainerInterface.set_dimensions()
IUIContainerInterface.set_position()
IUIContainerInterface.set_relative_position()
IUIContainerInterface.update_containing_rect_position()
- pygame_gui.core.interfaces.manager_interface module
IUIManagerInterface
IUIManagerInterface.add_font_paths()
IUIManagerInterface.calculate_scaled_mouse_position()
IUIManagerInterface.clear_and_reset()
IUIManagerInterface.create_tool_tip()
IUIManagerInterface.draw_ui()
IUIManagerInterface.get_double_click_time()
IUIManagerInterface.get_focus_set()
IUIManagerInterface.get_hovering_any_element()
IUIManagerInterface.get_locale()
IUIManagerInterface.get_mouse_position()
IUIManagerInterface.get_root_container()
IUIManagerInterface.get_shadow()
IUIManagerInterface.get_sprite_group()
IUIManagerInterface.get_theme()
IUIManagerInterface.get_universal_empty_surface()
IUIManagerInterface.get_window_stack()
IUIManagerInterface.preload_fonts()
IUIManagerInterface.print_layer_debug()
IUIManagerInterface.print_unused_fonts()
IUIManagerInterface.process_events()
IUIManagerInterface.set_active_cursor()
IUIManagerInterface.set_focus_set()
IUIManagerInterface.set_locale()
IUIManagerInterface.set_text_hovered()
IUIManagerInterface.set_visual_debug_mode()
IUIManagerInterface.set_window_resolution()
IUIManagerInterface.update()
- pygame_gui.core.interfaces.window_interface module
IWindowInterface
IWindowInterface.always_on_top
IWindowInterface.can_hover()
IWindowInterface.change_layer()
IWindowInterface.check_clicked_inside_or_blocking()
IWindowInterface.check_hover()
IWindowInterface.get_hovering_edge_id()
IWindowInterface.get_layer_thickness()
IWindowInterface.get_top_layer()
IWindowInterface.kill()
IWindowInterface.layer
IWindowInterface.on_moved_to_front()
IWindowInterface.process_event()
IWindowInterface.rebuild()
IWindowInterface.rebuild_from_changed_theme_data()
IWindowInterface.set_blocking()
IWindowInterface.set_dimensions()
IWindowInterface.set_display_title()
IWindowInterface.set_minimum_dimensions()
IWindowInterface.set_position()
IWindowInterface.set_relative_position()
IWindowInterface.should_use_window_edge_resize_cursor()
IWindowInterface.update()
- Module contents
IColourGradientInterface
IContainerLikeInterface
IGUIFontInterface
IGUIFontInterface.get_direction()
IGUIFontInterface.get_metrics()
IGUIFontInterface.get_padding_height()
IGUIFontInterface.get_point_size()
IGUIFontInterface.get_rect()
IGUIFontInterface.render_premul()
IGUIFontInterface.render_premul_to()
IGUIFontInterface.size()
IGUIFontInterface.underline
IGUIFontInterface.underline_adjustment
IGUISpriteInterface
IGUISpriteInterface.add()
IGUISpriteInterface.add_internal()
IGUISpriteInterface.alive()
IGUISpriteInterface.blendmode
IGUISpriteInterface.groups()
IGUISpriteInterface.image
IGUISpriteInterface.kill()
IGUISpriteInterface.layer
IGUISpriteInterface.rect
IGUISpriteInterface.remove()
IGUISpriteInterface.remove_internal()
IGUISpriteInterface.update()
IGUISpriteInterface.visible
IUIAppearanceThemeInterface
IUIAppearanceThemeInterface.build_all_combined_ids()
IUIAppearanceThemeInterface.check_need_to_reload()
IUIAppearanceThemeInterface.get_colour()
IUIAppearanceThemeInterface.get_colour_or_gradient()
IUIAppearanceThemeInterface.get_font()
IUIAppearanceThemeInterface.get_font_dictionary()
IUIAppearanceThemeInterface.get_font_info()
IUIAppearanceThemeInterface.get_image()
IUIAppearanceThemeInterface.get_misc_data()
IUIAppearanceThemeInterface.load_theme()
IUIAppearanceThemeInterface.reload_theming()
IUIAppearanceThemeInterface.update_caching()
IUIAppearanceThemeInterface.update_single_element_theming()
IUIAppearanceThemeInterface.update_theming()
IUIContainerInterface
IUIContainerInterface.add_element()
IUIContainerInterface.calc_add_element_changes_thickness()
IUIContainerInterface.change_layer()
IUIContainerInterface.check_hover()
IUIContainerInterface.clear()
IUIContainerInterface.get_image_clipping_rect()
IUIContainerInterface.get_rect()
IUIContainerInterface.get_size()
IUIContainerInterface.get_thickness()
IUIContainerInterface.get_top_layer()
IUIContainerInterface.kill()
IUIContainerInterface.on_contained_elements_changed()
IUIContainerInterface.recalculate_container_layer_thickness()
IUIContainerInterface.remove_element()
IUIContainerInterface.set_dimensions()
IUIContainerInterface.set_position()
IUIContainerInterface.set_relative_position()
IUIContainerInterface.update_containing_rect_position()
IUIElementInterface
IUIElementInterface.can_hover()
IUIElementInterface.change_layer()
IUIElementInterface.check_hover()
IUIElementInterface.disable()
IUIElementInterface.enable()
IUIElementInterface.focus()
IUIElementInterface.get_abs_rect()
IUIElementInterface.get_anchor_targets()
IUIElementInterface.get_anchors()
IUIElementInterface.get_class_ids()
IUIElementInterface.get_element_base_ids()
IUIElementInterface.get_element_ids()
IUIElementInterface.get_focus_set()
IUIElementInterface.get_image_clipping_rect()
IUIElementInterface.get_object_ids()
IUIElementInterface.get_relative_rect()
IUIElementInterface.get_starting_height()
IUIElementInterface.get_top_layer()
IUIElementInterface.hide()
IUIElementInterface.hover_point()
IUIElementInterface.hovered
IUIElementInterface.join_focus_sets()
IUIElementInterface.kill()
IUIElementInterface.on_fresh_drawable_shape_ready()
IUIElementInterface.on_hovered()
IUIElementInterface.on_locale_changed()
IUIElementInterface.on_unhovered()
IUIElementInterface.process_event()
IUIElementInterface.rebuild()
IUIElementInterface.rebuild_from_changed_theme_data()
IUIElementInterface.remove_element_from_focus_set()
IUIElementInterface.set_anchors()
IUIElementInterface.set_dimensions()
IUIElementInterface.set_focus_set()
IUIElementInterface.set_image()
IUIElementInterface.set_position()
IUIElementInterface.set_relative_position()
IUIElementInterface.set_visual_debug_mode()
IUIElementInterface.show()
IUIElementInterface.unfocus()
IUIElementInterface.update()
IUIElementInterface.update_containing_rect_position()
IUIElementInterface.while_hovering()
IUIFontDictionaryInterface
IUIFontDictionaryInterface.add_font_path()
IUIFontDictionaryInterface.check_font_preloaded()
IUIFontDictionaryInterface.convert_html_to_point_size()
IUIFontDictionaryInterface.create_font_id()
IUIFontDictionaryInterface.ensure_debug_font_loaded()
IUIFontDictionaryInterface.find_font()
IUIFontDictionaryInterface.get_default_font()
IUIFontDictionaryInterface.preload_font()
IUIFontDictionaryInterface.print_unused_loaded_fonts()
IUIFontDictionaryInterface.set_locale()
IUIManagerInterface
IUIManagerInterface.add_font_paths()
IUIManagerInterface.calculate_scaled_mouse_position()
IUIManagerInterface.clear_and_reset()
IUIManagerInterface.create_tool_tip()
IUIManagerInterface.draw_ui()
IUIManagerInterface.get_double_click_time()
IUIManagerInterface.get_focus_set()
IUIManagerInterface.get_hovering_any_element()
IUIManagerInterface.get_locale()
IUIManagerInterface.get_mouse_position()
IUIManagerInterface.get_root_container()
IUIManagerInterface.get_shadow()
IUIManagerInterface.get_sprite_group()
IUIManagerInterface.get_theme()
IUIManagerInterface.get_universal_empty_surface()
IUIManagerInterface.get_window_stack()
IUIManagerInterface.preload_fonts()
IUIManagerInterface.print_layer_debug()
IUIManagerInterface.print_unused_fonts()
IUIManagerInterface.process_events()
IUIManagerInterface.set_active_cursor()
IUIManagerInterface.set_focus_set()
IUIManagerInterface.set_locale()
IUIManagerInterface.set_text_hovered()
IUIManagerInterface.set_visual_debug_mode()
IUIManagerInterface.set_window_resolution()
IUIManagerInterface.update()
IUITextOwnerInterface
IUITextOwnerInterface.clear_all_active_effects()
IUITextOwnerInterface.clear_text_surface()
IUITextOwnerInterface.get_object_id()
IUITextOwnerInterface.get_text_letter_count()
IUITextOwnerInterface.set_active_effect()
IUITextOwnerInterface.set_text_alpha()
IUITextOwnerInterface.set_text_offset_pos()
IUITextOwnerInterface.set_text_rotation()
IUITextOwnerInterface.set_text_scale()
IUITextOwnerInterface.stop_finished_effect()
IUITextOwnerInterface.update_text_effect()
IUITextOwnerInterface.update_text_end_position()
IUITooltipInterface
IUIWindowStackInterface
IWindowInterface
IWindowInterface.always_on_top
IWindowInterface.can_hover()
IWindowInterface.change_layer()
IWindowInterface.check_clicked_inside_or_blocking()
IWindowInterface.check_hover()
IWindowInterface.get_hovering_edge_id()
IWindowInterface.get_layer_thickness()
IWindowInterface.get_top_layer()
IWindowInterface.kill()
IWindowInterface.layer
IWindowInterface.on_moved_to_front()
IWindowInterface.process_event()
IWindowInterface.rebuild()
IWindowInterface.rebuild_from_changed_theme_data()
IWindowInterface.set_blocking()
IWindowInterface.set_dimensions()
IWindowInterface.set_display_title()
IWindowInterface.set_minimum_dimensions()
IWindowInterface.set_position()
IWindowInterface.set_relative_position()
IWindowInterface.should_use_window_edge_resize_cursor()
IWindowInterface.update()
- pygame_gui.core.text package
- Submodules
- pygame_gui.core.text.horiz_rule_layout_rect module
- pygame_gui.core.text.html_parser module
- pygame_gui.core.text.hyperlink_text_chunk module
- pygame_gui.core.text.image_layout_rect module
- pygame_gui.core.text.line_break_layout_rect module
- pygame_gui.core.text.text_box_layout module
TextBoxLayout
TextBoxLayout.add_chunks_to_hover_group()
TextBoxLayout.align_left_all_rows()
TextBoxLayout.align_right_all_rows()
TextBoxLayout.append_layout_rects()
TextBoxLayout.backspace_at_cursor()
TextBoxLayout.blit_finalised_text_to_surf()
TextBoxLayout.clear_effects()
TextBoxLayout.clear_final_surface()
TextBoxLayout.delete_at_cursor()
TextBoxLayout.delete_selected_text()
TextBoxLayout.finalise_to_new()
TextBoxLayout.finalise_to_surf()
TextBoxLayout.find_cursor_position_from_click_pos()
TextBoxLayout.get_cursor_colour()
TextBoxLayout.get_cursor_index()
TextBoxLayout.get_cursor_pos_move_down_one_row()
TextBoxLayout.get_cursor_pos_move_up_one_row()
TextBoxLayout.horiz_center_all_rows()
TextBoxLayout.insert_layout_rects()
TextBoxLayout.insert_line_break()
TextBoxLayout.insert_text()
TextBoxLayout.redraw_other_chunks()
TextBoxLayout.reprocess_layout_queue()
TextBoxLayout.set_alpha()
TextBoxLayout.set_cursor_colour()
TextBoxLayout.set_cursor_from_click_pos()
TextBoxLayout.set_cursor_position()
TextBoxLayout.set_cursor_to_end_of_current_row()
TextBoxLayout.set_cursor_to_start_of_current_row()
TextBoxLayout.set_default_text_colour()
TextBoxLayout.set_default_text_shadow_colour()
TextBoxLayout.set_text_selection()
TextBoxLayout.toggle_cursor()
TextBoxLayout.turn_off_cursor()
TextBoxLayout.turn_on_cursor()
TextBoxLayout.update_text_with_new_text_end_pos()
TextBoxLayout.vert_align_bottom_all_rows()
TextBoxLayout.vert_align_top_all_rows()
TextBoxLayout.vert_center_all_rows()
- pygame_gui.core.text.text_box_layout_row module
TextBoxLayoutRow
TextBoxLayoutRow.add_item()
TextBoxLayoutRow.align_left_row()
TextBoxLayoutRow.align_right_row()
TextBoxLayoutRow.at_start()
TextBoxLayoutRow.clear()
TextBoxLayoutRow.finalise()
TextBoxLayoutRow.find_cursor_pos_from_click_pos()
TextBoxLayoutRow.get_cursor_index()
TextBoxLayoutRow.horiz_center_row()
TextBoxLayoutRow.insert_new_item_at_start()
TextBoxLayoutRow.insert_text()
TextBoxLayoutRow.merge_adjacent_compatible_chunks()
TextBoxLayoutRow.rewind_row()
TextBoxLayoutRow.set_cursor_from_click_pos()
TextBoxLayoutRow.set_cursor_position()
TextBoxLayoutRow.set_default_text_colour()
TextBoxLayoutRow.set_default_text_shadow_colour()
TextBoxLayoutRow.toggle_cursor()
TextBoxLayoutRow.turn_off_cursor()
TextBoxLayoutRow.turn_on_cursor()
TextBoxLayoutRow.vert_align_items_to_row()
- pygame_gui.core.text.text_layout_rect module
- pygame_gui.core.text.text_line_chunk module
TextLineChunkFTFont
TextLineChunkFTFont.add_text()
TextLineChunkFTFont.backspace_letter_at_index()
TextLineChunkFTFont.can_split()
TextLineChunkFTFont.clear()
TextLineChunkFTFont.clear_effects()
TextLineChunkFTFont.delete_letter_at_index()
TextLineChunkFTFont.finalise()
TextLineChunkFTFont.grab_pre_effect_surface()
TextLineChunkFTFont.insert_text()
TextLineChunkFTFont.redraw()
TextLineChunkFTFont.set_alpha()
TextLineChunkFTFont.set_offset_pos()
TextLineChunkFTFont.set_rotation()
TextLineChunkFTFont.set_scale()
TextLineChunkFTFont.split()
TextLineChunkFTFont.split_index()
TextLineChunkFTFont.style_match()
TextLineChunkFTFont.x_pos_to_letter_index()
- Module contents
BounceEffect
ExpandContractEffect
FadeInEffect
FadeOutEffect
HTMLParser
HorizRuleLayoutRect
HyperlinkTextChunk
ImageLayoutRect
LineBreakLayoutRect
ShakeEffect
SimpleTestLayoutRect
TextBoxLayout
TextBoxLayout.add_chunks_to_hover_group()
TextBoxLayout.align_left_all_rows()
TextBoxLayout.align_right_all_rows()
TextBoxLayout.append_layout_rects()
TextBoxLayout.backspace_at_cursor()
TextBoxLayout.blit_finalised_text_to_surf()
TextBoxLayout.clear_effects()
TextBoxLayout.clear_final_surface()
TextBoxLayout.delete_at_cursor()
TextBoxLayout.delete_selected_text()
TextBoxLayout.finalise_to_new()
TextBoxLayout.finalise_to_surf()
TextBoxLayout.find_cursor_position_from_click_pos()
TextBoxLayout.get_cursor_colour()
TextBoxLayout.get_cursor_index()
TextBoxLayout.get_cursor_pos_move_down_one_row()
TextBoxLayout.get_cursor_pos_move_up_one_row()
TextBoxLayout.horiz_center_all_rows()
TextBoxLayout.insert_layout_rects()
TextBoxLayout.insert_line_break()
TextBoxLayout.insert_text()
TextBoxLayout.redraw_other_chunks()
TextBoxLayout.reprocess_layout_queue()
TextBoxLayout.set_alpha()
TextBoxLayout.set_cursor_colour()
TextBoxLayout.set_cursor_from_click_pos()
TextBoxLayout.set_cursor_position()
TextBoxLayout.set_cursor_to_end_of_current_row()
TextBoxLayout.set_cursor_to_start_of_current_row()
TextBoxLayout.set_default_text_colour()
TextBoxLayout.set_default_text_shadow_colour()
TextBoxLayout.set_text_selection()
TextBoxLayout.toggle_cursor()
TextBoxLayout.turn_off_cursor()
TextBoxLayout.turn_on_cursor()
TextBoxLayout.update_text_with_new_text_end_pos()
TextBoxLayout.vert_align_bottom_all_rows()
TextBoxLayout.vert_align_top_all_rows()
TextBoxLayout.vert_center_all_rows()
TextBoxLayoutRow
TextBoxLayoutRow.add_item()
TextBoxLayoutRow.align_left_row()
TextBoxLayoutRow.align_right_row()
TextBoxLayoutRow.at_start()
TextBoxLayoutRow.clear()
TextBoxLayoutRow.finalise()
TextBoxLayoutRow.find_cursor_pos_from_click_pos()
TextBoxLayoutRow.get_cursor_index()
TextBoxLayoutRow.horiz_center_row()
TextBoxLayoutRow.insert_new_item_at_start()
TextBoxLayoutRow.insert_text()
TextBoxLayoutRow.merge_adjacent_compatible_chunks()
TextBoxLayoutRow.rewind_row()
TextBoxLayoutRow.set_cursor_from_click_pos()
TextBoxLayoutRow.set_cursor_position()
TextBoxLayoutRow.set_default_text_colour()
TextBoxLayoutRow.set_default_text_shadow_colour()
TextBoxLayoutRow.toggle_cursor()
TextBoxLayoutRow.turn_off_cursor()
TextBoxLayoutRow.turn_on_cursor()
TextBoxLayoutRow.vert_align_items_to_row()
TextEffect
TextFloatPosition
TextLayoutRect
TextLineChunkFTFont
TextLineChunkFTFont.add_text()
TextLineChunkFTFont.backspace_letter_at_index()
TextLineChunkFTFont.can_split()
TextLineChunkFTFont.clear()
TextLineChunkFTFont.clear_effects()
TextLineChunkFTFont.delete_letter_at_index()
TextLineChunkFTFont.finalise()
TextLineChunkFTFont.grab_pre_effect_surface()
TextLineChunkFTFont.insert_text()
TextLineChunkFTFont.redraw()
TextLineChunkFTFont.set_alpha()
TextLineChunkFTFont.set_offset_pos()
TextLineChunkFTFont.set_rotation()
TextLineChunkFTFont.set_scale()
TextLineChunkFTFont.split()
TextLineChunkFTFont.split_index()
TextLineChunkFTFont.style_match()
TextLineChunkFTFont.x_pos_to_letter_index()
TiltEffect
TypingAppearEffect
- pygame_gui.core.drawable_shapes package
- Submodules
- pygame_gui.core.colour_gradient module
- pygame_gui.core.colour_parser module
ColourValueParserData
NumParserType
expand_shorthand_hex()
get_commas_outside_enclosing_glyphs()
is_valid_cmy_string()
is_valid_colour_name()
is_valid_colour_string()
is_valid_gradient_string()
is_valid_hex_string()
is_valid_hsl_string()
is_valid_hsla_string()
is_valid_hsv_string()
is_valid_hsva_string()
is_valid_rgb_string()
is_valid_rgba_string()
may_be_gradient_string()
parse_cmy_string()
parse_colour_model()
parse_colour_name()
parse_colour_or_gradient_string()
parse_colour_string()
parse_gradient_string()
parse_hex_string()
parse_hsl_string()
parse_hsla_string()
parse_hsv_string()
parse_hsva_string()
parse_rgb_string()
parse_rgba_string()
split_string_at_indices()
valid_enclosing_glyphs()
validate_colour_model()
- pygame_gui.core.gui_font_pygame module
- pygame_gui.core.layered_gui_group module
- pygame_gui.core.object_id module
- pygame_gui.core.resource_loaders module
- pygame_gui.core.surface_cache module
SurfaceCache
SurfaceCache.add_surface_to_cache()
SurfaceCache.add_surface_to_long_term_cache()
SurfaceCache.build_cache_id()
SurfaceCache.find_surface_in_cache()
SurfaceCache.remove_user_and_request_clean_up_of_cached_item()
SurfaceCache.remove_user_from_cache_item()
SurfaceCache.split_rect()
SurfaceCache.update()
- pygame_gui.core.ui_appearance_theme module
UIAppearanceTheme
UIAppearanceTheme.build_all_combined_ids()
UIAppearanceTheme.check_need_to_reload()
UIAppearanceTheme.get_colour()
UIAppearanceTheme.get_colour_or_gradient()
UIAppearanceTheme.get_font()
UIAppearanceTheme.get_font_dictionary()
UIAppearanceTheme.get_font_info()
UIAppearanceTheme.get_image()
UIAppearanceTheme.get_misc_data()
UIAppearanceTheme.load_theme()
UIAppearanceTheme.reload_theming()
UIAppearanceTheme.set_locale()
UIAppearanceTheme.update_caching()
UIAppearanceTheme.update_single_element_theming()
UIAppearanceTheme.update_theming()
- pygame_gui.core.ui_container module
UIContainer
UIContainer.add_element()
UIContainer.are_contents_hovered()
UIContainer.calc_add_element_changes_thickness()
UIContainer.change_layer()
UIContainer.check_hover()
UIContainer.clear()
UIContainer.disable()
UIContainer.enable()
UIContainer.expand_left()
UIContainer.expand_top()
UIContainer.get_container()
UIContainer.get_rect()
UIContainer.get_size()
UIContainer.get_thickness()
UIContainer.get_top_layer()
UIContainer.hide()
UIContainer.kill()
UIContainer.on_contained_elements_changed()
UIContainer.recalculate_container_layer_thickness()
UIContainer.remove_element()
UIContainer.set_dimensions()
UIContainer.set_position()
UIContainer.set_relative_position()
UIContainer.show()
UIContainer.update_containing_rect_position()
- pygame_gui.core.ui_element module
UIElement
UIElement.can_hover()
UIElement.change_layer()
UIElement.change_object_id()
UIElement.check_hover()
UIElement.disable()
UIElement.enable()
UIElement.focus()
UIElement.get_abs_rect()
UIElement.get_anchor_targets()
UIElement.get_anchors()
UIElement.get_class_ids()
UIElement.get_element_base_ids()
UIElement.get_element_ids()
UIElement.get_focus_set()
UIElement.get_image_clipping_rect()
UIElement.get_object_ids()
UIElement.get_relative_rect()
UIElement.get_starting_height()
UIElement.get_top_layer()
UIElement.hide()
UIElement.hover_point()
UIElement.hovered
UIElement.join_focus_sets()
UIElement.kill()
UIElement.on_fresh_drawable_shape_ready()
UIElement.on_hovered()
UIElement.on_locale_changed()
UIElement.on_unhovered()
UIElement.process_event()
UIElement.rebuild()
UIElement.rebuild_from_changed_theme_data()
UIElement.remove_element_from_focus_set()
UIElement.set_anchors()
UIElement.set_container()
UIElement.set_dimensions()
UIElement.set_focus_set()
UIElement.set_image()
UIElement.set_minimum_dimensions()
UIElement.set_position()
UIElement.set_relative_position()
UIElement.set_visual_debug_mode()
UIElement.show()
UIElement.unfocus()
UIElement.update()
UIElement.update_containing_rect_position()
UIElement.update_theming()
UIElement.while_hovering()
- pygame_gui.core.ui_font_dictionary module
DefaultFontData
UIFontDictionary
UIFontDictionary.add_font_path()
UIFontDictionary.check_font_preloaded()
UIFontDictionary.convert_html_to_point_size()
UIFontDictionary.create_font_id()
UIFontDictionary.ensure_debug_font_loaded()
UIFontDictionary.find_font()
UIFontDictionary.find_font_resource()
UIFontDictionary.get_default_font()
UIFontDictionary.preload_font()
UIFontDictionary.print_unused_loaded_fonts()
UIFontDictionary.set_locale()
- pygame_gui.core.ui_shadow module
- pygame_gui.core.ui_window_stack module
- Module contents
BlockingThreadedResourceLoader
ColourGradient
IContainerLikeInterface
IWindowInterface
IWindowInterface.always_on_top
IWindowInterface.can_hover()
IWindowInterface.change_layer()
IWindowInterface.check_clicked_inside_or_blocking()
IWindowInterface.check_hover()
IWindowInterface.get_hovering_edge_id()
IWindowInterface.get_layer_thickness()
IWindowInterface.get_top_layer()
IWindowInterface.kill()
IWindowInterface.layer
IWindowInterface.on_moved_to_front()
IWindowInterface.process_event()
IWindowInterface.rebuild()
IWindowInterface.rebuild_from_changed_theme_data()
IWindowInterface.set_blocking()
IWindowInterface.set_dimensions()
IWindowInterface.set_display_title()
IWindowInterface.set_minimum_dimensions()
IWindowInterface.set_position()
IWindowInterface.set_relative_position()
IWindowInterface.should_use_window_edge_resize_cursor()
IWindowInterface.update()
IncrementalThreadedResourceLoader
ObjectID
ShadowGenerator
TextBoxLayout
TextBoxLayout.add_chunks_to_hover_group()
TextBoxLayout.align_left_all_rows()
TextBoxLayout.align_right_all_rows()
TextBoxLayout.append_layout_rects()
TextBoxLayout.backspace_at_cursor()
TextBoxLayout.blit_finalised_text_to_surf()
TextBoxLayout.clear_effects()
TextBoxLayout.clear_final_surface()
TextBoxLayout.delete_at_cursor()
TextBoxLayout.delete_selected_text()
TextBoxLayout.finalise_to_new()
TextBoxLayout.finalise_to_surf()
TextBoxLayout.find_cursor_position_from_click_pos()
TextBoxLayout.get_cursor_colour()
TextBoxLayout.get_cursor_index()
TextBoxLayout.get_cursor_pos_move_down_one_row()
TextBoxLayout.get_cursor_pos_move_up_one_row()
TextBoxLayout.horiz_center_all_rows()
TextBoxLayout.insert_layout_rects()
TextBoxLayout.insert_line_break()
TextBoxLayout.insert_text()
TextBoxLayout.redraw_other_chunks()
TextBoxLayout.reprocess_layout_queue()
TextBoxLayout.set_alpha()
TextBoxLayout.set_cursor_colour()
TextBoxLayout.set_cursor_from_click_pos()
TextBoxLayout.set_cursor_position()
TextBoxLayout.set_cursor_to_end_of_current_row()
TextBoxLayout.set_cursor_to_start_of_current_row()
TextBoxLayout.set_default_text_colour()
TextBoxLayout.set_default_text_shadow_colour()
TextBoxLayout.set_text_selection()
TextBoxLayout.toggle_cursor()
TextBoxLayout.turn_off_cursor()
TextBoxLayout.turn_on_cursor()
TextBoxLayout.update_text_with_new_text_end_pos()
TextBoxLayout.vert_align_bottom_all_rows()
TextBoxLayout.vert_align_top_all_rows()
TextBoxLayout.vert_center_all_rows()
UIAppearanceTheme
UIAppearanceTheme.build_all_combined_ids()
UIAppearanceTheme.check_need_to_reload()
UIAppearanceTheme.get_colour()
UIAppearanceTheme.get_colour_or_gradient()
UIAppearanceTheme.get_font()
UIAppearanceTheme.get_font_dictionary()
UIAppearanceTheme.get_font_info()
UIAppearanceTheme.get_image()
UIAppearanceTheme.get_misc_data()
UIAppearanceTheme.load_theme()
UIAppearanceTheme.reload_theming()
UIAppearanceTheme.set_locale()
UIAppearanceTheme.update_caching()
UIAppearanceTheme.update_single_element_theming()
UIAppearanceTheme.update_theming()
UIContainer
UIContainer.add_element()
UIContainer.are_contents_hovered()
UIContainer.calc_add_element_changes_thickness()
UIContainer.change_layer()
UIContainer.check_hover()
UIContainer.clear()
UIContainer.disable()
UIContainer.enable()
UIContainer.expand_left()
UIContainer.expand_top()
UIContainer.get_container()
UIContainer.get_rect()
UIContainer.get_size()
UIContainer.get_thickness()
UIContainer.get_top_layer()
UIContainer.hide()
UIContainer.kill()
UIContainer.on_contained_elements_changed()
UIContainer.recalculate_container_layer_thickness()
UIContainer.remove_element()
UIContainer.set_dimensions()
UIContainer.set_position()
UIContainer.set_relative_position()
UIContainer.show()
UIContainer.update_containing_rect_position()
UIElement
UIElement.can_hover()
UIElement.change_layer()
UIElement.change_object_id()
UIElement.check_hover()
UIElement.disable()
UIElement.enable()
UIElement.focus()
UIElement.get_abs_rect()
UIElement.get_anchor_targets()
UIElement.get_anchors()
UIElement.get_class_ids()
UIElement.get_element_base_ids()
UIElement.get_element_ids()
UIElement.get_focus_set()
UIElement.get_image_clipping_rect()
UIElement.get_object_ids()
UIElement.get_relative_rect()
UIElement.get_starting_height()
UIElement.get_top_layer()
UIElement.hide()
UIElement.hover_point()
UIElement.hovered
UIElement.join_focus_sets()
UIElement.kill()
UIElement.on_fresh_drawable_shape_ready()
UIElement.on_hovered()
UIElement.on_locale_changed()
UIElement.on_unhovered()
UIElement.process_event()
UIElement.rebuild()
UIElement.rebuild_from_changed_theme_data()
UIElement.remove_element_from_focus_set()
UIElement.set_anchors()
UIElement.set_container()
UIElement.set_dimensions()
UIElement.set_focus_set()
UIElement.set_image()
UIElement.set_minimum_dimensions()
UIElement.set_position()
UIElement.set_relative_position()
UIElement.set_visual_debug_mode()
UIElement.show()
UIElement.unfocus()
UIElement.update()
UIElement.update_containing_rect_position()
UIElement.update_theming()
UIElement.while_hovering()
UIFontDictionary
UIFontDictionary.add_font_path()
UIFontDictionary.check_font_preloaded()
UIFontDictionary.convert_html_to_point_size()
UIFontDictionary.create_font_id()
UIFontDictionary.ensure_debug_font_loaded()
UIFontDictionary.find_font()
UIFontDictionary.find_font_resource()
UIFontDictionary.get_default_font()
UIFontDictionary.preload_font()
UIFontDictionary.print_unused_loaded_fonts()
UIFontDictionary.set_locale()
UIWindowStack
- Subpackages
- pygame_gui.elements package
- Submodules
- pygame_gui.elements.ui_2d_slider module
UI2DSlider
UI2DSlider.disable()
UI2DSlider.enable()
UI2DSlider.get_current_value()
UI2DSlider.hide()
UI2DSlider.kill()
UI2DSlider.rebuild()
UI2DSlider.rebuild_from_changed_theme_data()
UI2DSlider.set_current_value()
UI2DSlider.set_dimensions()
UI2DSlider.set_position()
UI2DSlider.set_relative_position()
UI2DSlider.show()
UI2DSlider.update()
- pygame_gui.elements.ui_auto_resizing_container module
UIAutoResizingContainer
UIAutoResizingContainer.add_element()
UIAutoResizingContainer.on_contained_elements_changed()
UIAutoResizingContainer.recalculate_abs_edges_rect()
UIAutoResizingContainer.remove_element()
UIAutoResizingContainer.update()
UIAutoResizingContainer.update_containing_rect_position()
UIAutoResizingContainer.update_max_edges_rect()
UIAutoResizingContainer.update_min_edges_rect()
- pygame_gui.elements.ui_button module
UIButton
UIButton.bind()
UIButton.can_hover()
UIButton.check_pressed()
UIButton.disable()
UIButton.enable()
UIButton.hide()
UIButton.hover_point()
UIButton.in_hold_range()
UIButton.kill()
UIButton.on_hovered()
UIButton.on_locale_changed()
UIButton.on_self_event()
UIButton.on_unhovered()
UIButton.process_event()
UIButton.rebuild()
UIButton.rebuild_from_changed_theme_data()
UIButton.select()
UIButton.set_hold_range()
UIButton.set_text()
UIButton.unselect()
UIButton.update()
- pygame_gui.elements.ui_drop_down_menu module
UIClosedDropDownState
UIClosedDropDownState.disable()
UIClosedDropDownState.enable()
UIClosedDropDownState.finish()
UIClosedDropDownState.hide()
UIClosedDropDownState.process_event()
UIClosedDropDownState.rebuild()
UIClosedDropDownState.show()
UIClosedDropDownState.start()
UIClosedDropDownState.update_dimensions()
UIClosedDropDownState.update_position()
UIDropDownMenu
UIDropDownMenu.add_options()
UIDropDownMenu.disable()
UIDropDownMenu.enable()
UIDropDownMenu.hide()
UIDropDownMenu.kill()
UIDropDownMenu.on_fresh_drawable_shape_ready()
UIDropDownMenu.process_event()
UIDropDownMenu.rebuild()
UIDropDownMenu.rebuild_from_changed_theme_data()
UIDropDownMenu.remove_options()
UIDropDownMenu.set_dimensions()
UIDropDownMenu.set_position()
UIDropDownMenu.set_relative_position()
UIDropDownMenu.show()
UIDropDownMenu.unfocus()
UIDropDownMenu.update()
UIExpandedDropDownState
- pygame_gui.elements.ui_horizontal_scroll_bar module
UIHorizontalScrollBar
UIHorizontalScrollBar.check_has_moved_recently()
UIHorizontalScrollBar.disable()
UIHorizontalScrollBar.enable()
UIHorizontalScrollBar.hide()
UIHorizontalScrollBar.kill()
UIHorizontalScrollBar.process_event()
UIHorizontalScrollBar.rebuild()
UIHorizontalScrollBar.rebuild_from_changed_theme_data()
UIHorizontalScrollBar.redraw_scrollbar()
UIHorizontalScrollBar.reset_scroll_position()
UIHorizontalScrollBar.set_dimensions()
UIHorizontalScrollBar.set_position()
UIHorizontalScrollBar.set_relative_position()
UIHorizontalScrollBar.set_scroll_from_start_percentage()
UIHorizontalScrollBar.set_visible_percentage()
UIHorizontalScrollBar.show()
UIHorizontalScrollBar.start_percentage
UIHorizontalScrollBar.update()
- pygame_gui.elements.ui_horizontal_slider module
UIHorizontalSlider
UIHorizontalSlider.disable()
UIHorizontalSlider.enable()
UIHorizontalSlider.get_current_value()
UIHorizontalSlider.hide()
UIHorizontalSlider.kill()
UIHorizontalSlider.process_event()
UIHorizontalSlider.rebuild()
UIHorizontalSlider.rebuild_from_changed_theme_data()
UIHorizontalSlider.set_current_value()
UIHorizontalSlider.set_dimensions()
UIHorizontalSlider.set_position()
UIHorizontalSlider.set_relative_position()
UIHorizontalSlider.show()
UIHorizontalSlider.update()
- pygame_gui.elements.ui_image module
- pygame_gui.elements.ui_label module
UILabel
UILabel.clear_all_active_effects()
UILabel.clear_text_surface()
UILabel.disable()
UILabel.enable()
UILabel.get_object_id()
UILabel.get_text_letter_count()
UILabel.on_locale_changed()
UILabel.rebuild()
UILabel.rebuild_from_changed_theme_data()
UILabel.set_active_effect()
UILabel.set_text()
UILabel.set_text_alpha()
UILabel.set_text_offset_pos()
UILabel.set_text_rotation()
UILabel.set_text_scale()
UILabel.stop_finished_effect()
UILabel.update()
UILabel.update_text_effect()
UILabel.update_text_end_position()
- pygame_gui.elements.ui_panel module
UIPanel
UIPanel.are_contents_hovered()
UIPanel.disable()
UIPanel.enable()
UIPanel.get_container()
UIPanel.hide()
UIPanel.kill()
UIPanel.process_event()
UIPanel.rebuild()
UIPanel.rebuild_from_changed_theme_data()
UIPanel.set_anchors()
UIPanel.set_dimensions()
UIPanel.set_position()
UIPanel.set_relative_position()
UIPanel.show()
UIPanel.update()
- pygame_gui.elements.ui_progress_bar module
- pygame_gui.elements.ui_screen_space_health_bar module
- pygame_gui.elements.ui_scrolling_container module
UIScrollingContainer
UIScrollingContainer.are_contents_hovered()
UIScrollingContainer.disable()
UIScrollingContainer.enable()
UIScrollingContainer.get_container()
UIScrollingContainer.hide()
UIScrollingContainer.kill()
UIScrollingContainer.set_anchors()
UIScrollingContainer.set_dimensions()
UIScrollingContainer.set_position()
UIScrollingContainer.set_relative_position()
UIScrollingContainer.set_scrollable_area_dimensions()
UIScrollingContainer.show()
UIScrollingContainer.update()
- pygame_gui.elements.ui_selection_list module
UISelectionList
UISelectionList.add_items()
UISelectionList.disable()
UISelectionList.enable()
UISelectionList.get_multi_selection()
UISelectionList.get_single_selection()
UISelectionList.get_single_selection_start_percentage()
UISelectionList.hide()
UISelectionList.kill()
UISelectionList.process_event()
UISelectionList.rebuild()
UISelectionList.rebuild_from_changed_theme_data()
UISelectionList.remove_items()
UISelectionList.set_dimensions()
UISelectionList.set_item_list()
UISelectionList.set_position()
UISelectionList.set_relative_position()
UISelectionList.show()
UISelectionList.update()
- pygame_gui.elements.ui_status_bar module
- pygame_gui.elements.ui_text_box module
UITextBox
UITextBox.append_html_text()
UITextBox.clear_all_active_effects()
UITextBox.clear_text_surface()
UITextBox.disable()
UITextBox.enable()
UITextBox.focus()
UITextBox.full_redraw()
UITextBox.get_object_id()
UITextBox.get_text_letter_count()
UITextBox.hide()
UITextBox.kill()
UITextBox.on_fresh_drawable_shape_ready()
UITextBox.on_locale_changed()
UITextBox.parse_html_into_style_data()
UITextBox.process_event()
UITextBox.rebuild()
UITextBox.rebuild_from_changed_theme_data()
UITextBox.redraw_from_chunks()
UITextBox.redraw_from_text_block()
UITextBox.select_range
UITextBox.set_active_effect()
UITextBox.set_dimensions()
UITextBox.set_position()
UITextBox.set_relative_position()
UITextBox.set_text_alpha()
UITextBox.set_text_offset_pos()
UITextBox.set_text_rotation()
UITextBox.set_text_scale()
UITextBox.show()
UITextBox.stop_finished_effect()
UITextBox.unfocus()
UITextBox.update()
UITextBox.update_text_effect()
UITextBox.update_text_end_position()
- pygame_gui.elements.ui_text_entry_box module
- pygame_gui.elements.ui_text_entry_line module
UITextEntryLine
UITextEntryLine.disable()
UITextEntryLine.enable()
UITextEntryLine.focus()
UITextEntryLine.get_text()
UITextEntryLine.on_locale_changed()
UITextEntryLine.process_event()
UITextEntryLine.rebuild()
UITextEntryLine.rebuild_from_changed_theme_data()
UITextEntryLine.redraw()
UITextEntryLine.select_range
UITextEntryLine.set_allowed_characters()
UITextEntryLine.set_forbidden_characters()
UITextEntryLine.set_text()
UITextEntryLine.set_text_hidden()
UITextEntryLine.set_text_length_limit()
UITextEntryLine.unfocus()
UITextEntryLine.update()
UITextEntryLine.validate_text_string()
- pygame_gui.elements.ui_tool_tip module
- pygame_gui.elements.ui_vertical_scroll_bar module
UIVerticalScrollBar
UIVerticalScrollBar.check_has_moved_recently()
UIVerticalScrollBar.disable()
UIVerticalScrollBar.enable()
UIVerticalScrollBar.hide()
UIVerticalScrollBar.kill()
UIVerticalScrollBar.process_event()
UIVerticalScrollBar.rebuild()
UIVerticalScrollBar.rebuild_from_changed_theme_data()
UIVerticalScrollBar.redraw_scrollbar()
UIVerticalScrollBar.reset_scroll_position()
UIVerticalScrollBar.set_dimensions()
UIVerticalScrollBar.set_position()
UIVerticalScrollBar.set_relative_position()
UIVerticalScrollBar.set_scroll_from_start_percentage()
UIVerticalScrollBar.set_visible_percentage()
UIVerticalScrollBar.show()
UIVerticalScrollBar.start_percentage
UIVerticalScrollBar.update()
- pygame_gui.elements.ui_window module
UIWindow
UIWindow.always_on_top
UIWindow.are_contents_hovered()
UIWindow.can_hover()
UIWindow.change_layer()
UIWindow.check_clicked_inside_or_blocking()
UIWindow.check_hover()
UIWindow.disable()
UIWindow.enable()
UIWindow.get_container()
UIWindow.get_hovering_edge_id()
UIWindow.get_layer_thickness()
UIWindow.get_relative_mouse_pos()
UIWindow.get_top_layer()
UIWindow.hide()
UIWindow.kill()
UIWindow.on_close_window_button_pressed()
UIWindow.on_moved_to_front()
UIWindow.process_event()
UIWindow.rebuild()
UIWindow.rebuild_from_changed_theme_data()
UIWindow.set_blocking()
UIWindow.set_dimensions()
UIWindow.set_display_title()
UIWindow.set_position()
UIWindow.set_relative_position()
UIWindow.should_use_window_edge_resize_cursor()
UIWindow.show()
UIWindow.update()
- pygame_gui.elements.ui_world_space_health_bar module
- Module contents
InputField
UI2DSlider
UI2DSlider.disable()
UI2DSlider.enable()
UI2DSlider.get_current_value()
UI2DSlider.hide()
UI2DSlider.kill()
UI2DSlider.rebuild()
UI2DSlider.rebuild_from_changed_theme_data()
UI2DSlider.set_current_value()
UI2DSlider.set_dimensions()
UI2DSlider.set_position()
UI2DSlider.set_relative_position()
UI2DSlider.show()
UI2DSlider.update()
UIAutoResizingContainer
UIAutoResizingContainer.add_element()
UIAutoResizingContainer.on_contained_elements_changed()
UIAutoResizingContainer.recalculate_abs_edges_rect()
UIAutoResizingContainer.remove_element()
UIAutoResizingContainer.update()
UIAutoResizingContainer.update_containing_rect_position()
UIAutoResizingContainer.update_max_edges_rect()
UIAutoResizingContainer.update_min_edges_rect()
UIButton
UIButton.bind()
UIButton.can_hover()
UIButton.check_pressed()
UIButton.disable()
UIButton.enable()
UIButton.hide()
UIButton.hover_point()
UIButton.in_hold_range()
UIButton.kill()
UIButton.on_hovered()
UIButton.on_locale_changed()
UIButton.on_self_event()
UIButton.on_unhovered()
UIButton.process_event()
UIButton.rebuild()
UIButton.rebuild_from_changed_theme_data()
UIButton.select()
UIButton.set_hold_range()
UIButton.set_text()
UIButton.unselect()
UIButton.update()
UIDropDownMenu
UIDropDownMenu.add_options()
UIDropDownMenu.disable()
UIDropDownMenu.enable()
UIDropDownMenu.hide()
UIDropDownMenu.kill()
UIDropDownMenu.on_fresh_drawable_shape_ready()
UIDropDownMenu.process_event()
UIDropDownMenu.rebuild()
UIDropDownMenu.rebuild_from_changed_theme_data()
UIDropDownMenu.remove_options()
UIDropDownMenu.set_dimensions()
UIDropDownMenu.set_position()
UIDropDownMenu.set_relative_position()
UIDropDownMenu.show()
UIDropDownMenu.unfocus()
UIDropDownMenu.update()
UIForm
UIHorizontalScrollBar
UIHorizontalScrollBar.check_has_moved_recently()
UIHorizontalScrollBar.disable()
UIHorizontalScrollBar.enable()
UIHorizontalScrollBar.hide()
UIHorizontalScrollBar.kill()
UIHorizontalScrollBar.process_event()
UIHorizontalScrollBar.rebuild()
UIHorizontalScrollBar.rebuild_from_changed_theme_data()
UIHorizontalScrollBar.redraw_scrollbar()
UIHorizontalScrollBar.reset_scroll_position()
UIHorizontalScrollBar.set_dimensions()
UIHorizontalScrollBar.set_position()
UIHorizontalScrollBar.set_relative_position()
UIHorizontalScrollBar.set_scroll_from_start_percentage()
UIHorizontalScrollBar.set_visible_percentage()
UIHorizontalScrollBar.show()
UIHorizontalScrollBar.start_percentage
UIHorizontalScrollBar.update()
UIHorizontalSlider
UIHorizontalSlider.disable()
UIHorizontalSlider.enable()
UIHorizontalSlider.get_current_value()
UIHorizontalSlider.hide()
UIHorizontalSlider.kill()
UIHorizontalSlider.process_event()
UIHorizontalSlider.rebuild()
UIHorizontalSlider.rebuild_from_changed_theme_data()
UIHorizontalSlider.set_current_value()
UIHorizontalSlider.set_dimensions()
UIHorizontalSlider.set_position()
UIHorizontalSlider.set_relative_position()
UIHorizontalSlider.show()
UIHorizontalSlider.update()
UIImage
UILabel
UILabel.clear_all_active_effects()
UILabel.clear_text_surface()
UILabel.disable()
UILabel.enable()
UILabel.get_object_id()
UILabel.get_text_letter_count()
UILabel.on_locale_changed()
UILabel.rebuild()
UILabel.rebuild_from_changed_theme_data()
UILabel.set_active_effect()
UILabel.set_text()
UILabel.set_text_alpha()
UILabel.set_text_offset_pos()
UILabel.set_text_rotation()
UILabel.set_text_scale()
UILabel.stop_finished_effect()
UILabel.update()
UILabel.update_text_effect()
UILabel.update_text_end_position()
UIPanel
UIPanel.are_contents_hovered()
UIPanel.disable()
UIPanel.enable()
UIPanel.get_container()
UIPanel.hide()
UIPanel.kill()
UIPanel.process_event()
UIPanel.rebuild()
UIPanel.rebuild_from_changed_theme_data()
UIPanel.set_anchors()
UIPanel.set_dimensions()
UIPanel.set_position()
UIPanel.set_relative_position()
UIPanel.show()
UIPanel.update()
UIProgressBar
UIScreenSpaceHealthBar
UIScrollingContainer
UIScrollingContainer.are_contents_hovered()
UIScrollingContainer.disable()
UIScrollingContainer.enable()
UIScrollingContainer.get_container()
UIScrollingContainer.hide()
UIScrollingContainer.kill()
UIScrollingContainer.set_anchors()
UIScrollingContainer.set_dimensions()
UIScrollingContainer.set_position()
UIScrollingContainer.set_relative_position()
UIScrollingContainer.set_scrollable_area_dimensions()
UIScrollingContainer.show()
UIScrollingContainer.update()
UISelectionList
UISelectionList.add_items()
UISelectionList.disable()
UISelectionList.enable()
UISelectionList.get_multi_selection()
UISelectionList.get_single_selection()
UISelectionList.get_single_selection_start_percentage()
UISelectionList.hide()
UISelectionList.kill()
UISelectionList.process_event()
UISelectionList.rebuild()
UISelectionList.rebuild_from_changed_theme_data()
UISelectionList.remove_items()
UISelectionList.set_dimensions()
UISelectionList.set_item_list()
UISelectionList.set_position()
UISelectionList.set_relative_position()
UISelectionList.show()
UISelectionList.update()
UIStatusBar
UITabContainer
UITextBox
UITextBox.append_html_text()
UITextBox.clear_all_active_effects()
UITextBox.clear_text_surface()
UITextBox.disable()
UITextBox.enable()
UITextBox.focus()
UITextBox.full_redraw()
UITextBox.get_object_id()
UITextBox.get_text_letter_count()
UITextBox.hide()
UITextBox.kill()
UITextBox.on_fresh_drawable_shape_ready()
UITextBox.on_locale_changed()
UITextBox.parse_html_into_style_data()
UITextBox.process_event()
UITextBox.rebuild()
UITextBox.rebuild_from_changed_theme_data()
UITextBox.redraw_from_chunks()
UITextBox.redraw_from_text_block()
UITextBox.select_range
UITextBox.set_active_effect()
UITextBox.set_dimensions()
UITextBox.set_position()
UITextBox.set_relative_position()
UITextBox.set_text_alpha()
UITextBox.set_text_offset_pos()
UITextBox.set_text_rotation()
UITextBox.set_text_scale()
UITextBox.show()
UITextBox.stop_finished_effect()
UITextBox.unfocus()
UITextBox.update()
UITextBox.update_text_effect()
UITextBox.update_text_end_position()
UITextEntryBox
UITextEntryLine
UITextEntryLine.disable()
UITextEntryLine.enable()
UITextEntryLine.focus()
UITextEntryLine.get_text()
UITextEntryLine.on_locale_changed()
UITextEntryLine.process_event()
UITextEntryLine.rebuild()
UITextEntryLine.rebuild_from_changed_theme_data()
UITextEntryLine.redraw()
UITextEntryLine.select_range
UITextEntryLine.set_allowed_characters()
UITextEntryLine.set_forbidden_characters()
UITextEntryLine.set_text()
UITextEntryLine.set_text_hidden()
UITextEntryLine.set_text_length_limit()
UITextEntryLine.unfocus()
UITextEntryLine.update()
UITextEntryLine.validate_text_string()
UITooltip
UIVerticalScrollBar
UIVerticalScrollBar.check_has_moved_recently()
UIVerticalScrollBar.disable()
UIVerticalScrollBar.enable()
UIVerticalScrollBar.hide()
UIVerticalScrollBar.kill()
UIVerticalScrollBar.process_event()
UIVerticalScrollBar.rebuild()
UIVerticalScrollBar.rebuild_from_changed_theme_data()
UIVerticalScrollBar.redraw_scrollbar()
UIVerticalScrollBar.reset_scroll_position()
UIVerticalScrollBar.set_dimensions()
UIVerticalScrollBar.set_position()
UIVerticalScrollBar.set_relative_position()
UIVerticalScrollBar.set_scroll_from_start_percentage()
UIVerticalScrollBar.set_visible_percentage()
UIVerticalScrollBar.show()
UIVerticalScrollBar.start_percentage
UIVerticalScrollBar.update()
UIWindow
UIWindow.always_on_top
UIWindow.are_contents_hovered()
UIWindow.can_hover()
UIWindow.change_layer()
UIWindow.check_clicked_inside_or_blocking()
UIWindow.check_hover()
UIWindow.disable()
UIWindow.enable()
UIWindow.get_container()
UIWindow.get_hovering_edge_id()
UIWindow.get_layer_thickness()
UIWindow.get_relative_mouse_pos()
UIWindow.get_top_layer()
UIWindow.hide()
UIWindow.kill()
UIWindow.on_close_window_button_pressed()
UIWindow.on_moved_to_front()
UIWindow.process_event()
UIWindow.rebuild()
UIWindow.rebuild_from_changed_theme_data()
UIWindow.set_blocking()
UIWindow.set_dimensions()
UIWindow.set_display_title()
UIWindow.set_position()
UIWindow.set_relative_position()
UIWindow.should_use_window_edge_resize_cursor()
UIWindow.show()
UIWindow.update()
UIWorldSpaceHealthBar
- pygame_gui.windows package
- Submodules
- pygame_gui.windows.ui_colour_picker_dialog module
UIColourChannelEditor
UIColourPickerDialog
UIColourPickerDialog.changed_hsv_update_rgb()
UIColourPickerDialog.changed_rgb_update_hsv()
UIColourPickerDialog.get_colour()
UIColourPickerDialog.process_event()
UIColourPickerDialog.set_colour()
UIColourPickerDialog.update_colour_2d_slider()
UIColourPickerDialog.update_current_colour_image()
UIColourPickerDialog.update_saturation_value_square()
- pygame_gui.windows.ui_confirmation_dialog module
- pygame_gui.windows.ui_console_window module
- pygame_gui.windows.ui_file_dialog module
- pygame_gui.windows.ui_message_window module
- Module contents
UIColourPickerDialog
UIColourPickerDialog.changed_hsv_update_rgb()
UIColourPickerDialog.changed_rgb_update_hsv()
UIColourPickerDialog.get_colour()
UIColourPickerDialog.process_event()
UIColourPickerDialog.set_colour()
UIColourPickerDialog.update_colour_2d_slider()
UIColourPickerDialog.update_current_colour_image()
UIColourPickerDialog.update_saturation_value_square()
UIConfirmationDialog
UIConsoleWindow
UIFileDialog
UIMessageWindow
Submodules
pygame_gui.ui_manager module
- class pygame_gui.ui_manager.UIManager(window_resolution: Tuple[int, int], theme_path: str | PathLike | StringIO | PackageResource | dict | None = None, enable_live_theme_updates: bool = True, resource_loader: IResourceLoader | None = None, starting_language: str = 'en', translation_directory_paths: List[str] | None = None)
Bases:
IUIManagerInterface
The UI Manager class helps keep track of all the moving parts in the pygame_gui system.
Before doing anything else with pygame_gui create a UIManager and remember to update it every frame.
- Parameters:
window_resolution -- window resolution.
theme_path -- relative file path to theme or theme dictionary.
enable_live_theme_updates -- Lets the theme update in-game after we edit the theme file
- add_font_paths(font_name: str, regular_path: str, bold_path: str | None = None, italic_path: str | None = None, bold_italic_path: str | None = None)
Add file paths for custom fonts you want to use in the UI. For each font name you add you can specify font files for different styles. Fonts with designed styles tend to render a lot better than fonts that are forced to make use of pygame's bold and italic styling effects, so if you plan to use bold and italic text at small sizes - find fonts with these styles available as separate files.
The font name you specify here can be used to choose the font in the blocks of HTML-subset formatted text, available in some of the UI elements like the UITextBox.
It is recommended that you also preload any fonts you use at an appropriate moment in your project rather than letting the library dynamically load them when they are required. That is because dynamic loading of large font files can cause UI elements with a lot of font usage to appear rather slowly as they are waiting for the fonts they need to load.
- Parameters:
font_name -- The name of the font that will be used to reference it elsewhere in the GUI.
regular_path -- The path of the font file for this font with no styles applied.
bold_path -- The path of the font file for this font with just bold style applied.
italic_path -- The path of the font file for this font with just italic style applied.
bold_italic_path -- The path of the font file for this font with bold & italic style applied.
- calculate_scaled_mouse_position(position: Tuple[int, int]) Tuple[int, int]
Scaling an input mouse position by a scale factor.
- clear_and_reset()
Clear all existing windows and the root container, which should get rid of all created UI elements. We then recreate the UIWindowStack and the root container.
- create_new_theme(theme_path: str | PathLike | StringIO | PackageResource | dict | None = None) UIAppearanceTheme
Create a new theme using self information. :param theme_path: relative file path to theme or theme dictionary.
- create_tool_tip(text: str, position: Tuple[int, int], hover_distance: Tuple[int, int], parent_element: IUIElementInterface, object_id: ObjectID, *, wrap_width: int | None = None, text_kwargs: Dict[str, str] | None = None) IUITooltipInterface
Creates a tool tip ands returns it. Have hidden this away in the manager, so we can call it from other UI elements and create tool tips without creating cyclical import problems.
- Parameters:
text -- The tool tips text, can utilise the HTML subset used in all UITextBoxes.
position -- The screen position to create the tool tip for.
hover_distance -- The distance we should hover away from our target position.
parent_element -- The UIElement that spawned this tool tip.
object_id -- the object_id of the tooltip.
wrap_width -- an optional width for the tool tip, will overwrite any value from the theme file.
text_kwargs -- a dictionary of variable arguments to pass to the translated string useful when you have multiple translations that need variables inserted in the middle.
- Returns:
A tool tip placed somewhere on the screen.
- draw_ui(window_surface: Surface)
Draws all the UI elements on to a surface passed in, usually an opaque surface the size of the screen or window. Generally you want this to be after the rest of your game sprites have been drawn.
If you want to do something particularly unusual with drawing you may have to write your own UI manager.
- Parameters:
window_surface --
The screen or window surface on which we are going to draw all of our UI Elements. As pygame_gui uses premultiplied alpha, if the surface passed in is transparent or semi transparent then it should use premultiplied alpha as well and be blitted afterward using the BLEND_PREMULTIPLIED special_flag.
You can read more about premultiplied alpha in this short tutorial: https://pyga.me/docs/tutorials/en/premultiplied-alpha.html
- get_double_click_time() float
Returns time between clicks that counts as a double click.
- Returns:
A float, time measured in seconds.
- get_focus_set()
Gets the focused set.
- Returns:
The set of elements that currently have interactive focus. If None, nothing is currently focused.
- get_hovering_any_element() bool
True if any UI element (other than the root container) is hovered by the mouse.
Combined with 'get_focus_set()' and the return value from process_events(), it should make it easier to switch input events between the UI and other parts of an application.
- get_locale()
Get the locale language code being used in the UIManager
- Returns:
A two-letter ISO 639-1 code for the current locale.
- get_root_container() IUIContainerInterface
Returns the 'root' container. The one all UI elements are placed in by default if they are not placed anywhere else, fills the whole OS/pygame window.
- Returns:
A container.
- get_shadow(size: Tuple[int, int], shadow_width: int = 2, shape: str = 'rectangle', corner_radius: List[int] | None = None) Surface
Returns a 'shadow' surface scaled to the requested size.
- Parameters:
size -- The size of the object we are shadowing + it's shadow.
shadow_width -- The width of the shadowed edge.
shape -- The shape of the requested shadow.
corner_radius -- The radius of the shadow corners if this is a rectangular shadow.
- Returns:
A shadow as a pygame Surface.
- get_sprite_group() LayeredGUIGroup
Gets the sprite group used by the entire UI to keep it in the correct order for drawing and processing input.
- Returns:
The UI's sprite group.
- get_theme() IUIAppearanceThemeInterface
Gets the theme so the data in it can be accessed.
- Returns:
The theme data used by this UIManager
- get_universal_empty_surface() Surface
Sometimes we want to hide sprites or just have sprites with no visual component, when we do we can just use this empty surface to save having lots of empty surfaces all over memory.
- Returns:
An empty and therefore invisible pygame.surface.Surface
- get_window_stack() IUIWindowStackInterface
The UIWindowStack organises any windows in the UI Manager so that they are correctly sorted and move windows we interact with to the top of the stack.
- Returns:
The stack of windows.
- preload_fonts(font_list: List[Dict[str, str | int | float]])
It's a good idea to preload the exact fonts your program uses during the loading phase of your program. By default, the pygame_gui library will still work, but will spit out reminder warnings when you haven't done this. Loading fonts on the fly will slow down the apparent responsiveness when creating UI elements that use a lot of different fonts.
To preload custom fonts, or to use custom fonts at all (i.e. ones that aren't the default 'noto_sans' font) you must first add the paths to the files for those fonts, then load the specific fonts with a list of font descriptions in a dictionary form like so:
{'name': 'noto_sans', 'point_size': 12, 'style': 'bold_italic', 'antialiased': 1}
You can specify size either in pygame.Font point sizes with 'point_size', or in HTML style sizes with 'html_size'. Style options are:
'regular'
'italic'
'bold'
'bold_italic'
The name parameter here must match the one you used when you added the file paths.
- Parameters:
font_list -- A list of font descriptions in dictionary format as described above.
- print_layer_debug()
Print some formatted information on the current state of the UI Layers.
Handy for debugging layer problems.
- print_unused_fonts()
Helps you identify which preloaded fonts you are actually still using in your project after you've fiddled around with the text a lot by printing out a list of fonts that have not been used yet at the time this function is called.
Of course if you don't run the code path in which a particular font is used before calling this function then it won't be of much use, so take its results under advisement rather than as gospel.
- process_events(event: Event)
This is the top level method through which all input to UI elements is processed and reacted to.
One of the key things it controls is the currently 'focused' element of which there can be only one at a time. It also manages 'consumed events' these events will not be passed on to elements below them in the GUI hierarchy and helps us stop buttons underneath windows from receiving input.
- Parameters:
event -- pygame.event.Event - the event to process.
- Returns:
A boolean indicating whether the event was consumed.
- set_active_cursor(cursor: Cursor)
This is for users of the library to set the currently active cursor, it will be currently only be overridden by the resizing cursors.
The expected input is a pygame.cursors.Cursor:
manager.set_active_cursor(pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW))
- set_focus_set(focus: IUIElementInterface | Set[IUIElementInterface] | None)
Set a set of element as the focused set.
- Parameters:
focus -- The set of element to focus on.
- set_locale(locale: str)
Set a locale language code to use in the UIManager
- Parameters:
locale -- A two letter ISO 639-1 code for a supported language.
TODO: Make this raise an exception for an unsupported language?
- set_text_hovered(hovering_text: bool)
Set to true when hovering an area containing selectable text.
Currently, switches the cursor to the I-Beam cursor.
- Parameters:
hovering_text_input -- set to True to toggle the I-Beam cursor
- set_ui_theme(theme: IUIAppearanceThemeInterface, update_all_sprites: bool = False)
Set ui theme.
- Parameters:
theme -- The theme to set.
update_all_sprites --
- set_visual_debug_mode(is_active: bool)
Loops through all our UIElements to turn visual debug mode on or off. Also calls print_layer_debug()
- Parameters:
is_active -- True to activate visual debug and False to turn it off.
- set_window_resolution(window_resolution: Tuple[int, int])
Sets the window resolution.
- Parameters:
window_resolution -- the resolution to set.
- update(time_delta: float)
From here all our UI elements are updated and which element is currently 'hovered' is checked; which means the mouse pointer is overlapping them. This is managed centrally, so we aren't ever overlapping two elements at once.
It also updates the shape cache to continue storing already created elements shapes in the long term cache, in case we need them later.
Finally, if live theme updates are enabled, it checks to see if the theme file has been modified and triggers all the UI elements to rebuild if it has.
- Parameters:
time_delta -- The time passed since the last call to update, in seconds.
Module contents
Pygame GUI module
Provides bits and bobs of UI to help make more complicated interactions with games built in pygame easier to accomplish.
- class pygame_gui.PackageResource(package: str, resource: str)
Bases:
object
A data class to handle input for importlib.resources as single parameter.
- Parameters:
package -- The python package our resource is located in (e.g. 'pygame_gui.data')
resource -- The name of the resource (e.g. 'default_theme.json')
- class pygame_gui.UIManager(window_resolution: Tuple[int, int], theme_path: str | PathLike | StringIO | PackageResource | dict | None = None, enable_live_theme_updates: bool = True, resource_loader: IResourceLoader | None = None, starting_language: str = 'en', translation_directory_paths: List[str] | None = None)
Bases:
IUIManagerInterface
The UI Manager class helps keep track of all the moving parts in the pygame_gui system.
Before doing anything else with pygame_gui create a UIManager and remember to update it every frame.
- Parameters:
window_resolution -- window resolution.
theme_path -- relative file path to theme or theme dictionary.
enable_live_theme_updates -- Lets the theme update in-game after we edit the theme file
- add_font_paths(font_name: str, regular_path: str, bold_path: str | None = None, italic_path: str | None = None, bold_italic_path: str | None = None)
Add file paths for custom fonts you want to use in the UI. For each font name you add you can specify font files for different styles. Fonts with designed styles tend to render a lot better than fonts that are forced to make use of pygame's bold and italic styling effects, so if you plan to use bold and italic text at small sizes - find fonts with these styles available as separate files.
The font name you specify here can be used to choose the font in the blocks of HTML-subset formatted text, available in some of the UI elements like the UITextBox.
It is recommended that you also preload any fonts you use at an appropriate moment in your project rather than letting the library dynamically load them when they are required. That is because dynamic loading of large font files can cause UI elements with a lot of font usage to appear rather slowly as they are waiting for the fonts they need to load.
- Parameters:
font_name -- The name of the font that will be used to reference it elsewhere in the GUI.
regular_path -- The path of the font file for this font with no styles applied.
bold_path -- The path of the font file for this font with just bold style applied.
italic_path -- The path of the font file for this font with just italic style applied.
bold_italic_path -- The path of the font file for this font with bold & italic style applied.
- calculate_scaled_mouse_position(position: Tuple[int, int]) Tuple[int, int]
Scaling an input mouse position by a scale factor.
- clear_and_reset()
Clear all existing windows and the root container, which should get rid of all created UI elements. We then recreate the UIWindowStack and the root container.
- create_new_theme(theme_path: str | PathLike | StringIO | PackageResource | dict | None = None) UIAppearanceTheme
Create a new theme using self information. :param theme_path: relative file path to theme or theme dictionary.
- create_tool_tip(text: str, position: Tuple[int, int], hover_distance: Tuple[int, int], parent_element: IUIElementInterface, object_id: ObjectID, *, wrap_width: int | None = None, text_kwargs: Dict[str, str] | None = None) IUITooltipInterface
Creates a tool tip ands returns it. Have hidden this away in the manager, so we can call it from other UI elements and create tool tips without creating cyclical import problems.
- Parameters:
text -- The tool tips text, can utilise the HTML subset used in all UITextBoxes.
position -- The screen position to create the tool tip for.
hover_distance -- The distance we should hover away from our target position.
parent_element -- The UIElement that spawned this tool tip.
object_id -- the object_id of the tooltip.
wrap_width -- an optional width for the tool tip, will overwrite any value from the theme file.
text_kwargs -- a dictionary of variable arguments to pass to the translated string useful when you have multiple translations that need variables inserted in the middle.
- Returns:
A tool tip placed somewhere on the screen.
- draw_ui(window_surface: Surface)
Draws all the UI elements on to a surface passed in, usually an opaque surface the size of the screen or window. Generally you want this to be after the rest of your game sprites have been drawn.
If you want to do something particularly unusual with drawing you may have to write your own UI manager.
- Parameters:
window_surface --
The screen or window surface on which we are going to draw all of our UI Elements. As pygame_gui uses premultiplied alpha, if the surface passed in is transparent or semi transparent then it should use premultiplied alpha as well and be blitted afterward using the BLEND_PREMULTIPLIED special_flag.
You can read more about premultiplied alpha in this short tutorial: https://pyga.me/docs/tutorials/en/premultiplied-alpha.html
- get_double_click_time() float
Returns time between clicks that counts as a double click.
- Returns:
A float, time measured in seconds.
- get_focus_set()
Gets the focused set.
- Returns:
The set of elements that currently have interactive focus. If None, nothing is currently focused.
- get_hovering_any_element() bool
True if any UI element (other than the root container) is hovered by the mouse.
Combined with 'get_focus_set()' and the return value from process_events(), it should make it easier to switch input events between the UI and other parts of an application.
- get_locale()
Get the locale language code being used in the UIManager
- Returns:
A two-letter ISO 639-1 code for the current locale.
- get_root_container() IUIContainerInterface
Returns the 'root' container. The one all UI elements are placed in by default if they are not placed anywhere else, fills the whole OS/pygame window.
- Returns:
A container.
- get_shadow(size: Tuple[int, int], shadow_width: int = 2, shape: str = 'rectangle', corner_radius: List[int] | None = None) Surface
Returns a 'shadow' surface scaled to the requested size.
- Parameters:
size -- The size of the object we are shadowing + it's shadow.
shadow_width -- The width of the shadowed edge.
shape -- The shape of the requested shadow.
corner_radius -- The radius of the shadow corners if this is a rectangular shadow.
- Returns:
A shadow as a pygame Surface.
- get_sprite_group() LayeredGUIGroup
Gets the sprite group used by the entire UI to keep it in the correct order for drawing and processing input.
- Returns:
The UI's sprite group.
- get_theme() IUIAppearanceThemeInterface
Gets the theme so the data in it can be accessed.
- Returns:
The theme data used by this UIManager
- get_universal_empty_surface() Surface
Sometimes we want to hide sprites or just have sprites with no visual component, when we do we can just use this empty surface to save having lots of empty surfaces all over memory.
- Returns:
An empty and therefore invisible pygame.surface.Surface
- get_window_stack() IUIWindowStackInterface
The UIWindowStack organises any windows in the UI Manager so that they are correctly sorted and move windows we interact with to the top of the stack.
- Returns:
The stack of windows.
- preload_fonts(font_list: List[Dict[str, str | int | float]])
It's a good idea to preload the exact fonts your program uses during the loading phase of your program. By default, the pygame_gui library will still work, but will spit out reminder warnings when you haven't done this. Loading fonts on the fly will slow down the apparent responsiveness when creating UI elements that use a lot of different fonts.
To preload custom fonts, or to use custom fonts at all (i.e. ones that aren't the default 'noto_sans' font) you must first add the paths to the files for those fonts, then load the specific fonts with a list of font descriptions in a dictionary form like so:
{'name': 'noto_sans', 'point_size': 12, 'style': 'bold_italic', 'antialiased': 1}
You can specify size either in pygame.Font point sizes with 'point_size', or in HTML style sizes with 'html_size'. Style options are:
'regular'
'italic'
'bold'
'bold_italic'
The name parameter here must match the one you used when you added the file paths.
- Parameters:
font_list -- A list of font descriptions in dictionary format as described above.
- print_layer_debug()
Print some formatted information on the current state of the UI Layers.
Handy for debugging layer problems.
- print_unused_fonts()
Helps you identify which preloaded fonts you are actually still using in your project after you've fiddled around with the text a lot by printing out a list of fonts that have not been used yet at the time this function is called.
Of course if you don't run the code path in which a particular font is used before calling this function then it won't be of much use, so take its results under advisement rather than as gospel.
- process_events(event: Event)
This is the top level method through which all input to UI elements is processed and reacted to.
One of the key things it controls is the currently 'focused' element of which there can be only one at a time. It also manages 'consumed events' these events will not be passed on to elements below them in the GUI hierarchy and helps us stop buttons underneath windows from receiving input.
- Parameters:
event -- pygame.event.Event - the event to process.
- Returns:
A boolean indicating whether the event was consumed.
- set_active_cursor(cursor: Cursor)
This is for users of the library to set the currently active cursor, it will be currently only be overridden by the resizing cursors.
The expected input is a pygame.cursors.Cursor:
manager.set_active_cursor(pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW))
- set_focus_set(focus: IUIElementInterface | Set[IUIElementInterface] | None)
Set a set of element as the focused set.
- Parameters:
focus -- The set of element to focus on.
- set_locale(locale: str)
Set a locale language code to use in the UIManager
- Parameters:
locale -- A two letter ISO 639-1 code for a supported language.
TODO: Make this raise an exception for an unsupported language?
- set_text_hovered(hovering_text: bool)
Set to true when hovering an area containing selectable text.
Currently, switches the cursor to the I-Beam cursor.
- Parameters:
hovering_text_input -- set to True to toggle the I-Beam cursor
- set_ui_theme(theme: IUIAppearanceThemeInterface, update_all_sprites: bool = False)
Set ui theme.
- Parameters:
theme -- The theme to set.
update_all_sprites --
- set_visual_debug_mode(is_active: bool)
Loops through all our UIElements to turn visual debug mode on or off. Also calls print_layer_debug()
- Parameters:
is_active -- True to activate visual debug and False to turn it off.
- set_window_resolution(window_resolution: Tuple[int, int])
Sets the window resolution.
- Parameters:
window_resolution -- the resolution to set.
- update(time_delta: float)
From here all our UI elements are updated and which element is currently 'hovered' is checked; which means the mouse pointer is overlapping them. This is managed centrally, so we aren't ever overlapping two elements at once.
It also updates the shape cache to continue storing already created elements shapes in the long term cache, in case we need them later.
Finally, if live theme updates are enabled, it checks to see if the theme file has been modified and triggers all the UI elements to rebuild if it has.
- Parameters:
time_delta -- The time passed since the last call to update, in seconds.