mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 09:25:37 +02:00
Add allow_close[]
element to formspecs (#15971)
This commit is contained in:
@@ -47,7 +47,8 @@ enum FormspecFieldType {
|
||||
enum FormspecQuitMode {
|
||||
quit_mode_no,
|
||||
quit_mode_accept,
|
||||
quit_mode_cancel
|
||||
quit_mode_cancel,
|
||||
quit_mode_try,
|
||||
};
|
||||
|
||||
enum ButtonEventType : u8
|
||||
@@ -203,9 +204,9 @@ public:
|
||||
m_text_dst = text_dst;
|
||||
}
|
||||
|
||||
void allowClose(bool value)
|
||||
void defaultAllowClose(bool value)
|
||||
{
|
||||
m_allowclose = value;
|
||||
m_default_allowclose = value;
|
||||
}
|
||||
|
||||
void setDebugView(bool value)
|
||||
@@ -363,6 +364,7 @@ protected:
|
||||
u64 m_hovered_time = 0;
|
||||
s32 m_old_tooltip_id = -1;
|
||||
|
||||
bool m_default_allowclose = true;
|
||||
bool m_allowclose = true;
|
||||
bool m_lock = false;
|
||||
v2u32 m_lockscreensize;
|
||||
@@ -422,7 +424,6 @@ private:
|
||||
bool key_up;
|
||||
bool key_down;
|
||||
bool key_enter;
|
||||
bool key_escape;
|
||||
};
|
||||
|
||||
fs_key_pending current_keys_pending;
|
||||
@@ -484,6 +485,7 @@ private:
|
||||
void parseStyle(parserData *data, const std::string &element);
|
||||
void parseSetFocus(parserData *, const std::string &element);
|
||||
void parseModel(parserData *data, const std::string &element);
|
||||
void parseAllowClose(parserData *data, const std::string &element);
|
||||
|
||||
bool parseMiddleRect(const std::string &value, core::rect<s32> *parsed_rect);
|
||||
|
||||
|
Reference in New Issue
Block a user