Skip to content

Commit

Permalink
diff reduction
Browse files Browse the repository at this point in the history
  • Loading branch information
grorp committed Feb 27, 2025
1 parent 42e7035 commit 4714d79
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/gui/touchscreenlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ bool ButtonLayout::isButtonRequired(touch_gui_button_id id)
return id == overflow_id;
}

s32 ButtonLayout::getButtonSize(v2u32 screensize)
{
return std::min(screensize.Y / 4.5f,
RenderingEngine::getDisplayDensity() * 65.0f *
g_settings->getFloat("hud_scaling"));
}

const ButtonLayout::ButtonMap ButtonLayout::default_data {
{dig_id, {
v2f(1.0f, 1.0f),
Expand Down Expand Up @@ -225,13 +232,6 @@ ButtonLayout ButtonLayout::loadFromSettings()
return loadDefault();
}

s32 ButtonLayout::getButtonSize(v2u32 screensize)
{
return std::min(screensize.Y / 4.5f,
RenderingEngine::getDisplayDensity() * 65.0f *
g_settings->getFloat("hud_scaling"));
}

std::unordered_map<touch_gui_button_id, irr_ptr<video::ITexture>> ButtonLayout::texture_cache;

video::ITexture *ButtonLayout::getTexture(touch_gui_button_id btn, ISimpleTextureSource *tsrc)
Expand Down

0 comments on commit 4714d79

Please sign in to comment.