AcceptDialog

package
v0.0.0-...-d9f4d4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package AcceptDialog provides methods for working with AcceptDialog object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsAcceptDialog() Instance
}

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 New

func New() Instance

func (Instance) AddButton

func (self Instance) AddButton(text string) [1]gdclass.Button

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

func (self Instance) AddCancelButton(name string) [1]gdclass.Button

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 (self Instance) AsAcceptDialog() Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsViewport

func (self Instance) AsViewport() Viewport.Instance

func (Instance) AsWindow

func (self Instance) AsWindow() Window.Instance

func (Instance) DialogAutowrap

func (self Instance) DialogAutowrap() bool

func (Instance) DialogCloseOnEscape

func (self Instance) DialogCloseOnEscape() bool

func (Instance) DialogHideOnOk

func (self Instance) DialogHideOnOk() bool

func (Instance) DialogText

func (self Instance) DialogText() string

func (Instance) GetLabel

func (self Instance) GetLabel() [1]gdclass.Label

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

func (self Instance) GetOkButton() [1]gdclass.Button

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 (self Instance) OkButtonText() string

func (Instance) OnCanceled

func (self Instance) OnCanceled(cb func())

func (Instance) OnConfirmed

func (self Instance) OnConfirmed(cb func())

func (Instance) OnCustomAction

func (self Instance) OnCustomAction(cb func(action string))

func (Instance) RegisterTextEnter

func (self Instance) RegisterTextEnter(line_edit [1]gdclass.LineEdit)

Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.

func (Instance) RemoveButton

func (self Instance) RemoveButton(button [1]gdclass.Button)

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.

func (Instance) SetDialogAutowrap

func (self Instance) SetDialogAutowrap(value bool)

func (Instance) SetDialogCloseOnEscape

func (self Instance) SetDialogCloseOnEscape(value bool)

func (Instance) SetDialogHideOnOk

func (self Instance) SetDialogHideOnOk(value bool)

func (Instance) SetDialogText

func (self Instance) SetDialogText(value string)

func (Instance) SetOkButtonText

func (self Instance) SetOkButtonText(value string)

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL