docs: Automatic update of API docs

This commit is contained in:
StraToN
2021-10-27 06:35:05 +00:00
parent 7b5f96c98c
commit 08645e6903
9 changed files with 115 additions and 277 deletions

View File

@@ -0,0 +1,87 @@
<!-- Auto-generated from JSON by GDScript docs maker. Do not edit this document directly. -->
# ESCDialogManager
**Extends:** [Control](../Control)
## Description
A base class for dialog plugins to work with Escoria
## Method Descriptions
### has\_type
```gdscript
func has_type(type: String) -> bool
```
Check wether a specific type is supported by the
dialog plugin
#### Parameters
- type: required type
*Returns* Wether the type is supported or not
### has\_chooser\_type
```gdscript
func has_chooser_type(type: String) -> bool
```
Check wether a specific chooser type is supported by the
dialog plugin
#### Parameters
- type: required chooser type
*Returns* Wether the type is supported or not
### say
```gdscript
func say(dialog_player: Node, global_id: String, text: String, type: String)
```
Output a text said by the item specified by the global id. Emit
`say_finished` after finishing displaying the text.
#### Parameters
- dialog_player: Node of the dialog player in the UI
- global_id: Global id of the item that is speaking
- text: Text to say, optional prefixed by a translation key separated
by a ":"
- type: Type of dialog box to use
### choose
```gdscript
func choose(dialog_player: Node, dialog: ESCDialog)
```
Present an option chooser to the player and sends the signal
`option_chosen` with the chosen dialog option
#### Parameters
- dialog_player: Node of the dialog player in the UI
- dialog: Information about the dialog to display
### speedup
```gdscript
func speedup()
```
Trigger running the dialog faster
### interrupt
```gdscript
func interrupt()
```
The say command has been interrupted, cancel the dialog display
## Signals
- signal say_finished(): Emitted when the say function has completed showing the text
- signal option_chosen(option): Emitted when the player has chosen an option

View File

@@ -2,7 +2,7 @@
# ESCDialogOptionsChooser # ESCDialogOptionsChooser
**Extends:** [Node](../Node) **Extends:** [Control](../Control)
## Description ## Description

View File

@@ -1,8 +1,8 @@
<!-- Auto-generated from JSON by GDScript docs maker. Do not edit this document directly. --> <!-- Auto-generated from JSON by GDScript docs maker. Do not edit this document directly. -->
# ESCDialogsPlayer # ESCDialogPlayer
**Extends:** [ResourcePreloader](../ResourcePreloader) **Extends:** [Node](../Node)
## Description ## Description
@@ -13,7 +13,7 @@ Escoria dialog player
### is\_speaking ### is\_speaking
```gdscript ```gdscript
var is_speaking var is_speaking: bool = false
``` ```
Wether the player is currently speaking Wether the player is currently speaking
@@ -23,21 +23,21 @@ Wether the player is currently speaking
### say ### say
```gdscript ```gdscript
func say(character: String, ui: String, line: String) -> var func say(character: String, type: String, text: String) -> var
``` ```
A short one line dialog Make a character say a text
#### Parameters #### Parameters
- character: Character that is talking - character: Character that is talking
- ui: UI to use for the dialog - type: UI to use for the dialog
- line: Line to say - text: Text to say
### finish\_fast ### speedup
```gdscript ```gdscript
func finish_fast() -> void func speedup() -> void
``` ```
Called when a dialog line is skipped Called when a dialog line is skipped
@@ -45,7 +45,7 @@ Called when a dialog line is skipped
### start\_dialog\_choices ### start\_dialog\_choices
```gdscript ```gdscript
func start_dialog_choices(dialog: ESCDialog) func start_dialog_choices(dialog: ESCDialog, type: String = "simple")
``` ```
Display a list of choices Display a list of choices
@@ -54,17 +54,13 @@ Display a list of choices
- dialog: The dialog to start - dialog: The dialog to start
### play\_dialog\_option\_chosen ### interrupt
```gdscript ```gdscript
func play_dialog_option_chosen(option: ESCDialogOption) func interrupt()
``` ```
Called when an option was chosen and emits the option_chosen signal Interrupt the currently running dialog
#### Parameters
- option: Option, that was chosen.
## Signals ## Signals
@@ -73,4 +69,4 @@ Called when an option was chosen and emits the option_chosen signal
##### Parameters ##### Parameters
- option: The dialog option that was chosen - option: The dialog option that was chosen
- signal dialog_line_finished(): Emitted when a dialog line was finished - signal say_finished(): Emitted when a say command finished

View File

@@ -6,9 +6,9 @@
## Description ## Description
`say object text [type] [avatar]` `say player text [type]`
Runs the specified string as a dialog said by the object. Blocks execution Runs the specified string as a dialog said by the player. Blocks execution
until the dialog finishes playing. until the dialog finishes playing.
The text supports translation keys by prepending the key and separating The text supports translation keys by prepending the key and separating
@@ -19,8 +19,6 @@ Example: `say player ROOM1_PICTURE:"Picture's looking good."`
Optional parameters: Optional parameters:
* "type" determines the type of dialog UI to use. Default value is "default" * "type" determines the type of dialog UI to use. Default value is "default"
* "avatar" determines the avatar to use for the dialog. Default value is
"default"
@ESC @ESC
@@ -34,6 +32,14 @@ func configure() -> ESCCommandArgumentDescriptor
Return the descriptor of the arguments of this command Return the descriptor of the arguments of this command
### validate
```gdscript
func validate(arguments: Array)
```
Validate wether the given arguments match the command descriptor
### run ### run
```gdscript ```gdscript

View File

