Documentation
¶
Overview ¶
Package AcceptDialog provides methods for working with AcceptDialog object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AddButton(text string) [1]gdclass.Button
- func (self Instance) AddCancelButton(name string) [1]gdclass.Button
- func (self Instance) AsAcceptDialog() Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsViewport() Viewport.Instance
- func (self Instance) AsWindow() Window.Instance
- func (self Instance) DialogAutowrap() bool
- func (self Instance) DialogCloseOnEscape() bool
- func (self Instance) DialogHideOnOk() bool
- func (self Instance) DialogText() string
- func (self Instance) GetLabel() [1]gdclass.Label
- func (self Instance) GetOkButton() [1]gdclass.Button
- func (self Instance) OkButtonText() string
- func (self Instance) OnCanceled(cb func())
- func (self Instance) OnConfirmed(cb func())
- func (self Instance) OnCustomAction(cb func(action string))
- func (self Instance) RegisterTextEnter(line_edit [1]gdclass.LineEdit)
- func (self Instance) RemoveButton(button [1]gdclass.Button)
- func (self Instance) SetDialogAutowrap(value bool)
- func (self Instance) SetDialogCloseOnEscape(value bool)
- func (self Instance) SetDialogHideOnOk(value bool)
- func (self Instance) SetDialogText(value string)
- func (self Instance) SetOkButtonText(value string)
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
type Instance [1]gdclass.AcceptDialog
The default use of [AcceptDialog] is to allow it to only be accepted or closed, with the same result. However, the [signal confirmed] and [signal canceled] signals allow to make the two actions different, and the [method add_button] method allows to add custom buttons and actions.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AddButton ¶
Adds a button with label [param text] and a custom [param action] to the dialog and returns the created button. [param action] will be passed to the [signal custom_action] signal when pressed. If [code]true[/code], [param right] will place the button to the right of any sibling buttons. You can use [method remove_button] method to remove a button created with this method from the dialog.
func (Instance) AddCancelButton ¶
Adds a button with label [param name] and a cancel action to the dialog and returns the created button. You can use [method remove_button] method to remove a button created with this method from the dialog.
func (Instance) AsAcceptDialog ¶
func (Instance) AsViewport ¶
func (Instance) DialogAutowrap ¶
func (Instance) DialogCloseOnEscape ¶
func (Instance) DialogHideOnOk ¶
func (Instance) DialogText ¶
func (Instance) GetLabel ¶
Returns the label used for built-in text. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
func (Instance) GetOkButton ¶
Returns the OK [Button] instance. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
func (Instance) OkButtonText ¶
func (Instance) OnCanceled ¶
func (self Instance) OnCanceled(cb func())
func (Instance) OnConfirmed ¶
func (self Instance) OnConfirmed(cb func())
func (Instance) OnCustomAction ¶
func (Instance) RegisterTextEnter ¶
Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.
func (Instance) RemoveButton ¶
Removes the [param button] from the dialog. Does NOT free the [param button]. The [param button] must be a [Button] added with [method add_button] or [method add_cancel_button] method. After removal, pressing the [param button] will no longer emit this dialog's [signal custom_action] or [signal canceled] signals.