mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add allow_close[]
element to formspecs (#15971)
This commit is contained in:
parent
04e82749db
commit
fd85737460
9 changed files with 71 additions and 44 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue