PointClickEngine::UI::DialogManager
Inherits Reference < Object
Constructors
Instance methods
Add a character portrait
Get a dialog tree by name
Show floating dialog for character (convenience method)
Show dialog choices at bottom of screen
Displays a dialog box with multiple choices at the bottom of the screen. This is useful for branching conversations and interactive dialogs.
prompt - The question or prompt to display choices - Array of choice texts callback - Proc called with the index of the selected choice position - Optional position override (defaults to bottom of screen) size - Optional size override (defaults to wide dialog box)
dialog_manager.show_dialog_choices(
"What would you like to ask?",
["Tell me about the crystal", "Who else is here?", "Goodbye"],
->(choice : Int32) {
case choice
when 0 then show_crystal_info
when 1 then show_character_list
when 2 then end_conversation
end
}
)
Show dialog choices with custom positioning
Show floating dialog above character position
Show floating text at a specific position
Show an input dialog for text entry
Displays a modal dialog with a text input field. Used for safe combinations, passwords, character names, etc.
prompt - The prompt text to display above the input field max_length - Maximum characters allowed (default 32) callback - Proc called with the entered text (empty string if cancelled)
dialog_manager.show_input_dialog("Enter the safe combination:") do |text|
if text == "1234"
open_safe
else
show_message("Wrong combination!")
end
end
Show input dialog with a default value
Start a conversation with a dialog tree