reckfellENGINE

AcceptDialog

Message/form window with a confirmation button and explicit action signals.

On this page
class AcceptDialogReckfellSharpInherits Window

Add the dialog to the tree, configure DialogText and open with inherited PopupCentered. Initially hidden, with transient/exclusive enabled. Reopening reuses the object; hiding does not free it. Use ConfirmationDialog for an explicit confirm/cancel choice.

Confirmed comes from the OK button or a registered LineEdit. Default DialogHideOnOk = true hides the window before the handler runs. For validation, set false, validate values in Confirmed and call Hide only on success. Setting GetOkButton().Disabled blocks the button and registered Enter submission; the button caption does not itself save anything.

Canceled belongs to the cancellation path: a Cancel button, window close request, or ui_close_dialog when DialogCloseOnEscape is enabled. Direct Hide is not cancellation and does not emit Canceled. Cancellation schedules hiding deferred; do not assume Visible already changed inside the handler. Implement application-data rollback yourself.

AddButton with nonempty action emits CustomAction rather than Confirmed or Canceled. It does not automatically close the window; with empty action connect the returned Button.Pressed yourself. AddCancelButton creates a cancellation-path button. Do not infer roles from button text or position.

GetOkButton/GetLabel and added buttons are owned by the dialog. Do not free them while attached. RemoveButton detaches an extra button without freeing it: reparent it or call Free afterwards. The standard OK cannot be removed; also retain ConfirmationDialog’s standard Cancel because the derived class keeps a reference to it.

RegisterTextEnter once for each LineEdit, normally an owned field inside the dialog. Assigning Text is not TextSubmitted and does not confirm the form. The submission handler does not check Visible: avoid registering an external always-active field without your own state guard.

For forms, put one root Container in dialog content and nest fields inside it. Multiple direct Controls receive the same area and can overlap. Clear DialogText or hide the built-in Label for a custom form. DialogAutowrap affects only that Label rather than arranging other fields.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

AcceptDialogConstructor
# AcceptDialog
C#
public AcceptDialog();

Creates a hidden window with OK, DialogHideOnOk and DialogCloseOnEscape enabled, empty DialogText and DialogAutowrap disabled.

Properties5

DialogAutowrapProperty
# DialogAutowrap
C#
public bool DialogAutowrap { get; set; }

Built-in Label wrapping: true sets Word, false sets Off. Getter is true for any non-Off Label mode. Does not affect custom-field layout.

DialogCloseOnEscapeProperty
# DialogCloseOnEscape
C#
public bool DialogCloseOnEscape { get; set; }

Allows cancellation through ui_close_dialog, usually Escape; default true. false does not block Cancel buttons or window close requests.

DialogHideOnOkProperty
# DialogHideOnOk
C#
public bool DialogHideOnOk { get; set; }

Hide before Confirmed, default true. For form validation set false and call Hide manually after success. Does not control cancellation or CustomAction.

DialogTextProperty
# DialogText
C#
public string DialogText { get; set; }

Original built-in Label text. Plain text rather than BBCode or form-field values. Direct GetLabel().Text changes are reflected by the getter.

OkButtonTextProperty
# OkButtonText
C#
public string OkButtonText { get; set; }

Stored custom OK caption, default empty uses the standard caption. Getter returns this raw value, so can be empty while the button shows OK. Use Confirmed for behavior rather than caption text.

Methods18

AddButtonButton
# AddButton
C#
public Button AddButton(string text, bool right = false, string action = "");

Adds an extra button and returns its shared reference. Nonempty action connects CustomAction without automatic hiding; empty requires your own Pressed handler. right chooses the logical side of the row relative to OK rather than a button role.

Parameters
NameTypeDefault
textstring—
rightboolfalse
actionstring""
text

Adds an extra button and returns its shared reference. Nonempty action connects CustomAction without automatic hiding; empty requires your own Pressed handler. right chooses the logical side of the row relative to OK rather than a button role.

right

Logical row side: false at the beginning, true at the end relative to standard OK.

action

CustomAction identifier; empty adds no automatic action.

Returns Button

Added Button owned by the dialog until detached.

AddCancelButtonButton
# AddCancelButton
C#
public Button AddCancelButton(string name);

Adds a Canceled-path button. Empty name uses the standard localizable Cancel caption; system policy determines placement. The dialog owns it while attached.

Parameters
NameTypeDefault
namestring—
name

Adds a Canceled-path button. Empty name uses the standard localizable Cancel caption; system policy determines placement. The dialog owns it while attached.

Returns Button

Added cancel Button owned by the dialog.

GetCloseOnEscapebool
# GetCloseOnEscape
C#
public bool GetCloseOnEscape();

Allows cancellation through ui_close_dialog, usually Escape; default true. false does not block Cancel buttons or window close requests.

Returns bool

Cancel-through-ui_close_dialog flag.

GetHideOnOkbool
# GetHideOnOk
C#
public bool GetHideOnOk();

Hide before Confirmed, default true. For form validation set false and call Hide manually after success. Does not control cancellation or CustomAction.

Returns bool

Hide-on-confirm flag.

GetLabelLabel
# GetLabel
C#
public Label GetLabel();

Shared internal message Label. Configure appearance/visibility; do not remove or free it.

Returns Label

Shared internal Label.

GetOkButtonButton
# GetOkButton
C#
public Button GetOkButton();

Shared standard confirmation Button owned by the dialog. Configure Disabled/theme; do not remove or free it.

Returns Button

Shared standard OK Button.

GetOkButtonTextstring
# GetOkButtonText
C#
public string GetOkButtonText();

Stored custom OK caption, default empty uses the standard caption. Getter returns this raw value, so can be empty while the button shows OK. Use Confirmed for behavior rather than caption text.

Returns string

Raw OK caption; empty means default.

GetTextstring
# GetText
C#
public string GetText();

Original built-in Label text. Plain text rather than BBCode or form-field values. Direct GetLabel().Text changes are reflected by the getter.

Returns string

Original built-in Label text.

HasAutowrapbool
# HasAutowrap
C#
public bool HasAutowrap();

Built-in Label wrapping: true sets Word, false sets Off. Getter is true for any non-Off Label mode. Does not affect custom-field layout.

Returns bool

true when the built-in Label mode is not Off.

RegisterTextEnter2 overloads
# RegisterTextEnter · 1/2
C#
public void RegisterTextEnter(Control _UnnamedArg0);

Connects a specific LineEdit.TextSubmitted to confirmation once. Checks OK Disabled but not dialog Visible or form validation rules. The Control overload also requires a LineEdit; another Control is not treated as an input field.

Parameters
NameTypeDefault
_UnnamedArg0Control—
_UnnamedArg0

Non-null LineEdit. Connect once rather than supplying an arbitrary Control.

# RegisterTextEnter · 2/2
C#
public void RegisterTextEnter(LineEdit lineEdit);

Connects a specific LineEdit.TextSubmitted to confirmation once. Checks OK Disabled but not dialog Visible or form validation rules. The Control overload also requires a LineEdit; another Control is not treated as an input field.

Parameters
NameTypeDefault
lineEditLineEdit—
lineEdit

Non-null LineEdit. Connect once rather than supplying an arbitrary Control.

RemoveButton2 overloads
# RemoveButton · 1/2
C#
public void RemoveButton(Button button);

Detaches an extra button from this dialog and removes its associated spacer. Does not free the button: reparent or call Free. Cannot remove standard OK; the Control overload requires a Button rather than any Control.

Parameters
NameTypeDefault
buttonButton—
button

Extra Button belonging to this dialog; standard OK is not allowed.

# RemoveButton · 2/2
C#
public void RemoveButton(Control quadrantSize);

Detaches an extra button from this dialog and removes its associated spacer. Does not free the button: reparent or call Free. Cannot remove standard OK; the Control overload requires a Button rather than any Control.

Parameters
NameTypeDefault
quadrantSizeControl—
quadrantSize

Extra Button belonging to this dialog; standard OK is not allowed.

SetAutowrapvoid
# SetAutowrap
C#
public void SetAutowrap(bool autowrap);

Built-in Label wrapping: true sets Word, false sets Off. Getter is true for any non-Off Label mode. Does not affect custom-field layout.

Parameters
NameTypeDefault
autowrapbool—
autowrap

Built-in Label wrapping: true sets Word, false sets Off. Getter is true for any non-Off Label mode. Does not affect custom-field layout.

SetCloseOnEscapevoid
# SetCloseOnEscape
C#
public void SetCloseOnEscape(bool enabled);

Allows cancellation through ui_close_dialog, usually Escape; default true. false does not block Cancel buttons or window close requests.

Parameters
NameTypeDefault
enabledbool—
enabled

Allows cancellation through ui_close_dialog, usually Escape; default true. false does not block Cancel buttons or window close requests.

SetHideOnOkvoid
# SetHideOnOk
C#
public void SetHideOnOk(bool enabled);

Hide before Confirmed, default true. For form validation set false and call Hide manually after success. Does not control cancellation or CustomAction.

Parameters
NameTypeDefault
enabledbool—
enabled

Hide before Confirmed, default true. For form validation set false and call Hide manually after success. Does not control cancellation or CustomAction.

SetOkButtonTextvoid
# SetOkButtonText
C#
public void SetOkButtonText(string text);

Stored custom OK caption, default empty uses the standard caption. Getter returns this raw value, so can be empty while the button shows OK. Use Confirmed for behavior rather than caption text.

Parameters
NameTypeDefault
textstring—
text

Stored custom OK caption, default empty uses the standard caption. Getter returns this raw value, so can be empty while the button shows OK. Use Confirmed for behavior rather than caption text.

SetTextvoid
# SetText
C#
public void SetText(string text);

Original built-in Label text. Plain text rather than BBCode or form-field values. Direct GetLabel().Text changes are reflected by the getter.

Parameters
NameTypeDefault
textstring—
text

Original built-in Label text. Plain text rather than BBCode or form-field values. Direct GetLabel().Text changes are reflected by the getter.

Signals and events3

CanceledEvent
# Canceled
C#
public event Action Canceled;

Cancellation through standard button/close/Escape paths. Hiding is deferred; direct Hide does not emit this signal. Does not imply automatic data rollback.

ConfirmedEvent
# Confirmed
C#
public event Action Confirmed;

Confirmation through OK/a registered field. With DialogHideOnOk = true the window is hidden before this signal. Your handler performs saving/application actions.

CustomActionEvent
# CustomAction
C#
public event AcceptDialog.CustomActionEventHandler CustomAction;

An extra button with nonempty action was activated. Supplies the action StringName; does not itself confirm, cancel or hide the dialog.

Handler parameters
NameTypeDefault
actionStringName—
action

StringName configured as nonempty AddButton action.

Theme properties

These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.

Key and typeDescription
buttons_min_height
int

The minimum height of each button in the bottom row (such as OK/Cancel) in pixels. This can be increased to make buttons with short texts easier to click/tap.

Default: 0
buttons_min_width
int

The minimum width of each button in the bottom row (such as OK/Cancel) in pixels. This can be increased to make buttons with short texts easier to click/tap.

Default: 0
buttons_separation
int

The size of the vertical space between the dialog's content and the button row.

Default: 10
panel
StyleBox

The panel that fills the background of the window.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.