SierraGUI

Inherits: PopochiuGraphicInterface

Description

Defines the behavior of the Sierra GUI.

In this GUI players interact with objects based on the active command, which can be changed with right click or by using the buttons in the top bar that appears when the cursor moves to the top of the screen. The inventory can be opened with a button in the top bar, same for the settings.


Methods

Return Type Method
String _get_cursor_name() virtual
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_exited_clickable(clickable: PopochiuClickable) virtual
void _on_unblocked() virtual

Method Descriptions

_get_cursor_name

func _get_cursor_name() -> String

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

Called by cursor.gd to get the name of the cursor texture to show.


_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. Disables input processing.


_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 cursor of the last active command.


_on_dialog_line_finished

func _on_dialog_line_finished() -> void

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

Called when a dialogue line finishes. Restores the cursor.


_on_dialog_line_started

func _on_dialog_line_started() -> void

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

Called when a dialogue line starts. Hides the 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. It shows the "gui" cursor.


_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, it hides the main cursor to show the one that shows the texture, otherwise it 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. 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 text in the HoverText component.


_on_unblocked

func _on_unblocked() -> void

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

Called when the GUI is unblocked. Re-enables input processing.