Minor MainMenu fixes
This commit is contained in:
parent
14a7fe0266
commit
f917f5c8d0
@ -178,7 +178,7 @@ local function get_formspec(self, popup_w, popup_h, popup_fs)
|
||||
fs[#fs + 1] = "bgcolor[;neither]"
|
||||
fs[#fs + 1] = "listcolors[#000;#000;#000;#dff6f5;#302c2e]"
|
||||
fs[#fs + 1] = fmt("background9[1.25,0;%s,%s;%sbg_common.png;false;32]",
|
||||
w, h + 1.15, defaulttexturedir)
|
||||
w, h + 1.15, defaulttexturedir_esc)
|
||||
|
||||
add_button_header(self, fs, w)
|
||||
|
||||
@ -211,7 +211,7 @@ local function get_formspec(self, popup_w, popup_h, popup_fs)
|
||||
fs[#fs + 1] = fmt("container[%s,%s]", (w + 2.5 - popup_w) / 2,
|
||||
(h + 1.15 - popup_h) / 2)
|
||||
fs[#fs + 1] = fmt("style[popup_bg;bgimg=%sbg_common.png;bgimg_middle=32]",
|
||||
defaulttexturedir)
|
||||
defaulttexturedir_esc)
|
||||
fs[#fs + 1] = fmt("image_button[0,0;%s,%s;;popup_bg;;false;false]",
|
||||
popup_w, popup_h)
|
||||
fs[#fs + 1] = popup_fs
|
||||
|
@ -160,14 +160,13 @@ os.tmpname = function()
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
local button_path = defaulttexturedir_esc .. "gui" .. DIR_DELIM_esc
|
||||
local worldlist_scrbar_pos = 0
|
||||
function menu_render_worldlist(selected_index)
|
||||
local fs = {"formspec_version[4]"}
|
||||
|
||||
local outer_w, outer_h = 6.93, 5.65
|
||||
fs[#fs + 1] = fmt("background9[0.52,0.21;%s,%s;%sworldlist_bg_new.png;false;32]",
|
||||
outer_w + 1.2, outer_h + 0.2, button_path)
|
||||
outer_w + 1.2, outer_h + 0.2, defaulttexturedir_esc .. "gui" .. DIR_DELIM_esc)
|
||||
fs[#fs + 1] = fmt("scroll_container[0.62,0.31;%s,%s;scrbar;vertical]", outer_w, outer_h)
|
||||
|
||||
local creative = core.settings:get_bool("creative_mode", false)
|
||||
@ -211,11 +210,9 @@ function menu_render_worldlist(selected_index)
|
||||
|
||||
fs[#fs + 1] = fmt("scrollbaroptions[max=%d;thumbsize=%s]", math.ceil(scrollbar_max),
|
||||
(outer_h / inner_h) * scrollbar_max)
|
||||
fs[#fs + 1] = fmt("scrollbar[%s,0.31;0.8,5.65;vertical;scrbar;%s;" ..
|
||||
"%sscrollbar_bg.png,%sscrollbar_slider_middle.png,%sscrollbar_up.png," ..
|
||||
"%sscrollbar_down.png,%sscrollbar_slider_top.png,%sscrollbar_slider_bottom.png]",
|
||||
outer_w + 0.82, worldlist_scrbar_pos, button_path, button_path,
|
||||
button_path, button_path, button_path, button_path)
|
||||
fs[#fs + 1] = scrollbar_style("scrbar")
|
||||
fs[#fs + 1] = fmt("scrollbar[%s,0.31;0.8,5.65;vertical;scrbar;%s]",
|
||||
outer_w + 0.82, worldlist_scrbar_pos)
|
||||
|
||||
return table.concat(fs)
|
||||
end
|
||||
|
@ -130,7 +130,7 @@ local function get_formspec(_, _, tab_data)
|
||||
if game and game.moddable then
|
||||
retval = retval ..
|
||||
btn_style("world_configure") ..
|
||||
"image_button[8.1,4.85;4,0.9;;world_configure;" .. fgettext("Select Mods") .. ";true;false]" ..
|
||||
"image_button[8.1,4.85;4,0.9;;world_configure;" .. fgettext("Settings") .. ";true;false]" ..
|
||||
"image[8.3,5.02;0.5,0.5;" .. defaulttexturedir_esc .. "gui" .. DIR_DELIM_esc .. "world_settings.png]"
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user