@@ -1,115 +0,0 @@
<!-- Auto-generated from JSON by GDScript docs maker. Do not edit this document directly. -->
# avatar\_dialog\_player.gd
**Extends:** [Popup](../Popup)
## Description
A dialog GUI showing a dialog box and character portraits
## Property Descriptions
### current\_character
```gdscript
export var current_character = ""
```
- **Setter**: `set_current_character`
The currently speaking character
### text\_speed\_per\_character
```gdscript
export var text_speed_per_character = 0.1
```
The text speed per character for normal display
### fast\_text\_speed\_per\_character
```gdscript
export var fast_text_speed_per_character = 0.25
```
The text speed per character if the dialog line is skipped
### max\_time\_to\_text\_disappear
```gdscript
export var max_time_to_text_disappear = 1
```
The time to wait before the dialog is finished
### avatar\_node
```gdscript
var avatar_node
```
The node holding the avatar
### name\_node
```gdscript
var name_node
```
The node holding the player name
### text\_node
```gdscript
var text_node
```
The node showing the text
### tween
```gdscript
var tween
```
The tween node for text animations
## Method Descriptions
### set\_current\_character
```gdscript
func set_current_character(name: String)
```
Switch the current character
#### Parameters
- name: The name of the current character
### say
```gdscript
func say(character: String, line: String)
```
Make a character say something
#### Parameters
- character: The global id of the character speaking
- line: Line to say
### finish\_fast
```gdscript
func finish_fast()
```
Called by the dialog player when the
## Signals
- signal dialog_line_started(): Signal emitted when a dialog line has started
- signal dialog_line_finished(): Signal emitted when a dialog line has finished

View File

@@ -124,7 +124,7 @@ Terrain of the current room
### dialog\_player ### dialog\_player
```gdscript ```gdscript
var dialog_player: ESCDialogsPlayer var dialog_player: ESCDialogPlayer
``` ```
Dialog player instantiator. This instance is called directly for dialogs. Dialog player instantiator. This instance is called directly for dialogs.

View File

@@ -1,86 +0,0 @@
<!-- Auto-generated from JSON by GDScript docs maker. Do not edit this document directly. -->
# floating\_dialog\_player.gd
**Extends:** [RichTextLabel](../RichTextLabel)
## Description
A dialog UI using a label above the head of the character
## Property Descriptions
### text\_speed\_per\_character
```gdscript
export var text_speed_per_character = 0.1
```
The text speed per character for normal display
### fast\_text\_speed\_per\_character
```gdscript
export var fast_text_speed_per_character = 0.25
```
The text speed per character if the dialog line is skipped
### max\_time\_to\_text\_disappear
```gdscript
export var max_time_to_text_disappear = 2
```
The time to wait before the dialog is finished
### current\_character
```gdscript
var current_character
```
Current character speaking, to keep track of reference for animation purposes
### tween
```gdscript
var tween
```
Tween node for text animation
### text\_node
```gdscript
var text_node
```
The node showing the text
## Method Descriptions
### say
```gdscript
func say(character: String, line: String)
```
Make a character say something
#### Parameters
- character: The global id of the character speaking
- line: Line to say
### finish\_fast
```gdscript
func finish_fast()
```
Called by the dialog player when the
## Signals
- signal dialog_line_started(): Signal emitted when a dialog line has started
- signal dialog_line_finished(): Signal emitted when a dialog line has finished

View File

@@ -1,48 +0,0 @@
<!-- Auto-generated from JSON by GDScript docs maker. Do not edit this document directly. -->
# text\_dialog\_chooser.gd
**Extends:** [ESCDialogOptionsChooser](../ESCDialogOptionsChooser) < [Node](../Node)
## Description
A simple dialog chooser that shows selectable lines of text
Supports timeout and avatar display
## Property Descriptions
### color\_normal
```gdscript
export var color_normal = "1,1,1,1"
```
### color\_hover
```gdscript
export var color_hover = "165,42,42,1"
```
### font
```gdscript
export var font = "[Object:null]"
```
## Method Descriptions
### show\_chooser
```gdscript
func show_chooser()
```
Show the chooser
### hide\_chooser
```gdscript
func hide_chooser()
```
Hide the chooser

View File

@@ -253,9 +253,9 @@ Fills the "name" global with a random value between 0 and max-value-1.
Restarts the execution of the current scope at the start. A scope can be a Restarts the execution of the current scope at the start. A scope can be a
group or an event. group or an event.
#### <a name="SayCommand.md"></a>`say object text [type] [avatar]` [API-Doc](api/SayCommand.md) #### <a name="SayCommand.md"></a>`say player text [type]` [API-Doc](api/SayCommand.md)
Runs the specified string as a dialog said by the object. Blocks execution Runs the specified string as a dialog said by the player. Blocks execution
until the dialog finishes playing. until the dialog finishes playing.
The text supports translation keys by prepending the key and separating The text supports translation keys by prepending the key and separating
@@ -266,8 +266,6 @@ Example: `say player ROOM1_PICTURE:"Picture's looking good."`
Optional parameters: Optional parameters:
* "type" determines the type of dialog UI to use. Default value is "default" * "type" determines the type of dialog UI to use. Default value is "default"
* "avatar" determines the avatar to use for the dialog. Default value is
"default"
#### <a name="SchedEventCommand.md"></a>`sched_event time object event` [API-Doc](api/SchedEventCommand.md) #### <a name="SchedEventCommand.md"></a>`sched_event time object event` [API-Doc](api/SchedEventCommand.md)
Schedules the execution of an "event" found in "object" in a time in seconds. Schedules the execution of an "event" found in "object" in a time in seconds.