mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Improve formspec scaling (#14840)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user