From dd2bb950be36c3ae34caacfe62df391612364f8a Mon Sep 17 00:00:00 2001 From: ngosang Date: Tue, 27 Jan 2015 01:17:04 +0100 Subject: Fix Exit to OS button focus in Pause Menu --- src/guiFormSpecMenu.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/guiFormSpecMenu.h') diff --git a/src/guiFormSpecMenu.h b/src/guiFormSpecMenu.h index ed0e9637c..2074fb780 100644 --- a/src/guiFormSpecMenu.h +++ b/src/guiFormSpecMenu.h @@ -246,13 +246,20 @@ public: m_allowclose = value; } - void lockSize(bool lock,v2u32 basescreensize=v2u32(0,0)) { + void lockSize(bool lock,v2u32 basescreensize=v2u32(0,0)) + { m_lock = lock; m_lockscreensize = basescreensize; } void removeChildren(); void setInitialFocus(); + + void setFocus(std::wstring elementname) + { + m_focused_element = elementname; + } + /* Remove and re-add (or reposition) stuff */ @@ -348,6 +355,7 @@ private: IFormSource *m_form_src; TextDest *m_text_dst; unsigned int m_formspec_version; + std::wstring m_focused_element; typedef struct { bool explicit_size; -- cgit v1.2.3