Skip to content

UIManager ​

Inherits: CanvasLayer

Manages UI layers, scene transitions, and overlay systems. Handles loading screens, fade transitions, cinematics, and cutscenes.

Variables ​

Controlcurrent_ui_container
CurrentUIcurrent_ui
TooltipManagertool_tips
LoadingScreenloading_screen
ColorRecttransition_rect
MessagesManagermessages
VideoStreamPlayercinematic_player
Node3Dcutscene_container
InGameCutScenePlayercurrent_cutscene
DebugMenudebug_menu
Buttondebug_toggle_button
PopupManagerpopups
ZoneBannerzone_banner

Methods ​

voidsetup_signals( p_system_hub: GameHost.SystemHub )
voidfade_to_black()
voidfade_to_normal()
voidinitialize_ui_scenes( game_state: TransitionManager.GameState, system_hub: GameHost.SystemHub )
voidplay_cinematic( stream: VideoStream )
voidstop_cinematic()
voidplay_cutscene( cutscene_scene: PackedScene )
voidstop_cutscene()
voidmessage( message_sent: String )
voidwarning_message( warning_message_sent: String )
voidyellow_message( yellow_message_sent: String )
voidshow_item_tooltip( item_instance: ItemInstance, item_definition: ItemDefinition, context: String = "inventory", vendor_data: Dictionary = {} )
voidshow_ability_tooltip( ability: Variant )
voidshow_effect_tooltip( effect: EffectInstance )
voidshow_description_tooltip( object_name: String, description: String )
voidshow_entity_tooltip( target: Variant )
voidshow_skill_node_tooltip( skill_node: SkillNode )
voidshow_choice_tooltip( choice_node: ChoiceSkillNode, choice_index: int )
voidhide_tooltip( force_hide: bool )
voidtoggle_panel( panel_name: String )
Stringtoggle_panel_number( number: int )
voidtoggle_external_inventory( inventory_data: InventoryComponent, inventory_owner: Variant, active: bool )
voidopen_socket_panel( item_instance: ItemInstance )
voidshow_readable_panel( readable_item: ItemInstance )
voidshow_readable_data( readable_data: Dictionary )
voidopen_crafting_interface( interaction: CraftingInteraction, player: Player, school: CraftSchoolDefinition )
voidclose_crafting_interface()
boolopen_ui_panel( panel_name: String, interaction: Interaction = null, player: Player = null )
voidclose_ui_panel( panel_name: String )
boolis_ui_panel_open( panel_name: String )
voidopen_trainer_interface( interaction: TrainerInteraction, player: Player )
voidclose_trainer_interface()
voidupdate_crafting_progress( job: CraftingJob )
voidinitialize_debug_menu( system_hub: GameHost.SystemHub )
voidtoggle_debug_menu()
boolis_debug_menu_visible()

Signals ​

ui_ready() ​

Emitted on when ui is setup

transition_complete() ​

Emitted after transition fade tween completes

ui_sfx_requested( sound: AudioManager.UISound, volume_modifier: float ) ​

Emitted on audio requests

pause_all_audio_request() ​

AudioManager music requests

resume_all_audio_request() ​

Emitted when the audio that was paused should play again.

Constants ​

  • float TRANSITION_DURATION = 1.5 - Duration for fade transitions in seconds.

Variable descriptions ​

Control current_ui_container ​

Container for the currently active UI scene.

CurrentUI current_ui ​

The currently loaded UI scene instance.

TooltipManager tool_tips ​

Manages tooltip popups across the UI.

LoadingScreen loading_screen ​

Loading screen overlay for scene transitions.

ColorRect transition_rect ​

Full-screen colour overlay for fade transitions.

MessagesManager messages ​

Manages floating messages and notifications.

VideoStreamPlayer cinematic_player ​

Video player for pre-rendered cinematics.

Node3D cutscene_container ​

Container for in-game cutscene nodes.

InGameCutScenePlayer current_cutscene ​

Currently playing in-game cutscene.

DebugMenu debug_menu ​

Debug menu for testing and debugging (only created when debug mode enabled)

