Instance Propertymigueldeicaza.swiftgodot 0.45.0SwiftGodot
okButtonText
The text displayed by the OK button (see getOkButton
).
final var okButtonText: String { get set }
Other members in extension
Types
class Signal1
Signal support.
Type members
Instance members
var canceled: SimpleSignal
Emitted when the dialog is closed or the button created with
addCancelButton(name:)
is pressed.var confirmed: SimpleSignal
Emitted when the dialog is accepted, i.e. the OK button is pressed.
var customAction: Signal1
Emitted when a custom button is pressed. See
addButton(text:right:action:)
.var dialogAutowrap: Bool
Sets autowrapping for the text in the dialog.
var dialogCloseOnEscape: Bool
If
true
, the dialog will be hidden when the escape key (escape
) is pressed.var dialogHideOnOk: Bool
If
true
, the dialog is hidden when the OK button is pressed. You can set it tofalse
if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic.var dialogText: String
The text displayed by the dialog.
func addButton(text: String, right: Bool, action: String
) -> Button? Adds a button with label
text
and a customaction
to the dialog and returns the created button.action
will be passed to the [signal custom_action] signal when pressed.func addCancelButton(name: String
) -> Button? Adds a button with label
name
and a cancel action to the dialog and returns the created button.func getLabel(
) -> Label? Returns the label used for built-in text.
func getOkButton(
) -> Button? Returns the OK
Button
instance.func registerTextEnter(lineEdit: Control?
) Registers a
LineEdit
in the dialog. When the enter key is pressed, the dialog will be accepted.func removeButton(Control?
) Removes the
button
from the dialog. Does NOT free thebutton
. Thebutton
must be aButton
added withaddButton(text:right:action:)
oraddCancelButton(name:)
method. After removal, pressing thebutton
will no longer emit this dialog’s [signal custom_action] or [signal canceled] signals.