mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Remove enable_touch special case for C++ menu scaling (#14800)
This commit is contained in:
parent
7709d92289
commit
3958c19f83
@ -59,14 +59,8 @@ GUIModalMenu::GUIModalMenu(gui::IGUIEnvironment* env, gui::IGUIElement* parent,
|
|||||||
m_menumgr(menumgr),
|
m_menumgr(menumgr),
|
||||||
m_remap_click_outside(remap_click_outside)
|
m_remap_click_outside(remap_click_outside)
|
||||||
{
|
{
|
||||||
m_gui_scale = std::max(g_settings->getFloat("gui_scaling"), 0.5f);
|
m_gui_scale = g_settings->getFloat("gui_scaling", 0.5f, 20.0f) *
|
||||||
const float screen_dpi_scale = RenderingEngine::getDisplayDensity();
|
RenderingEngine::getDisplayDensity();
|
||||||
|
|
||||||
if (g_settings->getBool("enable_touch")) {
|
|
||||||
m_gui_scale *= 1.1f - 0.3f * screen_dpi_scale + 0.2f * screen_dpi_scale * screen_dpi_scale;
|
|
||||||
} else {
|
|
||||||
m_gui_scale *= screen_dpi_scale;
|
|
||||||
}
|
|
||||||
|
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
m_menumgr->createdMenu(this);
|
m_menumgr->createdMenu(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user