pymasep.interface.ui_init_object_window

Classes

UIInitObjectWindow

Windows used by the user to initialize one object or agent (Characteristics in state "init")

Module Contents

class pymasep.interface.ui_init_object_window.UIInitObjectWindow(rect, ui_manager, sub_application, object_to_init_name)

Bases: pygame_gui.elements.UIWindow

Windows used by the user to initialize one object or agent (Characteristics in state “init”)

Parameters:
  • rect (pygame.Rect) – Position and size of the window

  • ui_manager (pygame_gui.UIManager) – Manager (from pygame_gui)

  • sub_application – the sub application (interface) that will handle the window

  • object_to_init_name – name of the Object or Agent to init

_get_initializer_for_charac(charac)

Get the initializer from the charac, or from it’s ObjectState or from its Object.

Parameters:

charac – Characteristic

Returns:

the initializer for the charac

_get_object_to_init()
sub_application

interface application

object_to_init_name

name of the agent to init

entries

ui entries to initialize the characteristics

font_info

font information to calcutate sizes

margin

margin of the window

active_player_label

name of the player to initialize the characteristics

center_x
pos_y
object_to_init
charac_to_init
containers_to_init
button_rect
button_validation

button to validate the initialization

process_event(event)

Process the events of the windows. UI_BUTTON_PRESSED is handling on this method.

Parameters:

event (pygame.event.Event) – Event to process

Returns:

True if the event has been processed

Return type:

bool

update(time_delta)

Update the element of the window according to the value of the shared Characteristics.

Parameters:

time_delta (float) – Time passed since the last call