PointClickEngine::UI::DialogChoice
Inherits YAML::Serializable < Struct < Value < Object
Represents a selectable choice in a dialog.
Dialog choices allow players to make decisions during conversations,
triggering different outcomes based on their selection.
## Usage
```crystal
choice = DialogChoice.new("I'll help you!", -> {
player.add_quest("help_villager")
npc.mood = CharacterMood::Grateful
})
```
NOTE: Actions are not serialized - re-register after loading
Constructors
new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
Sourcenew(text : String, action : Proc(Nil))
Creates a choice with text and action.
- text : Text displayed to the player
- action : Callback to execute when selected
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source