mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Allow toggling touchscreen mode at runtime (#14075)
Signed-off-by: David Heidelberg <david@ixit.cz> Co-authored-by: Gregor Parzefall <gregor.parzefall@posteo.de>
This commit is contained in:
parent
e3cc26cb7c
commit
34286d77c7
24 changed files with 175 additions and 220 deletions
|
@ -25,10 +25,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <IGUIStaticText.h>
|
||||
#include <IGUIFont.h>
|
||||
|
||||
#ifdef HAVE_TOUCHSCREENGUI
|
||||
#include "client/renderingengine.h"
|
||||
#endif
|
||||
|
||||
#include "porting.h"
|
||||
#include "gettext.h"
|
||||
|
||||
|
@ -66,11 +62,8 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
|
|||
/*
|
||||
Calculate new sizes and positions
|
||||
*/
|
||||
#ifdef HAVE_TOUCHSCREENGUI
|
||||
const float s = m_gui_scale * RenderingEngine::getDisplayDensity() / 2;
|
||||
#else
|
||||
const float s = m_gui_scale;
|
||||
#endif
|
||||
|
||||
DesiredRect = core::rect<s32>(
|
||||
screensize.X / 2 - 580 * s / 2,
|
||||
screensize.Y / 2 - 300 * s / 2,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue