pymasep.interface.ui_dice_selection =================================== .. py:module:: pymasep.interface.ui_dice_selection Classes ------- .. autoapisummary:: pymasep.interface.ui_dice_selection.UIDiceSelection Module Contents --------------- .. py:class:: UIDiceSelection(relative_rect, manager, container, label_text, dices, error_resource) Bases: :py:obj:`pymasep.interface.ui_simple_input.UISimpleInput` UI Input that used dices results for value :param relative_rect: Position and size of the choice :param manager: Manager (from pygame_gui) :param container: Container of the UIDiceSelection (form pygame_gui) :param label_text: Text of the label :param error_resource: Image displayed when an error occurs .. py:attribute:: dices dices to launch. See dices.py .. py:attribute:: dice_pos position of the dice button .. py:attribute:: dice_button button to launch the dices .. py:method:: set_text(text) set the result of the dices as string :param text: result of the dice .. py:method:: get_text() return the result of the dices as string :return: result of the dices .. py:method:: process_event(event) Process event to launch dices if the user presses the button. :param event: Event that could be a UI_BUTTON_PRESSED :return: True if the event has been processed .. py:method:: validate() Validate if the value of the UIInput respects some constraints. In this case, the value of the dice must be between min and max value of the dice expression. :return: True if the value is valid