1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Touch UI support for desktop builds (#10729)

This commit is contained in:
TheBrokenRail 2021-09-26 12:04:09 -04:00 committed by GitHub
parent 9f85862b7c
commit 3dcf9e963e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 89 additions and 51 deletions

View file

@ -38,9 +38,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#if USE_SOUND
#include "sound_openal.h"
#endif
#ifdef __ANDROID__
#include "porting.h"
#endif
/* mainmenumanager.h
*/
@ -147,8 +144,8 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
skin->setColor(gui::EGDC_3D_SHADOW, video::SColor(255, 0, 0, 0));
skin->setColor(gui::EGDC_HIGH_LIGHT, video::SColor(255, 70, 120, 50));
skin->setColor(gui::EGDC_HIGH_LIGHT_TEXT, video::SColor(255, 255, 255, 255));
#ifdef __ANDROID__
float density = porting::getDisplayDensity();
#ifdef HAVE_TOUCHSCREENGUI
float density = RenderingEngine::getDisplayDensity();
skin->setSize(gui::EGDS_CHECK_BOX_WIDTH, (s32)(17.0f * density));
skin->setSize(gui::EGDS_SCROLLBAR_SIZE, (s32)(14.0f * density));
skin->setSize(gui::EGDS_WINDOW_BUTTON_WIDTH, (s32)(15.0f * density));