Improve default OK text in AcceptDialog

This commit is contained in:
kobewi
2025-04-19 00:57:00 +02:00
parent 428a762e98
commit 076608c979
5 changed files with 34 additions and 23 deletions
+4 -3
View File
@@ -52,7 +52,7 @@ class AcceptDialog : public Window {
bool popped_up = false;
String ok_text;
String internal_ok_text;
String default_ok_text;
bool hide_on_ok = true;
bool close_on_escape = true;
@@ -69,7 +69,7 @@ class AcceptDialog : public Window {
void _update_child_rects();
void _update_ok_text();
static bool swap_cancel_ok;
inline static bool swap_cancel_ok = false;
void _parent_focused();
@@ -80,12 +80,13 @@ protected:
void _notification(int p_what);
static void _bind_methods();
void _validate_property(PropertyInfo &p_property) const;
virtual void ok_pressed() {}
virtual void cancel_pressed() {}
virtual void custom_action(const String &) {}
void set_internal_ok_text(const String &p_text);
void set_default_ok_text(const String &p_text);
// Not private since used by derived classes signal.
void _text_submitted(const String &p_text);