Define a pattern to use as a dialog macro, which aids in avoiding duplicated dialog logic.
For more information about dialog macros, see Dialog Macros.
You can define one or more template-macro-def
keys within a *.dialog.bxb
file. These files should be located in the appropriate locale-specific resources
folder.
// resources/en/dialog-macros/my-template.dialog.bxb
template-macro-def (id) {
params {
param (x) {
type (Boolean)
}
param (y) {
type (Text)
}
}
content {
if (x) {
template ("#{y}")
} else {
template ("something else")
}
}
}