pymasep.interface.ui_choice =========================== .. py:module:: pymasep.interface.ui_choice Classes ------- .. autoapisummary:: pymasep.interface.ui_choice.UIChoice Module Contents --------------- .. py:class:: UIChoice(relative_rect, manager, container, label_text, waited_type, error_resource, choices) Bases: :py:obj:`pymasep.interface.ui_input.UIInput` UI Input to choose among a list of choices :param relative_rect: Position and size of the choice. :param manager: Manager (from pygame_gui). :param container: Container of the UIChoice (form pygame_gui). :param label_text: Text of the label. :param waited_type: Expected type of the value chosen. :param error_resource: Image displayed when an error occurs. :param choices: List of choice (the first element is displayed, the second is the value) .. py:attribute:: _font_info .. py:attribute:: text_entry_pos position of the label .. py:attribute:: choices list of choice (1st element is displayed, 2nd is the value) .. py:attribute:: ddmenu DropDown menu .. py:method:: set_text(text) Set the text to display. :param text: Parameter is not used. First choice at initialization .. py:method:: get_text() Get the value of selected element :return: The second element of the chosen choice (id) .. py:method:: update_options(new_options) Update the options of the UIChoice. :param new_options: New options to set. :return: True if a change was made, False otherwise