Button debug_toggle_button ​

Debug menu toggle button (always visible when debug mode enabled)

PopupManager popups ​

The popups of the game (tutorials, messages, toasts)

ZoneBanner zone_banner ​

The banner with the name of a zone when the party enters it

Method descriptions ​

void setup_signals( p_system_hub: GameHost.SystemHub ) ​

Connects the signals of the interface to the other managers.

void fade_to_black() ​

Fades the screen to black over TRANSITION_DURATION seconds.

void fade_to_normal() ​

Fades the screen from black to transparent over TRANSITION_DURATION seconds.

void initialize_ui_scenes( game_state: TransitionManager.GameState, system_hub: GameHost.SystemHub ) ​

Loads the appropriate UI scene based on the current game state.

void play_cinematic( stream: VideoStream ) ​

Plays a pre-rendered video cinematic.

void stop_cinematic() ​

Stops the current cinematic and resumes game audio.

void play_cutscene( cutscene_scene: PackedScene ) ​

Plays an in-game cutscene from a packed scene.

void stop_cutscene() ​

Stops the current cutscene and cleans up.

void message( message_sent: String ) ​

Display a standard message to the player

void warning_message( warning_message_sent: String ) ​

Display a warning message to the player (red/orange color)

void yellow_message( yellow_message_sent: String ) ​

Display a highlighted message to the player (yellow/gold color)

void show_item_tooltip( item_instance: ItemInstance, item_definition: ItemDefinition, context: String = "inventory", vendor_data: Dictionary = {} ) ​

Show item tooltip

void show_ability_tooltip( ability: Variant ) ​

Show ability tooltip

void show_effect_tooltip( effect: EffectInstance ) ​

Show effect tooltip

void show_description_tooltip( object_name: String, description: String ) ​

Show description tooltip

void show_entity_tooltip( target: Variant ) ​

Show the tooltip of an entity or an object

void show_skill_node_tooltip( skill_node: SkillNode ) ​

Show skill node tooltip

void show_choice_tooltip( choice_node: ChoiceSkillNode, choice_index: int ) ​

Show choice tooltip

void hide_tooltip( force_hide: bool ) ​

Hide all tooltips

void toggle_panel( panel_name: String ) ​

Toggle a named panel (character, spellbook, etc.)

String toggle_panel_number( number: int ) ​

Toggle the panel that a panel key number (1 to 20) opens. Returns the name of the panel ("" when no panel has the number)

void toggle_external_inventory( inventory_data: InventoryComponent, inventory_owner: Variant, active: bool ) ​

Toggle external inventory display

void open_socket_panel( item_instance: ItemInstance ) ​

Open socket panel for equipment

void show_readable_panel( readable_item: ItemInstance ) ​

Show readable panel for books/scrolls

void show_readable_data( readable_data: Dictionary ) ​

Show a readable (a sign, a book, a letter) from its data: title, pages, background_texture, source

void open_crafting_interface( interaction: CraftingInteraction, player: Player, school: CraftSchoolDefinition ) ​

Request to open crafting interface

void close_crafting_interface() ​

Request to close crafting interface

bool open_ui_panel( panel_name: String, interaction: Interaction = null, player: Player = null ) ​

Opens a panel of the in-game interface by its name (see ShowUIPanelInteraction). False when the interface has no panel with that name

void close_ui_panel( panel_name: String ) ​

Closes a panel of the in-game interface by its name

bool is_ui_panel_open( panel_name: String ) ​

Is the panel with this name open?

void open_trainer_interface( interaction: TrainerInteraction, player: Player ) ​

Request to open the list of lessons of a trainer

void close_trainer_interface() ​

Request to close the list of lessons of a trainer

void update_crafting_progress( job: CraftingJob ) ​

Update crafting progress

void initialize_debug_menu( system_hub: GameHost.SystemHub ) ​

Initialize the debug menu (only when debug mode is enabled)

void toggle_debug_menu() ​

Toggle debug menu visibility

bool is_debug_menu_visible() ​

Check if debug menu exists and is visible