SimpleClickGUI

Inherits: PopochiuGraphicInterface

Description

Defines the behavior of the 2-click Context-sensitive GUI.

In this GUI, players interact with objects in the game based on the clicked mouse button. The inventory bar is in the top left corner of the screen, and the settings bar is in the top right corner of the screen.


Methods

Return Type Method
void _on_blocked(props: = { blocking = true }) virtual
void _on_dialog_finished(dialog: PopochiuDialog) virtual
void _on_dialog_line_finished() virtual
void _on_dialog_line_started() virtual
void _on_dialog_options_shown() virtual
void _on_dialog_started(dialog: PopochiuDialog) virtual
void _on_game_loaded(loaded_game: Dictionary) virtual
void _on_game_saved() virtual
void _on_inventory_item_selected(item: PopochiuInventoryItem) virtual
void _on_mouse_entered_clickable(clickable: PopochiuClickable) virtual
void _on_mouse_entered_inventory_item(inventory_item: PopochiuInventoryItem) virtual
void _on_mouse_exited_clickable(clickable: PopochiuClickable) virtual
void _on_mouse_exited_inventory_item(inventory_item: PopochiuInventoryItem) virtual
void _on_system_text_hidden() virtual
void _on_system_text_shown(msg: String) virtual
void _on_unblocked() virtual

Method Descriptions

_on_blocked

func _on_blocked(props: = { blocking = true }) -> void

This is a virtual method. Override it in your subclass.

Called when the GUI is blocked and not intended to handle input events.


_on_dialog_finished

func _on_dialog_finished(dialog: PopochiuDialog) -> void

This is a virtual method. Override it in your subclass.

Called when a PopochiuDialog finishes. It shows the default cursor.


_on_dialog_line_finished

func _on_dialog_line_finished() -> void

This is a virtual method. Override it in your subclass.

Called when a dialog line finishes. Shows the "normal" cursor if there is no PopochiuDialog active, otherwise shows the "gui" cursor.


_on_dialog_line_started

func _on_dialog_line_started() -> void

This is a virtual method. Override it in your subclass.

Called when a dialog line starts. It shows the "wait" cursor.


_on_dialog_options_shown

func _on_dialog_options_shown() -> void

This is a virtual method. Override it in your subclass.

Called when the running PopochiuDialog shows its options on screen. It shows the "gui" cursor.


_on_dialog_started

func _on_dialog_started(dialog: PopochiuDialog) -> void

This is a virtual method. Override it in your subclass.

Called when a PopochiuDialog starts. Shows the "gui" cursor and clears the HoverText component.


_on_game_loaded

func _on_game_loaded(loaded_game: Dictionary) -> void

This is a virtual method. Override it in your subclass.

Called when a game is loaded. loaded_game has the loaded data. By default, it shows Game loaded in the SystemText component.


_on_game_saved

func _on_game_saved() -> void

This is a virtual method. Override it in your subclass.

Called when the game is saved. By default, it shows Game saved in the SystemText component.


_on_inventory_item_selected

func _on_inventory_item_selected(item: PopochiuInventoryItem) -> void

This is a virtual method. Override it in your subclass.

Called when the active PopochiuInventoryItem changes. If there is one, hides the main cursor to display the texture, otherwise shows the default cursor.


_on_mouse_entered_clickable

func _on_mouse_entered_clickable(clickable: PopochiuClickable) -> void

This is a virtual method. Override it in your subclass.

Called when the mouse enters (hovers) clickable. Changes the cursor texture and displays the description in the HoverText component.


_on_mouse_entered_inventory_item

func _on_mouse_entered_inventory_item(inventory_item: PopochiuInventoryItem) -> void

This is a virtual method. Override it in your subclass.

Called when the mouse enters (hovers) inventory_item. Changes the cursor texture and displays the description in the HoverText component.


_on_mouse_exited_clickable

func _on_mouse_exited_clickable(clickable: PopochiuClickable) -> void

This is a virtual method. Override it in your subclass.

Called when the mouse exits clickable. Clears the HoverText and restores the default cursor if no PopochiuInventoryItem is active.


_on_mouse_exited_inventory_item

func _on_mouse_exited_inventory_item(inventory_item: PopochiuInventoryItem) -> void

This is a virtual method. Override it in your subclass.

Called when the mouse exits inventory_item. Clears the HoverText and restores the default cursor if no PopochiuInventoryItem is active.


_on_system_text_hidden

func _on_system_text_hidden() -> void

This is a virtual method. Override it in your subclass.

Called when the SystemText component hides. If a PopochiuInventoryItem is active, the cursor takes its texture, otherwise the default cursor is restored.


_on_system_text_shown

func _on_system_text_shown(msg: String) -> void

This is a virtual method. Override it in your subclass.

Called when text is shown in the SystemText component. Clears the HoverText and shows the "wait" cursor.


_on_unblocked

func _on_unblocked() -> void

This is a virtual method. Override it in your subclass.

Called when the GUI is unblocked and can handle input events again.