mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
split enable_touch to touch_controls (for touchscreen controls) and touch_gui
touch_gui provide adjustment to the interface, so it's more touch friendly Signed-off-by: David Heidelberg <david@ixit.cz>
This commit is contained in:
parent
1977517d7a
commit
3a59fabefe
11 changed files with 57 additions and 47 deletions
|
@ -181,7 +181,7 @@ local function get_info_formspec(text)
|
|||
return table.concat({
|
||||
"formspec_version[6]",
|
||||
"size[15.75,9.5]",
|
||||
core.settings:get_bool("enable_touch") and "padding[0.01,0.01]" or "position[0.5,0.55]",
|
||||
core.settings:get_bool("touch_gui") and "padding[0.01,0.01]" or "position[0.5,0.55]",
|
||||
|
||||
"label[4,4.35;", text, "]",
|
||||
"container[0,", H - 0.8 - 0.375, "]",
|
||||
|
@ -212,7 +212,7 @@ local function get_formspec(dlgdata)
|
|||
local formspec = {
|
||||
"formspec_version[6]",
|
||||
"size[15.75,9.5]",
|
||||
core.settings:get_bool("enable_touch") and "padding[0.01,0.01]" or "position[0.5,0.55]",
|
||||
core.settings:get_bool("touch_gui") and "padding[0.01,0.01]" or "position[0.5,0.55]",
|
||||
|
||||
"style[status,downloading,queued;border=false]",
|
||||
|
||||
|
@ -463,7 +463,7 @@ end
|
|||
local function handle_events(event)
|
||||
if event == "DialogShow" then
|
||||
-- On touchscreen, don't show the "MINETEST" header behind the dialog.
|
||||
mm_game_theme.set_engine(core.settings:get_bool("enable_touch"))
|
||||
mm_game_theme.set_engine(core.settings:get_bool("touch_gui"))
|
||||
|
||||
-- If ContentDB is already loaded, auto-install packages here.
|
||||
do_auto_install()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue