1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Improve formspec scaling (#14840)

This commit is contained in:
grorp 2024-09-06 12:11:03 +02:00 committed by GitHub
parent 1527cdf6a4
commit 041d67ceca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 176 additions and 87 deletions

View file

@ -92,10 +92,16 @@ function singleplayer_refresh_gamebar()
end
end
local ENABLE_TOUCH = core.settings:get_bool("enable_touch")
local gamebar_pos_y = MAIN_TAB_H
+ TABHEADER_H -- tabheader included in formspec size
+ (ENABLE_TOUCH and GAMEBAR_OFFSET_TOUCH or GAMEBAR_OFFSET_DESKTOP)
local btnbar = buttonbar_create(
"game_button_bar",
core.settings:get_bool("touch_gui") and {x = 0, y = 7.25} or {x = 0, y = 7.475},
{x = 15.5, y = 1.25},
{x = 0, y = gamebar_pos_y},
{x = MAIN_TAB_W, y = GAMEBAR_H},
"#000000",
game_buttonbar_button_handler)