1
0

Change main menu scrollbar style

This commit is contained in:
Maksym H 2023-04-25 21:05:45 +03:00
parent a35f56d080
commit 16f8808d92
13 changed files with 18 additions and 0 deletions

View File

@ -108,3 +108,13 @@ function checkbox(x, y, name, label, checked, small)
x, y - 0.25, small and 4.3 or 7, name
)
end
--------------------------------------------------------------------------------
function scrollbar_style(name, style_type)
return "style" .. (style_type and "_type" or "") .. "[" .. name .. ";scrollbar_bgimg=" ..
button_path .. "scrollbar_bg.png;scrollbar_thumb_top_img=" ..
button_path .. "scrollbar_slider_top.png;scrollbar_thumb_bottom_img=" ..
button_path .. "scrollbar_slider_bottom.png;scrollbar_thumb_img=" ..
button_path .. "scrollbar_slider_middle.png;scrollbar_up_img=" ..
button_path .. "scrollbar_up.png;scrollbar_down_img=" ..
button_path .. "scrollbar_down.png;scrollbar_middle=16]"
end

View File

@ -180,6 +180,7 @@ local function get_formspec(data)
"background9[5.6,0.85;5.8,6;" .. defaulttexturedir_esc .. "worldlist_bg.png;false;40]" ..
"tablecolumns[color;tree;text]" ..
"tableoptions[background=#0000;border=false]" ..
scrollbar_style("world_config_modlist") ..
"table[5.58,0.84;5.59,5.82;world_config_modlist;" ..
pkgmgr.render_packagelist(data.list) .. ";" .. data.selected_mod .."]"
end

View File

@ -381,6 +381,7 @@ function install_dialog.get_formspec()
"label[0,0.8;", fgettext("Dependencies:"), "]",
"tablecolumns[color;text;color;text]",
scrollbar_style("packages") ..
"table[0,1.1;6.25,3;packages;", table.concat(formatted_deps, ","), "]",
"container_end[]",

View File

@ -1027,6 +1027,7 @@ local function create_settings_formspec(tabview, _, tabdata)
"style[Dsearch_string;border=false;bgcolor=transparent]" ..
"field[0.3,0.15;12.0,0.9;Dsearch_string;;" .. core.formspec_escape(search_string) .. "]" ..
"field_close_on_enter[Dsearch_string;false]" ..
scrollbar_style("list_settings") ..
"table[0,0.8;11.8,3.5;list_settings;"
local current_level = 0

View File

@ -63,6 +63,7 @@ local function get_formspec(tabview, name, tabdata)
"background9[0,0.23;5.3,4.46;" .. defaulttexturedir_esc .. "worldlist_bg.png;false;40]" ..
"tablecolumns[color;tree;text]" ..
"tableoptions[background=#0000;border=false]" ..
scrollbar_style("pkglist") ..
"table[0,0.25;5.1,4.3;pkglist;" ..
pkgmgr.render_packagelist(packages) ..
";" .. tabdata.selected_pkg .. "]" ..

View File

@ -135,6 +135,7 @@ return {
"worldlist_bg.png;false;40]" ..
"tablecolumns[color;text]" ..
"tableoptions[background=#0000;highlight=#00000000;border=false]" ..
scrollbar_style("list_credits") ..
"table[0,1.5;11.75,4.05;list_credits;" ..
"#FFFF00," .. fgettext("Core Developers") .. " (MultiCraft),," ..
buildCreditList(multicraft_developers) .. ",,," ..

View File

@ -147,6 +147,7 @@ local function get_formspec(_, _, tab_data)
"background9[0,0;6.5,4.8;" .. defaulttexturedir_esc .. "worldlist_bg.png;false;40]" ..
"tableoptions[background=#0000;border=false]" ..
"tablecolumns[" .. image_column(fgettext("Creative mode")) .. ";text]" ..
scrollbar_style("sp_worlds") ..
"table[0,0;6.28,4.64;sp_worlds;" .. menu_render_worldlist() .. ";" .. index .. "]"
if tab_data.hidden then

View File

@ -106,6 +106,7 @@ local function get_formspec(this)
"background9[0,0;6.5,4.8;" .. defaulttexturedir_esc .. "worldlist_bg.png;false;40]" ..
"tableoptions[background=#0000;border=false]" ..
"tablecolumns[" .. image_column(fgettext("Creative mode")) .. ";text]" ..
scrollbar_style("sp_worlds") ..
"table[0,0;6.28,4.64;sp_worlds;" .. menu_render_worldlist() .. ";" .. index .. "]" ..
btn_style("switch_local") ..

View File

@ -113,6 +113,7 @@ local function get_formspec(tabview, name, tabdata)
image_column(fgettext("Server mode")) .. ",padding=0.5;" ..
"color,span=1;" ..
"text,padding=0.5]" ..
scrollbar_style("favorites") ..
"table[-0.02,-0.1;6.91,4.87;favorites;"
if menudata.search_result then

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 465 B

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 B

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

After

Width:  |  Height:  |  Size: 473 B