aboutsummaryrefslogtreecommitdiff
path: root/src/gui/guiFormSpecMenu.cpp
diff options
context:
space:
mode:
authorTheBrokenRail <17478432+TheBrokenRail@users.noreply.github.com>2021-09-26 12:04:09 -0400
committerGitHub <noreply@github.com>2021-09-26 18:04:09 +0200
commit3dcf9e963e3d3c5d209cd3676c2f979a58c6c1ab (patch)
treec60d824fdbd211710d51b89f60913fccc0ee9d76 /src/gui/guiFormSpecMenu.cpp
parent9f85862b7c0d2fd6fe964699bbeabc824026e848 (diff)
downloadminetest-3dcf9e963e3d3c5d209cd3676c2f979a58c6c1ab.tar.gz
minetest-3dcf9e963e3d3c5d209cd3676c2f979a58c6c1ab.tar.bz2
minetest-3dcf9e963e3d3c5d209cd3676c2f979a58c6c1ab.zip
Touch UI support for desktop builds (#10729)
Diffstat (limited to 'src/gui/guiFormSpecMenu.cpp')
-rw-r--r--src/gui/guiFormSpecMenu.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp
index 797fd3ff6..938481fa2 100644
--- a/src/gui/guiFormSpecMenu.cpp
+++ b/src/gui/guiFormSpecMenu.cpp
@@ -308,7 +308,7 @@ void GUIFormSpecMenu::parseSize(parserData* data, const std::string &element)
data->invsize.Y = MYMAX(0, stof(parts[1]));
lockSize(false);
-#ifndef __ANDROID__
+#ifndef HAVE_TOUCHSCREENGUI
if (parts.size() == 3) {
if (parts[2] == "true") {
lockSize(true,v2u32(800,600));
@@ -3278,7 +3278,7 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize)
((15.0 / 13.0) * (0.85 + mydata.invsize.Y));
}
-#ifdef __ANDROID__
+#ifdef HAVE_TOUCHSCREENGUI
// In Android, the preferred imgsize should be larger to accommodate the
// smaller screensize.
double prefer_imgsize = padded_screensize.Y / 10 * gui_scaling;
@@ -3741,7 +3741,7 @@ void GUIFormSpecMenu::showTooltip(const std::wstring &text,
v2u32 screenSize = Environment->getVideoDriver()->getScreenSize();
int tooltip_offset_x = m_btn_height;
int tooltip_offset_y = m_btn_height;
-#ifdef __ANDROID__
+#ifdef HAVE_TOUCHSCREENGUI
tooltip_offset_x *= 3;
tooltip_offset_y = 0;
if (m_pointer.X > (s32)screenSize.X / 2)