mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Touch UI support for desktop builds (#10729)
This commit is contained in:
parent
9f85862b7c
commit
3dcf9e963e
16 changed files with 89 additions and 51 deletions
|
@ -77,9 +77,10 @@ GUITable::GUITable(gui::IGUIEnvironment *env,
|
|||
setTabStop(true);
|
||||
setTabOrder(-1);
|
||||
updateAbsolutePosition();
|
||||
#ifdef HAVE_TOUCHSCREENGUI
|
||||
float density = 1; // dp scaling is applied by the skin
|
||||
#else
|
||||
float density = RenderingEngine::getDisplayDensity();
|
||||
#ifdef __ANDROID__
|
||||
density = 1; // dp scaling is applied by the skin
|
||||
#endif
|
||||
core::rect<s32> relative_rect = m_scrollbar->getRelativePosition();
|
||||
s32 width = (relative_rect.getWidth() / (2.0 / 3.0)) * density *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue