]> git.lizzy.rs Git - minetest.git/blobdiff - src/guiFormSpecMenu.h
Fix RUN_IN_PLACE broken due to invalid usage of assert
[minetest.git] / src / guiFormSpecMenu.h
index 6d6c07453ed8440c30847aca3821fca07b84b35c..2074fb780c7e71746197beaac8ba8f5326309c59 100644 (file)
@@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "inventorymanager.h"
 #include "modalMenu.h"
 #include "guiTable.h"
-#include "clientserver.h"
+#include "network/networkprotocol.h"
 
 class IGameDef;
 class InventoryManager;
@@ -246,13 +246,20 @@ class GUIFormSpecMenu : public GUIModalMenu
                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 @@ class GUIFormSpecMenu : public GUIModalMenu
        IFormSource      *m_form_src;
        TextDest         *m_text_dst;
        unsigned int      m_formspec_version;
+       std::wstring      m_focused_element;
 
        typedef struct {
                bool explicit_size;