Co-authored-by: Dennis Ploeger <develop@dieploegers.de> Co-authored-by: dploeger <dploeger@users.noreply.github.com>
This commit is contained in:
@@ -21,25 +21,17 @@ A Regex that matches the end of a dialog
|
||||
### REGEX
|
||||
|
||||
```gdscript
|
||||
const REGEX: String = "^(\\s*)\\?( (?<type>[^ ]+))?( (?<avatar>[^ ]+))?( (?<timeout>[^ ]+))?( (?<timeout_option>.+))?$"
|
||||
const REGEX: String = "^(\\s*)\\?( (?<avatar>[^ ]+))?( (?<timeout>[^ ]+))?( (?<timeout_option>.+))?$"
|
||||
```
|
||||
|
||||
Regex that matches dialog lines
|
||||
|
||||
## Property Descriptions
|
||||
|
||||
### type
|
||||
|
||||
```gdscript
|
||||
var type: String = ""
|
||||
```
|
||||
|
||||
Dialog type
|
||||
|
||||
### avatar
|
||||
|
||||
```gdscript
|
||||
var avatar: String = ""
|
||||
var avatar: String = "-"
|
||||
```
|
||||
|
||||
Avatar used in the dialog
|
||||
@@ -84,7 +76,7 @@ Construct a dialog from a dialog string
|
||||
func is_valid() -> bool
|
||||
```
|
||||
|
||||
Dialogs have no conditions, just return true
|
||||
Check if dialog is valid
|
||||
|
||||
### run
|
||||
|
||||
|
||||
57
docs/api/ESCDialogOptionsChooser.md
Normal file
57
docs/api/ESCDialogOptionsChooser.md
Normal file
@@ -0,0 +1,57 @@
|
||||
<!-- Auto-generated from JSON by GDScript docs maker. Do not edit this document directly. -->
|
||||
|
||||
# ESCDialogOptionsChooser
|
||||
|
||||
**Extends:** [Node](../Node)
|
||||
|
||||
## Description
|
||||
|
||||
Base class for all dialog options implementations
|
||||
|
||||
## Property Descriptions
|
||||
|
||||
### dialog
|
||||
|
||||
```gdscript
|
||||
var dialog: ESCDialog
|
||||
```
|
||||
|
||||
The dialog to show
|
||||
|
||||
## Method Descriptions
|
||||
|
||||
### set\_dialog
|
||||
|
||||
```gdscript
|
||||
func set_dialog(new_dialog: ESCDialog) -> void
|
||||
```
|
||||
|
||||
Set the dialog used for the chooser
|
||||
|
||||
#### Parameters
|
||||
|
||||
- new_dialog: Dialog to set
|
||||
|
||||
### show\_chooser
|
||||
|
||||
```gdscript
|
||||
func show_chooser() -> void
|
||||
```
|
||||
|
||||
Show the dialog chooser UI
|
||||
|
||||
### hide\_chooser
|
||||
|
||||
```gdscript
|
||||
func hide_chooser() -> void
|
||||
```
|
||||
|
||||
Hide the dialog chooser UI
|
||||
|
||||
## Signals
|
||||
|
||||
- signal option_chosen(option): An option was chosen
|
||||
|
||||
##### Parameters
|
||||
|
||||
- option: The dialog option that was chosen
|
||||
@@ -20,18 +20,6 @@ Wether the player is currently speaking
|
||||
|
||||
## Method Descriptions
|
||||
|
||||
### preload\_resources
|
||||
|
||||
```gdscript
|
||||
func preload_resources(path: String) -> void
|
||||
```
|
||||
|
||||
Preload the dialog UI resources
|
||||
|
||||
#### Parameters
|
||||
|
||||
- path: Path where the actual dialog UI resources are located
|
||||
|
||||
### say
|
||||
|
||||
```gdscript
|
||||
@@ -62,13 +50,21 @@ func start_dialog_choices(dialog: ESCDialog)
|
||||
|
||||
Display a list of choices
|
||||
|
||||
#### Parameters
|
||||
|
||||
- dialog: The dialog to start
|
||||
|
||||
### play\_dialog\_option\_chosen
|
||||
|
||||
```gdscript
|
||||
func play_dialog_option_chosen(option: ESCDialogOption)
|
||||
```
|
||||
|
||||
Called when an option was chosen
|
||||
Called when an option was chosen and emits the option_chosen signal
|
||||
|
||||
#### Parameters
|
||||
|
||||
- option: Option, that was chosen.
|
||||
|
||||
## Signals
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Logging framework for Escoria
|
||||
### LOG\_DEBUG
|
||||
|
||||
```gdscript
|
||||
const LOG_WARNING: int = 1
|
||||
const LOG_ERROR: int = 0
|
||||
```
|
||||
|
||||
Valid log levels
|
||||
@@ -21,7 +21,7 @@ Valid log levels
|
||||
### LOG\_ERROR
|
||||
|
||||
```gdscript
|
||||
const LOG_WARNING: int = 1
|
||||
const LOG_ERROR: int = 0
|
||||
```
|
||||
|
||||
Valid log levels
|
||||
@@ -29,7 +29,7 @@ Valid log levels
|
||||
### LOG\_INFO
|
||||
|
||||
```gdscript
|
||||
const LOG_WARNING: int = 1
|
||||
const LOG_ERROR: int = 0
|
||||
```
|
||||
|
||||
Valid log levels
|
||||
@@ -37,7 +37,7 @@ Valid log levels
|
||||
### LOG\_WARNING
|
||||
|
||||
```gdscript
|
||||
const LOG_WARNING: int = 1
|
||||
const LOG_ERROR: int = 0
|
||||
```
|
||||
|
||||
Valid log levels
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# text\_dialog\_choice.gd
|
||||
|
||||
**Extends:** [Control](../Control)
|
||||
**Extends:** [ESCDialogOptionsChooser](../ESCDialogOptionsChooser) < [Node](../Node)
|
||||
|
||||
## Description
|
||||
|
||||
@@ -26,17 +26,17 @@ export var color_hover = "165,42,42,1"
|
||||
export var font = "[Object:null]"
|
||||
```
|
||||
|
||||
### commands
|
||||
|
||||
```gdscript
|
||||
var commands
|
||||
```
|
||||
|
||||
## Method Descriptions
|
||||
|
||||
### set\_answers
|
||||
### show\_chooser
|
||||
|
||||
```gdscript
|
||||
func set_answers(options: Array)
|
||||
func show_chooser()
|
||||
```
|
||||
|
||||
### hide\_chooser
|
||||
|
||||
```gdscript
|
||||
func hide_chooser()
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user