Minimal Theatre Setup
This article cover the basic minimal setup for Theatre, like the one created in the Quick Start article, but a lot more shorter and straightforward.
-
Create a new
2D
orUser Interface
scene, and structure it like the following:The two highlighted nodes are the Theatre-specific nodes.
Adjust the size and position of the
PanelContainer
to your liking. -
Tick the
fit_content
property on theDialogueLabel
. -
Attach a script to the scene and create a new
Stage
variable with@export
. -
Go to the inspector, and assign the
Stage
node tostage
. -
Click the
Stage
node, go to the inspector, and assign theLabel
toactor_label
, andDialogueLabel
todialogue_label
. -
Use input event to progress the
Stage
.extends Control @export var stage : Stage func _input(event): if event.is_action_pressed("ui_accept"): stage.progress()
-
You can then write/load your
Dialogue
, and start it.
Code summary
extends Control
var dlg : Dialogue # Load/create Dialogue here
@export var stage : Stage
func _input(event):
if event.is_action_pressed("ui_accept"):
stage.progress()
func _ready():
stage.start(dlg)
Download
Got any questions? feel free to ask them in the GitHub Discussions!