Misc. mainmenu fixes (#13859)

* settingstypes.txt: Fix wrong default value for profiler.report_path

* Disable Irrlicht file picker on Android
  (It doesn't work.)

* Join Game tab: Fix server description textarea being misaligned with background

* Reduce distance between tab and gamebar on Android
  Allows using a higher gui_scaling value without the gamebar going off-screen.

Co-authored-by: ROllerozxa <rollerozxa@voxelmanip.se>
This commit is contained in:
Gregor Parzefall 2023-10-01 11:19:52 +02:00 committed by GitHub
parent c90c545d33
commit 94eba15c34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 9 deletions

@ -192,7 +192,7 @@ function make.enum(setting)
end
function make.path(setting)
local function make_path(setting)
return {
info_text = setting.comment,
setting = setting,
@ -235,6 +235,15 @@ function make.path(setting)
}
end
if PLATFORM == "Android" then
-- The Irrlicht file picker doesn't work on Android.
make.path = make.string
make.filepath = make.string
else
make.path = make_path
make.filepath = make_path
end
function make.v3f(setting)
return {
@ -362,7 +371,7 @@ function make.flags(setting)
end
local function noise_params(setting)
local function make_noise_params(setting)
return {
info_text = setting.comment,
setting = setting,
@ -390,9 +399,8 @@ local function noise_params(setting)
}
end
make.noise_params_2d = make_noise_params
make.noise_params_3d = make_noise_params
make.filepath = make.path
make.noise_params_2d = noise_params
make.noise_params_3d = noise_params
return make

@ -93,8 +93,12 @@ function singleplayer_refresh_gamebar()
end
end
local btnbar = buttonbar_create("game_button_bar", {x = 0, y = 7.475},
{x = 15.5, y = 1.25}, "#000000", game_buttonbar_button_handler)
local btnbar = buttonbar_create(
"game_button_bar",
TOUCHSCREEN_GUI and {x = 0, y = 7.25} or {x = 0, y = 7.475},
{x = 15.5, y = 1.25},
"#000000",
game_buttonbar_button_handler)
for _, game in ipairs(pkgmgr.games) do
local btn_name = "game_btnbar_" .. game.id

@ -114,7 +114,7 @@ local function get_formspec(tabview, name, tabdata)
"server_favorite_delete.png") .. ";btn_delete_favorite;]"
end
if gamedata.serverdescription then
retval = retval .. "textarea[0.25,1.85;5.2,2.75;;;" ..
retval = retval .. "textarea[0.25,1.85;5.25,2.7;;;" ..
core.formspec_escape(gamedata.serverdescription) .. "]"
end
end

@ -1717,7 +1717,7 @@ profiler.load (Load the game profiler) bool false
profiler.default_report_format (Default report format) enum txt txt,csv,lua,json,json_pretty
# The file path relative to your worldpath in which profiles will be saved to.
profiler.report_path (Report path) string ""
profiler.report_path (Report path) string
# Instrument the methods of entities on registration.
instrument.entity (Entity methods) bool true