pymhf.gui.gui module#

class pymhf.gui.gui.GUI(mod_manager: ModManager, config: dict)#

Bases: object

add_button(callback: ButtonProtocol)#
add_combobox(callback: ComboBoxProtocol)#
add_details_tab()#
add_hex_tab()#
add_settings_tab()#

Add a settings tab to configure the gui and other things.

add_tab(cls: Mod)#

Add the mod as a new tab in the GUI.

add_variable(cls: Mod, variable: str, getter: VariableProtocol)#
add_variable_gui_elements(cls: Mod, variable: str, getter: VariableProtocol)#
add_window()#
alpha_callback(sender, app_data)#
change_tab(sender: str, app_data: int)#
exit()#
hex_view: HexView#
hide_window()#
reload_buttons(cls: Mod, widgets: Widgets)#

Reload all the buttons. Any new buttons will be added, any old ones will be removed, and any that remain will be reconfigured to point to the new bound method with any modified parameters (such as button label.)

reload_comboboxes(cls: Mod, widgets: Widgets)#

Reload all the comboboxes. Any new combos will be added, any old ones will be removed, and any that remain will be reconfigured to point to the new bound method with any modified parameters (such as combo label and items).

reload_tab(cls: Mod)#

Reload the tab for the specific mod.

reload_variables(cls: Mod, widgets: Widgets)#

Reload all variables associated with a mod. Note that this will not work for changing an existing variables’ type. To do this, remove (comment out) the property, reload the mod, and then uncomment, change the type and reload again to have it add it back.

remove_tab(cls: Mod)#

Remove the tab associated with the provided class.

run()#
show_window()#
toggle_debug_mode(_sender, is_debug)#
toggle_show_gui(_sender, show_gui)#
class pymhf.gui.gui.WidgetType(value)#

Bases: Enum

An enumeration.

BUTTON = 0#
COMBOBOX = 3#
TEXT = 2#
VARIABLE = 1#
class pymhf.gui.gui.Widgets#

Bases: TypedDict

buttons: dict[str, int | str]#
comboboxes: dict[str, int | str]#
variables: dict[str, list[tuple[int | str, WidgetType]]]#
pymhf.gui.gui.toggle_on_top(item: int, value: bool)#