mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-20 03:35:18 +02:00
Cherry-pick most commits since 15c0376
Commits not directly related to network changes were cherry-picked on a best-effort basis, as some cause difficult merge conflicts. Commits skipped over:0d1eedcccc
aa474e4501
82482ecd9d
b214cde5b4
2066655aae
7e088fdfe3
40bf1d7b5f
1b2f64473e
7e56637ed0
64ff966bae
51057a56f5
009149a073
cf4045ff0f
e357577cb2
49f84b76bc
b019221c30
7880ff74b6
146f77fdb7
a704c04f00
Commits with conflicts:038d3a31df
e9eda2b0d0
708337dfc2
~~ modified client.cpp manually; shadow changes to packethandlers/client.cpp36e8ba9ce2
~~ modified main.cpp manually; add ALLOW_ZWRITE_ON_TRANSPARENT set3b6480c5b0
~~ modified server.cpp manually; change wrapDegrees -> modulo360f5a5854ea9d
c09d026f05
3c91ad8fc2
This commit is contained in:
@@ -39,9 +39,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "log.h"
|
||||
#include "tile.h" // ITextureSource
|
||||
#include "hud.h" // drawItemStack
|
||||
#include "hex.h"
|
||||
#include "util/string.h"
|
||||
#include "util/numeric.h"
|
||||
#include "filesys.h"
|
||||
#include "gettime.h"
|
||||
#include "gettext.h"
|
||||
@@ -50,8 +47,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "main.h"
|
||||
#include "settings.h"
|
||||
#include "client.h"
|
||||
#include "util/string.h" // for parseColorString()
|
||||
#include "fontengine.h"
|
||||
#include "util/hex.h"
|
||||
#include "util/numeric.h"
|
||||
#include "util/string.h" // for parseColorString()
|
||||
|
||||
#define MY_CHECKPOS(a,b) \
|
||||
if (v_pos.size() != 2) { \
|
||||
@@ -97,6 +96,7 @@ GUIFormSpecMenu::GUIFormSpecMenu(irr::IrrlichtDevice* dev,
|
||||
m_form_src(fsrc),
|
||||
m_text_dst(tdst),
|
||||
m_formspec_version(0),
|
||||
m_focused_element(L""),
|
||||
m_font(NULL)
|
||||
#ifdef __ANDROID__
|
||||
,m_JavaDialogFieldName(L"")
|
||||
@@ -1757,8 +1757,6 @@ void GUIFormSpecMenu::parseElement(parserData* data, std::string element)
|
||||
<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GUIFormSpecMenu::regenerateGui(v2u32 screensize)
|
||||
{
|
||||
/* useless to regenerate without a screensize */
|
||||
@@ -1775,6 +1773,10 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize)
|
||||
mydata.table_dyndata[tablename] = table->getDynamicData();
|
||||
}
|
||||
|
||||
//set focus
|
||||
if (!m_focused_element.empty())
|
||||
mydata.focused_fieldname = m_focused_element;
|
||||
|
||||
//preserve focus
|
||||
gui::IGUIElement *focused_element = Environment->getFocus();
|
||||
if (focused_element && focused_element->getParent() == this) {
|
||||
|
Reference in New Issue
Block a user