UIManager ​
Inherits: CanvasLayer
Manages UI layers, scene transitions, and overlay systems. Handles loading screens, fade transitions, cinematics, and cutscenes.
Variables ​
Control | current_ui_container | |
CurrentUI | current_ui | |
TooltipManager | tool_tips | |
LoadingScreen | loading_screen | |
ColorRect | transition_rect | |
MessagesManager | messages | |
VideoStreamPlayer | cinematic_player | |
Node3D | cutscene_container | |
InGameCutScenePlayer | current_cutscene | |
DebugMenu | debug_menu | |
Button | debug_toggle_button | |
PopupManager | popups | |
ZoneBanner | zone_banner |
Methods ​
void | setup_signals( p_system_hub: GameHost.SystemHub ) |
void | fade_to_black() |
void | fade_to_normal() |
void | initialize_ui_scenes( game_state: TransitionManager.GameState, system_hub: GameHost.SystemHub ) |
void | play_cinematic( stream: VideoStream ) |
void | stop_cinematic() |
void | play_cutscene( cutscene_scene: PackedScene ) |
void | stop_cutscene() |
void | message( message_sent: String ) |
void | warning_message( warning_message_sent: String ) |
void | yellow_message( yellow_message_sent: String ) |
void | show_item_tooltip( item_instance: ItemInstance, item_definition: ItemDefinition, context: String = "inventory", vendor_data: Dictionary = {} ) |
void | show_ability_tooltip( ability: Variant ) |
void | show_effect_tooltip( effect: EffectInstance ) |
void | show_description_tooltip( object_name: String, description: String ) |
void | show_entity_tooltip( target: Variant ) |
void | show_skill_node_tooltip( skill_node: SkillNode ) |
void | show_choice_tooltip( choice_node: ChoiceSkillNode, choice_index: int ) |
void | hide_tooltip( force_hide: bool ) |
void | toggle_panel( panel_name: String ) |
String | toggle_panel_number( number: int ) |
void | toggle_external_inventory( inventory_data: InventoryComponent, inventory_owner: Variant, active: bool ) |
void | open_socket_panel( item_instance: ItemInstance ) |
void | show_readable_panel( readable_item: ItemInstance ) |
void | show_readable_data( readable_data: Dictionary ) |
void | open_crafting_interface( interaction: CraftingInteraction, player: Player, school: CraftSchoolDefinition ) |
void | close_crafting_interface() |
bool | open_ui_panel( panel_name: String, interaction: Interaction = null, player: Player = null ) |
void | close_ui_panel( panel_name: String ) |
bool | is_ui_panel_open( panel_name: String ) |
void | open_trainer_interface( interaction: TrainerInteraction, player: Player ) |
void | close_trainer_interface() |
void | update_crafting_progress( job: CraftingJob ) |
void | initialize_debug_menu( system_hub: GameHost.SystemHub ) |
void | toggle_debug_menu() |
bool | is_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 ​
floatTRANSITION_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