From 3b200d6e4839358c1ca42ec328566ec61f9cb93a Mon Sep 17 00:00:00 2001 From: Maksim Date: Sun, 27 Feb 2022 21:33:33 +0100 Subject: [PATCH] Update MainMenu look --- builtin/fstk/dialog.lua | 3 +- builtin/fstk/tabview.lua | 42 +-- builtin/fstk/ui.lua | 12 +- builtin/mainmenu/common.lua | 2 +- builtin/mainmenu/dlg_config_world.lua | 5 +- builtin/mainmenu/dlg_contentstore.lua | 10 +- builtin/mainmenu/dlg_create_world.lua | 31 ++- builtin/mainmenu/dlg_create_world_default.lua | 23 +- builtin/mainmenu/dlg_delete_content.lua | 11 +- builtin/mainmenu/dlg_delete_world.lua | 13 +- builtin/mainmenu/dlg_rename_modpack.lua | 11 +- builtin/mainmenu/dlg_settings_advanced.lua | 10 +- builtin/mainmenu/init.lua | 39 ++- builtin/mainmenu/pkgmgr.lua | 19 +- builtin/mainmenu/tab_credits.lua | 19 +- builtin/mainmenu/tab_local.lua | 50 ++-- builtin/mainmenu/tab_local_default.lua | 52 ++-- builtin/mainmenu/tab_online.lua | 65 ++--- builtin/mainmenu/tab_settings.lua | 2 +- builtin/mainmenu/tab_settings_simple.lua | 258 ++++++++++++++++++ builtin/mainmenu/textures.lua | 14 +- src/client/renderingengine.cpp | 1 - src/defaultsettings.cpp | 3 +- src/gui/guiEngine.cpp | 2 +- src/script/scripting_mainmenu.cpp | 2 + textures/base/pack/authors_menu.png | Bin 0 -> 349 bytes textures/base/pack/authors_menu_pressed.png | Bin 0 -> 355 bytes textures/base/pack/bg_common.png | Bin 162 -> 746 bytes textures/base/pack/bg_local.png | Bin 4805 -> 0 bytes textures/base/pack/bg_online.png | Bin 2676 -> 0 bytes textures/base/pack/btn_play.png | Bin 677 -> 1005 bytes textures/base/pack/btn_play_hover.png | Bin 0 -> 984 bytes textures/base/pack/creative_bg.png | Bin 412 -> 704 bytes textures/base/pack/creative_bg_ru.png | Bin 505 -> 790 bytes textures/base/pack/creative_checkbox.png | Bin 223 -> 172 bytes textures/base/pack/gift_btn.png | Bin 0 -> 68 bytes textures/base/pack/gift_btn_pressed.png | Bin 0 -> 68 bytes textures/base/pack/server_flags_creative.png | Bin 264 -> 210 bytes textures/base/pack/server_flags_damage.png | Bin 213 -> 194 bytes textures/base/pack/server_flags_favorite.png | Bin 285 -> 185 bytes textures/base/pack/server_flags_mc.png | Bin 202 -> 187 bytes textures/base/pack/server_flags_pvp.png | Bin 262 -> 278 bytes textures/base/pack/settings_menu.png | Bin 0 -> 330 bytes textures/base/pack/settings_menu_pressed.png | Bin 0 -> 337 bytes textures/base/pack/world_delete.png | Bin 0 -> 866 bytes textures/base/pack/world_delete_hover.png | Bin 0 -> 861 bytes textures/base/pack/world_new.png | Bin 0 -> 769 bytes textures/base/pack/world_new_hover.png | Bin 0 -> 768 bytes textures/base/pack/worldlist_bg.png | Bin 0 -> 324 bytes 49 files changed, 501 insertions(+), 198 deletions(-) create mode 100644 builtin/mainmenu/tab_settings_simple.lua create mode 100644 textures/base/pack/authors_menu.png create mode 100644 textures/base/pack/authors_menu_pressed.png delete mode 100644 textures/base/pack/bg_local.png delete mode 100644 textures/base/pack/bg_online.png create mode 100644 textures/base/pack/btn_play_hover.png create mode 100644 textures/base/pack/gift_btn.png create mode 100644 textures/base/pack/gift_btn_pressed.png mode change 100644 => 100755 textures/base/pack/server_flags_damage.png mode change 100644 => 100755 textures/base/pack/server_flags_favorite.png create mode 100644 textures/base/pack/settings_menu.png create mode 100644 textures/base/pack/settings_menu_pressed.png create mode 100644 textures/base/pack/world_delete.png create mode 100644 textures/base/pack/world_delete_hover.png create mode 100644 textures/base/pack/world_new.png create mode 100644 textures/base/pack/world_new_hover.png create mode 100644 textures/base/pack/worldlist_bg.png diff --git a/builtin/fstk/dialog.lua b/builtin/fstk/dialog.lua index f9e7c7bbd..c87b8f12e 100644 --- a/builtin/fstk/dialog.lua +++ b/builtin/fstk/dialog.lua @@ -74,7 +74,8 @@ function messagebox(name, message) function() return ([[ size[12,5.4,false] - background[0,0;0,0;%s;true;32] + bgcolor[#0000] + background9[0,0;14,8;%s;true;40] textarea[1,1;10,4;;;%s] button[5,4.5;2,0.8;ok;%s] ]]):format(bg, message, fgettext("OK")) diff --git a/builtin/fstk/tabview.lua b/builtin/fstk/tabview.lua index f170c7697..1fa586c5e 100644 --- a/builtin/fstk/tabview.lua +++ b/builtin/fstk/tabview.lua @@ -56,36 +56,30 @@ local function add_tab(self,tab) end end -local function get_bg(tsize, tabname) - local bg = - "background[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;32]" - - if tabname then - bg = bg .. - "background[0,0;" .. tsize.width .. "," .. tsize.height .. ";" .. - core.formspec_escape(defaulttexturedir .. - "bg_" .. tabname .. ".png") .. ";true]" - end - - return bg -end - -------------------------------------------------------------------------------- local function get_formspec(self) local formspec = "" if not self.hidden and (self.parent == nil or not self.parent.hidden) then local name = self.tablist[self.last_tab_index].name - local tabname = (name == "local" or name == "online") and name - or (name == "local_default" and "local") if self.parent == nil then local tsize = self.tablist[self.last_tab_index].tabsize or {width=self.width, height=self.height} + local defaulttexturedir = core.formspec_escape(defaulttexturedir) formspec = formspec .. string.format("size[%f,%f,%s]",tsize.width,tsize.height, - dump(self.fixed_size)) .. get_bg(tsize, tabname) + dump(self.fixed_size)) .. + "bgcolor[#0000]" .. + "background9[0,0;0,0;" .. defaulttexturedir .. "bg_common.png;true;40]" .. + "style[settings_tab;content_offset=0]" .. + "image_button[12.02,1.3;1,1.55;" .. + defaulttexturedir .. "settings_menu.png;settings_tab;;true;false;" .. + defaulttexturedir .. "settings_menu_pressed.png]" .. + "style[authors_tab;content_offset=0]" .. + "image_button[12.02,2.7;1,1.55;" .. + defaulttexturedir .. "authors_menu.png;authors_tab;;true;false;" .. + defaulttexturedir .. "authors_menu_pressed.png]" end formspec = formspec .. self:tab_header() formspec = formspec .. @@ -99,6 +93,7 @@ local function get_formspec(self) return formspec end +local set_tab_by_name -------------------------------------------------------------------------------- local function handle_buttons(self,fields) @@ -115,6 +110,14 @@ local function handle_buttons(self,fields) return true end + if fields.authors_tab then + set_tab_by_name(self, "credits") + return true + elseif fields.settings_tab then + set_tab_by_name(self, "settings") + return true + end + if self.tablist[self.last_tab_index].button_handler ~= nil then return self.tablist[self.last_tab_index].button_handler( @@ -208,7 +211,8 @@ local function handle_tab_buttons(self,fields) end -------------------------------------------------------------------------------- -local function set_tab_by_name(self, name) +-- Declared as a local variable above handle_buttons +function set_tab_by_name(self, name) for i=1,#self.tablist,1 do if self.tablist[i].name == name then switch_to_tab(self, i) diff --git a/builtin/fstk/ui.lua b/builtin/fstk/ui.lua index 30a3f42f8..efb5def95 100644 --- a/builtin/fstk/ui.lua +++ b/builtin/fstk/ui.lua @@ -88,8 +88,9 @@ function ui.update() formspec = { "formspec_version[3]", "size[14,8.25]", - "background[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;32]", + "bgcolor[#0000]", + "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. + "bg_common.png") .. ";true;40]", "box[0.5,1.2;13,5;#000]", ("textarea[0.5,1.2;13,5;;%s;%s]"):format( fgettext("The server has requested a reconnect:"), error_message), @@ -108,7 +109,7 @@ function ui.update() end local restart_btn = "button[5,6.6;4,1;btn_reconnect_no;" .. fgettext("Close") .. "]" if maintab == "local" or maintab == "local_default" and - connect_time and connect_time < os.time() - 30 then + connect_time and os.time() - connect_time > 30 then restart_btn = "button[2,6.6;4,1;btn_reconnect_yes;" .. fgettext("Restart") .. "]" .. "button[8,6.6;4,1;btn_reconnect_no;" .. fgettext("Close") .. "]" @@ -116,8 +117,9 @@ function ui.update() formspec = { "formspec_version[3]", "size[14,8.25]", - "background[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;32]", + "bgcolor[#0000]", + "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. + "bg_common.png") .. ";true;40]", "box[0.5,1.2;13,5;#000]", ("textarea[0.5,1.2;13,5;;%s;%s]"):format( error_title, error_message), diff --git a/builtin/mainmenu/common.lua b/builtin/mainmenu/common.lua index b221606c3..99357e59c 100644 --- a/builtin/mainmenu/common.lua +++ b/builtin/mainmenu/common.lua @@ -99,7 +99,7 @@ function render_serverlist_row(spec, is_favorite) details = details .. "11," end else - details = details .. "0," + details = details .. "11," end if spec.clients and spec.clients_max then diff --git a/builtin/mainmenu/dlg_config_world.lua b/builtin/mainmenu/dlg_config_world.lua index 7446abd8f..9596cf8d4 100644 --- a/builtin/mainmenu/dlg_config_world.lua +++ b/builtin/mainmenu/dlg_config_world.lua @@ -70,8 +70,9 @@ local function get_formspec(data) local retval = "size[11.5,7.5,false]" .. - "background[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;32]" .. + "bgcolor[#0000]" .. + "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. + "bg_common.png") .. ";true;40]" .. "label[0.5,0;" .. fgettext("World:") .. "]" .. "label[1.75,0;" .. data.worldspec.name .. "]" diff --git a/builtin/mainmenu/dlg_contentstore.lua b/builtin/mainmenu/dlg_contentstore.lua index d61cecd69..2ccb0a7c3 100644 --- a/builtin/mainmenu/dlg_contentstore.lua +++ b/builtin/mainmenu/dlg_contentstore.lua @@ -702,8 +702,9 @@ function store.get_formspec(dlgdata) formspec = { "formspec_version[3]", "size[15.75,9.5;false]", - "background[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;32]", + "bgcolor[#0000]" .. + "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. + "bg_common.png") .. ";true;40]", "position[0.5,0.55]", "style[status,downloading,queued;border=false]", @@ -769,8 +770,9 @@ function store.get_formspec(dlgdata) else formspec = { "size[12,7;false]", - "background[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;32]", + "bgcolor[#0000]" .. + "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. + "bg_common.png") .. ";true;40]", "position[0.5,0.55]", "label[4,3;", fgettext("No packages could be retrieved"), "]", "container[0,", H - 0.8 - 0.375, "]", diff --git a/builtin/mainmenu/dlg_create_world.lua b/builtin/mainmenu/dlg_create_world.lua index 88215ce1b..3e5abab6c 100644 --- a/builtin/mainmenu/dlg_create_world.lua +++ b/builtin/mainmenu/dlg_create_world.lua @@ -98,8 +98,9 @@ local function create_world_formspec(dialogdata) -- Error out when no games found if #pkgmgr.games == 0 then return "size[12.25,3,false]" .. - "background[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;32]" .. + "bgcolor[#0000]" .. + "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. + "bg_common.png") .. ";true;40]" .. "box[0,0;12,2;#ff8800]" .. "textarea[0.3,0;11.7,2;;;".. fgettext("You have no games installed.") .. "\n" .. @@ -134,7 +135,7 @@ local function create_world_formspec(dialogdata) end end - local game_by_gameidx = pkgmgr.get_game_no_default(gameidx) + local game_by_gameidx = core.get_game(gameidx) local disallowed_mapgen_settings = {} if game_by_gameidx ~= nil then local gamepath = game_by_gameidx.path @@ -318,10 +319,16 @@ local function create_world_formspec(dialogdata) gamelist_height = 0.5 end + local _gameidx = gameidx + if _gameidx >= pkgmgr.default_game_idx then + _gameidx = _gameidx - 1 + end + local retval = "size[12.25,7,false]" .. - "background[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;32]" .. + "bgcolor[#0000]" .. + "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. + "bg_common.png") .. ";true;40]" .. -- Left side "container[0,0]".. @@ -338,7 +345,7 @@ local function create_world_formspec(dialogdata) "label[0,3.35;" .. fgettext("Game") .. "]".. "textlist[0,3.85;5.8,"..gamelist_height..";games;" .. - pkgmgr.gamelist() .. ";" .. gameidx .. ";false]" .. + pkgmgr.gamelist() .. ";" .. _gameidx .. ";false]" .. "container[0,4.5]" .. devtest_only .. "container_end[]" .. @@ -351,6 +358,7 @@ local function create_world_formspec(dialogdata) "container_end[]".. -- Menu buttons + "style[world_create_confirm;bgcolor=#00d12b]" .. "button[3.25,6.5;3,0.5;world_create_confirm;" .. fgettext("Create") .. "]" .. "button[6.25,6.5;3,0.5;world_create_cancel;" .. fgettext("Cancel") .. "]" @@ -367,7 +375,11 @@ local function create_world_buttonhandler(this, fields) local gameindex = core.get_textlist_index("games") if gameindex ~= nil then - -- For unnamed worlds use the generated name 'world', + if gameindex >= pkgmgr.default_game_idx then + gameindex = gameindex + 1 + end + + -- For unnamed worlds use the generated name 'World ', -- where the number increments: it is set to 1 larger than the largest -- generated name number found. if worldname == "" then @@ -386,7 +398,7 @@ local function create_world_buttonhandler(this, fields) local message if not menudata.worldlist:uid_exists_raw(worldname) then core.settings:set("mg_name",fields["dd_mapgen"]) - message = pkgmgr.create_world_no_default(worldname,gameindex) + message = core.create_world(worldname,gameindex) else message = fgettext("A world named \"$1\" already exists", worldname) end @@ -414,6 +426,9 @@ local function create_world_buttonhandler(this, fields) if fields["games"] then local gameindex = core.get_textlist_index("games") + if gameindex >= pkgmgr.default_game_idx then + gameindex = gameindex + 1 + end core.settings:set("menu_last_game", pkgmgr.games[gameindex].id) return true end diff --git a/builtin/mainmenu/dlg_create_world_default.lua b/builtin/mainmenu/dlg_create_world_default.lua index d93cdb9f1..e7f276174 100644 --- a/builtin/mainmenu/dlg_create_world_default.lua +++ b/builtin/mainmenu/dlg_create_world_default.lua @@ -61,21 +61,22 @@ local function create_world_formspec() mglist = mglist:sub(1, -2) local retval = - "size[12,6,false]" .. - "background[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;32]" .. - "label[1.5,1.2;" .. fgettext("World name") .. ":" .. "]".. - "field[4.5,1.5;6,0.5;te_world_name;;]" .. + "size[12,5.4,false]" .. + "bgcolor[#0000]" .. + "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. + "bg_common.png") .. ";true;40]" .. + "label[1.5,0.9;" .. fgettext("World name") .. ":" .. "]".. + "field[4.5,1.2;6,0.5;te_world_name;;]" .. - "label[1.5,2.2;" .. fgettext("Seed") .. ":" .. "]".. - "field[4.5,2.5;6,0.5;te_seed;;".. current_seed .. "]" .. + "label[1.5,1.9;" .. fgettext("Seed") .. ":" .. "]".. + "field[4.5,2.2;6,0.5;te_seed;;".. current_seed .. "]" .. - "label[1.5,3.2;" .. fgettext("Mapgen") .. ":" .. "]".. - "dropdown[4.2,3.05;6.3;dd_mapgen;" .. mglist .. ";" .. selindex .. "]" .. + "label[1.5,2.9;" .. fgettext("Mapgen") .. ":" .. "]".. + "dropdown[4.2,2.75;6.3;dd_mapgen;" .. mglist .. ";" .. selindex .. "]" .. "style[world_create_confirm;bgcolor=#00d12b]" .. - "button[3.5,4.8;2.5,0.5;world_create_confirm;" .. fgettext("Create") .. "]" .. - "button[6,4.8;2.5,0.5;world_create_cancel;" .. fgettext("Cancel") .. "]" + "button[3.5,4.4;2.5,0.5;world_create_confirm;" .. fgettext("Create") .. "]" .. + "button[6,4.4;2.5,0.5;world_create_cancel;" .. fgettext("Cancel") .. "]" return retval diff --git a/builtin/mainmenu/dlg_delete_content.lua b/builtin/mainmenu/dlg_delete_content.lua index ce609827f..f1d425787 100644 --- a/builtin/mainmenu/dlg_delete_content.lua +++ b/builtin/mainmenu/dlg_delete_content.lua @@ -19,14 +19,15 @@ local function delete_content_formspec(dialogdata) local retval = - "size[11.5,4.5,false]" .. - "background[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;32]" .. + "size[12,5.4,false]" .. + "bgcolor[#0000]" .. + "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. + "bg_common.png") .. ";true;40]" .. "label[2,2;" .. fgettext("Are you sure you want to delete \"$1\"?", dialogdata.content.name) .. "]".. "style[dlg_delete_content_confirm;bgcolor=red]" .. - "button[3.25,3.5;2.5,0.5;dlg_delete_content_confirm;" .. fgettext("Delete") .. "]" .. - "button[5.75,3.5;2.5,0.5;dlg_delete_content_cancel;" .. fgettext("Cancel") .. "]" + "button[3,4.8;3,0.5;dlg_delete_content_confirm;" .. fgettext("Delete") .. "]" .. + "button[6,4.8;3,0.5;dlg_delete_content_cancel;" .. fgettext("Cancel") .. "]" return retval end diff --git a/builtin/mainmenu/dlg_delete_world.lua b/builtin/mainmenu/dlg_delete_world.lua index 10e0b4e09..652c297bf 100644 --- a/builtin/mainmenu/dlg_delete_world.lua +++ b/builtin/mainmenu/dlg_delete_world.lua @@ -24,15 +24,16 @@ local function delete_world_formspec(dialogdata) end local retval = - "size[12,4,false]" .. - "background[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;32]" .. - "image_button[2,0.5;8,2;" .. core.formspec_escape(defaulttexturedir .. + "size[12,5.4,false]" .. + "bgcolor[#0000]" .. + "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. + "bg_common.png") .. ";true;40]" .. + "image_button[2,1;8,3;" .. core.formspec_escape(defaulttexturedir .. "blank.png") .. ";;" .. fgettext("Delete World \"$1\"?", delete_name) .. ";true;false;]" .. "style[world_delete_confirm;bgcolor=red]" .. - "button[3.5,2.8;2.5,0.5;world_delete_confirm;" .. fgettext("Delete") .. "]" .. - "button[6,2.8;2.5,0.5;world_delete_cancel;" .. fgettext("Cancel") .. "]" + "button[3,4.8;3,0.5;world_delete_confirm;" .. fgettext("Delete") .. "]" .. + "button[6,4.8;3,0.5;world_delete_cancel;" .. fgettext("Cancel") .. "]" return retval end diff --git a/builtin/mainmenu/dlg_rename_modpack.lua b/builtin/mainmenu/dlg_rename_modpack.lua index 1bcf3dfd8..06f821e91 100644 --- a/builtin/mainmenu/dlg_rename_modpack.lua +++ b/builtin/mainmenu/dlg_rename_modpack.lua @@ -19,12 +19,13 @@ local function rename_modpack_formspec(dialogdata) local retval = - "size[11.5,4.5,false]" .. - "background[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;32]" .. - "button[3.25,3.5;2.5,0.5;dlg_rename_modpack_confirm;".. + "size[12,5.4,false]" .. + "bgcolor[#0000]" .. + "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. + "bg_common.png") .. ";true;40]" .. + "button[3,4.8;3,0.5;dlg_rename_modpack_confirm;".. fgettext("Accept") .. "]" .. - "button[5.75,3.5;2.5,0.5;dlg_rename_modpack_cancel;".. + "button[3,4.8;3,0.5;dlg_rename_modpack_cancel;".. fgettext("Cancel") .. "]" local input_y = 2 diff --git a/builtin/mainmenu/dlg_settings_advanced.lua b/builtin/mainmenu/dlg_settings_advanced.lua index 390d249d5..509432ee4 100644 --- a/builtin/mainmenu/dlg_settings_advanced.lua +++ b/builtin/mainmenu/dlg_settings_advanced.lua @@ -788,8 +788,9 @@ local function create_change_setting_formspec(dialogdata) return ( "size[" .. width .. "," .. height + 0.25 .. ",false]" .. - "background[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;32]" .. + "bgcolor[#0000]" .. + "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. + "bg_common.png") .. ";true;40]" .. create_textfield(description_box, setting_name, comment_text) .. formspec .. "button[" .. width / 2 - 2.5 .. "," .. height - 0.4 .. ";2.5,1;btn_done;" .. @@ -952,8 +953,9 @@ end local function create_settings_formspec(tabview, _, tabdata) local formspec = "size[12,5.4;false]" .. - "background[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;32]" .. + "bgcolor[#0000]" .. + "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. + "bg_common.png") .. ";true;40]" .. "tablecolumns[color;tree;text,width=28;text]" .. "tableoptions[background=#00000000;border=false]" .. "field[0.3,0.1;10.2,1;search_string;;" .. core.formspec_escape(search_string) .. "]" .. diff --git a/builtin/mainmenu/init.lua b/builtin/mainmenu/init.lua index c244656f2..3dda43186 100644 --- a/builtin/mainmenu/init.lua +++ b/builtin/mainmenu/init.lua @@ -55,6 +55,8 @@ local tabs = {} if not mobile then tabs.settings = dofile(menupath .. DIR_DELIM .. "tab_settings.lua") tabs.content = dofile(menupath .. DIR_DELIM .. "tab_content.lua") +else + tabs.settings = dofile(menupath .. DIR_DELIM .. "tab_settings_simple.lua") end tabs.credits = dofile(menupath .. DIR_DELIM .. "tab_credits.lua") @@ -62,13 +64,7 @@ tabs.local_default_game = dofile(menupath .. DIR_DELIM .. "tab_local_default.lua tabs.local_game = dofile(menupath .. DIR_DELIM .. "tab_local.lua") tabs.play_online = dofile(menupath .. DIR_DELIM .. "tab_online.lua") -local htabs = {} -local hpath = menupath .. DIR_DELIM .. "hosting" .. DIR_DELIM .. "init.lua" -local hosting = io.open(hpath, "r") -if hosting then - htabs = dofile(hpath) - io.close(hosting) -end +local func = loadfile(menupath .. DIR_DELIM .. "hosting" .. DIR_DELIM .. "init.lua") -------------------------------------------------------------------------------- local function main_event_handler(tabview, event) @@ -79,7 +75,7 @@ local function main_event_handler(tabview, event) end -------------------------------------------------------------------------------- -local function init_globals() +function menudata.init_tabs() -- Init gamedata gamedata.worldindex = 0 @@ -107,7 +103,7 @@ local function init_globals() mm_texture.init() -- Create main tabview - local tv_main = tabview_create("maintab", {x = 12, y = 5.4}, {x = 0, y = 0}) + local tv_main = tabview_create("maintab", {x = 12, y = 5.4}, {x = 0.1, y = 0}) for i = 1, #pkgmgr.games do if pkgmgr.games[i].id == "default" then @@ -123,26 +119,28 @@ local function init_globals() end end - for _, page in pairs(htabs) do - tv_main:add(page) + if func then + func(tv_main) end tv_main:add(tabs.play_online) if not mobile then - tv_main:set_autosave_tab(true) tv_main:add(tabs.content) - tv_main:add(tabs.settings) end + tv_main:add(tabs.settings) tv_main:add(tabs.credits) + tv_main:set_autosave_tab(true) tv_main:set_global_event_handler(main_event_handler) tv_main:set_fixed_size(false) - if not mobile then - local last_tab = core.settings:get("maintab_LAST") - if last_tab and tv_main.current_tab ~= last_tab then - tv_main:set_tab(last_tab) - end + local last_tab = core.settings:get("maintab_LAST") + if last_tab and tv_main.current_tab ~= last_tab then + tv_main:set_tab(last_tab) + end + + if last_tab ~= "local" and not core.settings:get_bool("menu_clouds") then + mm_texture.set_dirt_bg() end -- In case the folder of the last selected game has been deleted, @@ -157,10 +155,9 @@ local function init_globals() ui.set_default("maintab") tv_main:show() - core.set_clouds(false) - mm_texture.set_dirt_bg() + core.set_clouds(core.settings:get_bool("menu_clouds")) ui.update() end -init_globals() +menudata.init_tabs() diff --git a/builtin/mainmenu/pkgmgr.lua b/builtin/mainmenu/pkgmgr.lua index 4eb81dfaf..f043dc75b 100644 --- a/builtin/mainmenu/pkgmgr.lua +++ b/builtin/mainmenu/pkgmgr.lua @@ -901,29 +901,14 @@ function pkgmgr.get_game(index) end -------------------------------------------------------------------------------- -local default_game_idx -function pkgmgr.get_game_no_default(index) - if default_game_idx and index >= default_game_idx then - index = index + 1 - end - return pkgmgr.get_game(index) -end - -function pkgmgr.create_world_no_default(worldname, gameindex) - if default_game_idx and gameindex >= default_game_idx then - gameindex = gameindex + 1 - end - return core.create_world(worldname, gameindex) -end - --------------------------------------------------------------------------------- +pkgmgr.default_game_idx = math.huge function pkgmgr.update_gamelist() pkgmgr.games = core.get_games() -- Update default_game_idx for i, game in ipairs(pkgmgr.games) do if game.id == "default" then - default_game_idx = i + pkgmgr.default_game_idx = i break end end diff --git a/builtin/mainmenu/tab_credits.lua b/builtin/mainmenu/tab_credits.lua index d702afe3f..ec37a10bf 100644 --- a/builtin/mainmenu/tab_credits.lua +++ b/builtin/mainmenu/tab_credits.lua @@ -18,14 +18,14 @@ -------------------------------------------------------------------------------- local multicraft_developers = { - "Maksim Gamarnik (MoNTE48) ", + "Maksim Gamarnik (MoNTE48) ", "Bektur Mambetov (ubulem) ", "Alexander Zavrin (Ransom.00)", "luk3yx", "Nathan Salapat (NathanS21) ", "Vitaliy Lobachevskiy (numberZero) ", - "Jean-Patrick Guerrero (kilbith) ", "An0n3m0us", + "Jean-Patrick Guerrero (kilbith) ", "sfan5 ", "Stuart Jones (stujones11) ", "And other people who helped make the world better!" @@ -112,19 +112,21 @@ end return { name = "credits", - caption = fgettext("Credits"), + caption = "", -- fgettext("Credits"), cbf_formspec = function(tabview, name, tabdata) local version = core.get_version() - local fs = "label[0.1,-0.2;" .. + local fs = "label[0.05,-0.2;" .. "MultiCraft Open Source, ver. " .. version.string .. "\n" .. - "Copyright (C) 2014-2021 MultiCraft Development Team\n" .. + "Copyright (C) 2014-2022 MultiCraft Development Team\n" .. "License: GNU LGPLv3.0+ and CC BY-SA 4.0\n" .. "Created and Powered by Minetest Engine, ver. 5.4.1]" .. "button[9.5,0;2.5,0.5;homepage;Home Page]" .. "button[9.5,0.8;2.5,0.5;privacy;Privacy Policy]" .. + "background9[0.1,1.5;11.85,4.15;" .. + core.formspec_escape(defaulttexturedir) .. "worldlist_bg.png" .. ";false;40]" .. "tablecolumns[color;text]" .. - "tableoptions[background=#999999;highlight=#00000000;border=true]" .. - "table[0,1.5;11.8,4;list_credits;" .. + "tableoptions[background=#0000;highlight=#00000000;border=false]" .. + "table[0.1,1.5;11.65,4;list_credits;" .. "#FFFF00," .. fgettext("MultiCraft Developers") .. ",," .. buildCreditList(multicraft_developers) .. ",,," .. "#FFFF00," .. fgettext("Minetest Developers") .. ",," .. @@ -134,8 +136,7 @@ return { "#FFFF00," .. fgettext("Previous Core Developers") ..",," .. buildCreditList(previous_core_developers) .. ",,," .. "#FFFF00," .. fgettext("Previous Contributors") .. ",," .. - buildCreditList(previous_contributors) .. "," .. - ";1]" + buildCreditList(previous_contributors) .. ";1]" --[[if PLATFORM ~= "Android" then fs = fs .. "tooltip[userdata;" .. diff --git a/builtin/mainmenu/tab_local.lua b/builtin/mainmenu/tab_local.lua index 949042062..0d72783f0 100644 --- a/builtin/mainmenu/tab_local.lua +++ b/builtin/mainmenu/tab_local.lua @@ -19,6 +19,8 @@ local lang = core.settings:get("language") if not lang or lang == "" then lang = os.getenv("LANG") end local mobile = PLATFORM == "Android" or PLATFORM == "iOS" +local esc = core.formspec_escape + local function current_game() local last_game_id = core.settings:get("menu_last_game") local game = pkgmgr.find_by_gameid(last_game_id) @@ -77,11 +79,11 @@ local function singleplayer_refresh_gamebar() local image = nil local text = nil - local tooltip = core.formspec_escape(pkgmgr.games[i].name) + local tooltip = esc(pkgmgr.games[i].name) if pkgmgr.games[i].menuicon_path ~= nil and pkgmgr.games[i].menuicon_path ~= "" then - image = core.formspec_escape(pkgmgr.games[i].menuicon_path) + image = esc(pkgmgr.games[i].menuicon_path) else local part1 = pkgmgr.games[i].id:sub(1,5) local part2 = pkgmgr.games[i].id:sub(6,10) @@ -99,7 +101,7 @@ local function singleplayer_refresh_gamebar() end if not mobile then - local plus_image = core.formspec_escape(defaulttexturedir .. "plus.png") + local plus_image = esc(defaulttexturedir .. "plus.png") btnbar:add_button("game_open_cdb", "", plus_image, fgettext("Install games from ContentDB")) end end @@ -124,8 +126,11 @@ local function get_formspec() local index = filterlist.get_current_index(menudata.worldlist, tonumber(core.settings:get("mainmenu_last_selected_world"))) + -- Default index + if index == 0 then index = 1 end + local creative_checkbox = core.settings:get_bool("creative_mode") and - "creative_checkbox" or "blank" + "creative_checkbox.png" or "blank.png" local creative_bg = "creative_bg.png" if lang and lang == "ru" then @@ -133,32 +138,33 @@ local function get_formspec() end local retval = - "image_button[0,4.84;3.31,0.92;" .. - core.formspec_escape(defaulttexturedir .. - "blank.png") .. ";world_delete;;true;false]" .. + "style[world_delete;fgimg=" .. esc(defaulttexturedir .. "world_delete.png") .. + ";fgimg_hovered=" .. esc(defaulttexturedir .. "world_delete_hover.png") .. "]" .. + "image_button[-0.1,4.84;3.45,0.92;;world_delete;;true;false]" .. "tooltip[world_delete;".. fgettext("Delete") .. "]" .. - "image_button[3.14,4.84;3.3,0.92;" .. - core.formspec_escape(defaulttexturedir .. - "blank.png") .. ";world_create;;true;false]" .. + + "style[world_create;fgimg=" .. esc(defaulttexturedir .. "world_new.png") .. + ";fgimg_hovered=" .. esc(defaulttexturedir .. "world_new_hover.png") .. "]" .. + "image_button[3.15,4.84;3.45,0.92;;world_create;;true;false]" .. "tooltip[world_create;".. fgettext("New") .. "]" .. + "button[9.5,4.8;2.5,1;world_configure;".. fgettext("Configure") .. "]" .. - "image_button[6.72,1.43;4.96,1.41;" .. - core.formspec_escape(defaulttexturedir .. - "blank.png") .. ";play;;true;false]" .. + "style[play;fgimg=" .. esc(defaulttexturedir .. "btn_play.png") .. + ";fgimg_hovered=" .. esc(defaulttexturedir .. "btn_play_hover.png") .. "]" .. + "image_button[6.72,1.43;4.96,1.41;;play;;true;false]" .. "tooltip[play;".. fgettext("Play Game") .. "]" .. "image_button[7.2,3.09;4,0.83;" .. - core.formspec_escape(defaulttexturedir) .. creative_bg .. - ";;;true;false]" .. + esc(defaulttexturedir) .. creative_bg .. ";;;true;false]" .. "image_button[7.2,3.09;4,0.83;" .. - core.formspec_escape(defaulttexturedir) .. creative_checkbox .. - ".png;cb_creative_mode;;true;false]" .. + esc(defaulttexturedir) .. creative_checkbox .. ";cb_creative_mode;;true;false]" .. - "tableoptions[background=#27233F;border=false]" .. - "table[-0.01,0;6.28,4.64;sp_worlds;" .. - menu_render_worldlist() .. - ";" .. index .. "]" + "background9[0,0;6.5,4.8;" .. + esc(defaulttexturedir) .. "worldlist_bg.png" .. ";false;40]" .. + "tableoptions[background=#0000;border=false]" .. + "table[0,0;6.28,4.64;sp_worlds;" .. + menu_render_worldlist() .. ";" .. index .. "]" if PLATFORM ~= "Android" and PLATFORM ~= "iOS" then @@ -176,7 +182,7 @@ local function get_formspec() "label[6.6,-0.3;" .. fgettext("Name") .. ":" .. "]" .. "label[9.3,-0.3;" .. fgettext("Password") .. ":" .. "]" .. "field[6.9,0.6;2.8,0.5;te_playername;;" .. - core.formspec_escape(core.settings:get("name")) .. "]" .. + esc(core.settings:get("name")) .. "]" .. "pwdfield[9.6,0.6;2.8,0.5;te_passwd;]" end diff --git a/builtin/mainmenu/tab_local_default.lua b/builtin/mainmenu/tab_local_default.lua index e92bf3fc1..36946e77b 100644 --- a/builtin/mainmenu/tab_local_default.lua +++ b/builtin/mainmenu/tab_local_default.lua @@ -18,6 +18,8 @@ local lang = core.settings:get("language") if not lang or lang == "" then lang = os.getenv("LANG") end +local esc = core.formspec_escape + local default_worlds = { {name = "World 1", mg_name = "v7p", seed = "15823438331521897617"}, {name = "World 2", mg_name = "v7p", seed = "1841722166046826822"}, @@ -73,12 +75,12 @@ local function get_formspec() if selected ~= nil and selected < #menudata.worldlist:get_list() then index = selected else - index = #menudata.worldlist:get_list() + index = 1 end end local creative_checkbox = core.settings:get_bool("creative_mode") and - "creative_checkbox" or "blank" + "creative_checkbox.png" or "blank.png" local creative_bg = "creative_bg.png" if lang and lang == "ru" then @@ -86,32 +88,38 @@ local function get_formspec() end local retval = - "image_button[0,4.84;3.31,0.92;" .. - core.formspec_escape(defaulttexturedir .. - "blank.png") .. ";world_delete;;true;false]" .. + "style[world_delete;fgimg=" .. esc(defaulttexturedir .. "world_delete.png") .. + ";fgimg_hovered=" .. esc(defaulttexturedir .. "world_delete_hover.png") .. "]" .. + "image_button[-0.1,4.84;3.45,0.92;;world_delete;;true;false]" .. "tooltip[world_delete;".. fgettext("Delete") .. "]" .. - "image_button[3.14,4.84;3.3,0.92;" .. - core.formspec_escape(defaulttexturedir .. - "blank.png") .. ";world_create;;true;false]" .. + + "style[world_create;fgimg=" .. esc(defaulttexturedir .. "world_new.png") .. + ";fgimg_hovered=" .. esc(defaulttexturedir .. "world_new_hover.png") .. "]" .. + "image_button[3.15,4.84;3.45,0.92;;world_create;;true;false]" .. "tooltip[world_create;".. fgettext("New") .. "]" .. - "image_button[6.72,1.43;4.96,1.41;" .. - core.formspec_escape(defaulttexturedir .. - "blank.png") .. ";play;;true;false]" .. + "style[play;fgimg=" .. esc(defaulttexturedir .. "btn_play.png") .. + ";fgimg_hovered=" .. esc(defaulttexturedir .. "btn_play_hover.png") .. "]" .. + "image_button[6.72,1.43;4.96,1.41;;play;;true;false]" .. "tooltip[play;".. fgettext("Play Game") .. "]" .. "image_button[7.2,3.09;4,0.83;" .. - core.formspec_escape(defaulttexturedir) .. creative_bg .. - ";;;true;false]" .. + esc(defaulttexturedir) .. creative_bg .. ";;;true;false]" .. "image_button[7.2,3.09;4,0.83;" .. - core.formspec_escape(defaulttexturedir) .. creative_checkbox .. - ".png;cb_creative_mode;;true;false]" .. + esc(defaulttexturedir) .. creative_checkbox .. ";cb_creative_mode;;true;false]" .. - "tableoptions[background=#27233F;border=false]" .. - "table[-0.01,0;6.28,4.64;sp_worlds;" .. - menu_render_worldlist() .. - ";" .. index .. "]" + "background9[0,0;6.5,4.8;" .. + esc(defaulttexturedir) .. "worldlist_bg.png" .. ";false;40]" .. + "tableoptions[background=#0000;border=false]" .. + "table[0,0;6.28,4.64;sp_worlds;" .. + menu_render_worldlist() .. ";" .. index .. "]" + if PLATFORM == "Android" then + retval = retval .. + "image_button[10.6,-0.1;1.5,1.5;" .. + esc(defaulttexturedir) .. "gift_btn.png;upgrade;;true;false;" .. + esc(defaulttexturedir) .. "gift_btn_pressed.png]" + end if PLATFORM ~= "Android" and PLATFORM ~= "iOS" then retval = retval .. @@ -128,7 +136,7 @@ local function get_formspec() "label[6.6,-0.3;" .. fgettext("Name") .. ":" .. "]" .. "label[9.3,-0.3;" .. fgettext("Password") .. ":" .. "]" .. "field[6.9,0.6;2.8,0.5;te_playername;;" .. - core.formspec_escape(core.settings:get("name")) .. "]" .. + esc(core.settings:get("name")) .. "]" .. "pwdfield[9.6,0.6;2.8,0.5;te_passwd;]" end @@ -255,6 +263,10 @@ local function main_button_handler(this, fields, name) return true end + if fields["upgrade"] then + core.upgrade("") + end + --[[if fields["world_configure"] ~= nil then local selected = core.get_table_index("sp_worlds") if selected ~= nil then diff --git a/builtin/mainmenu/tab_online.lua b/builtin/mainmenu/tab_online.lua index 53e9f1301..b056f282b 100644 --- a/builtin/mainmenu/tab_online.lua +++ b/builtin/mainmenu/tab_online.lua @@ -40,57 +40,56 @@ local function get_formspec(tabview, name, tabdata) if PLATFORM == "Android" or PLATFORM == "iOS" then search_panel = "field[0.2,0.1;5.19,1;te_search;;" .. esc(tabdata.search_for) .. "]" .. - "image_button[4.89,-0.13;0.83,0.83;" .. esc(defaulttexturedir .. "search.png") - .. ";btn_mp_search;;true;false]" .. - "image_button[5.59,-0.13;0.83,0.83;" .. esc(defaulttexturedir .. "refresh.png") - .. ";btn_mp_refresh;;true;false]" .. + "style[btn_mp_search;content_offset=0]" .. + "image_button[4.89,-0.13;0.83,0.83;" .. esc(defaulttexturedir .. "search.png") .. + ";btn_mp_search;;true;false]" .. + "image_button[5.59,-0.13;0.83,0.83;" .. esc(defaulttexturedir .. "refresh.png") .. + ";btn_mp_refresh;;true;false]" .. "image_button[6.29,-0.13;0.83,0.83;" .. esc(defaulttexturedir .. - (serverlistmgr.mobile_only and "online_mobile" or "online_pc") .. ".png") - .. ";btn_mp_mobile;;true;false]" + (serverlistmgr.mobile_only and "online_mobile" or "online_pc") .. ".png") .. + ";btn_mp_mobile;;true;false]" else search_panel = - "field[0.2,0.1;5.8,1;te_search;;" .. core.formspec_escape(tabdata.search_for) .. "]" .. - "image_button[5.5,-0.13;0.83,0.83;" .. core.formspec_escape(defaulttexturedir .. "search.png") - .. ";btn_mp_search;;true;false]" .. - "image_button[6.26,-0.13;0.83,0.83;" .. core.formspec_escape(defaulttexturedir .. "refresh.png") - .. ";btn_mp_refresh;;true;false]" + "field[0.2,0.1;5.8,1;te_search;;" .. esc(tabdata.search_for) .. "]" .. + "style[btn_mp_search;content_offset=0]" .. + "image_button[5.5,-0.13;0.83,0.83;" .. esc(defaulttexturedir .. "search.png") .. + ";btn_mp_search;;true;false]" .. + "image_button[6.26,-0.13;0.83,0.83;" .. esc(defaulttexturedir .. "refresh.png") .. + ";btn_mp_refresh;;true;false]" end local retval = -- Search - search_panel.. + search_panel .. -- Address / Port - "label[7.1,-0.3;" .. fgettext("Address") .. ":" .. "]" .. - "label[10.15,-0.3;" .. fgettext("Port") .. ":" .. "]" .. - "field[7.4,0.6;3.2,0.5;te_address;;" .. + "field[7.4,0.6;3.2,0.5;te_address;" .. fgettext("Address") .. ":" .. ";" .. esc(core.settings:get("address")) .. "]" .. - "field[10.45,0.6;1.95,0.5;te_port;;" .. + "field[10.45,0.6;1.95,0.5;te_port;" .. fgettext("Port") .. ":" .. ";" .. esc(core.settings:get("remote_port")) .. "]" .. -- Name - "label[7.1,0.85;" .. fgettext("Name") .. ":" .. "]" .. - "label[10.15,0.85;" .. fgettext("Password") .. ":" .. "]" .. - "field[7.4,1.75;3.2,0.5;te_name;;" .. + "field[7.4,1.75;3.2,0.5;te_name;" .. fgettext("Name") .. ":" .. ";" .. esc(core.settings:get("name")) .. "]" .. -- Description Background - "box[7.1,2.1;4.8,2.65;#999999]" .. + "box[7.1,2.1;4.8,2.65;#33314B99]" .. -- Connect - "image_button[8.8,4.88;3.3,0.9;" .. - esc(defaulttexturedir .. "blank.png") - .. ";btn_mp_connect;;true;false]" .. + "style[btn_mp_connect;fgimg=" .. esc(defaulttexturedir .. "btn_play.png") .. + ";fgimg_hovered=" .. esc(defaulttexturedir .. "btn_play_hover.png") .. "]" .. + "image_button[8.8,4.88;3.3,0.9;;btn_mp_connect;;true;false]" .. "tooltip[btn_mp_connect;".. fgettext("Connect") .. "]" - local pwd = password_save and esc(core.settings:get("password")) or password_tmp + local pwd = password_save and core.settings:get("password") or password_tmp -- Password - retval = retval .. "pwdfield[10.45,1.8;1.95,0.39;te_pwd;;" .. pwd .. "]" + retval = retval .. "pwdfield[10.45,1.8;1.95,0.39;te_pwd;" .. + fgettext("Password") .. ":" .. ";" .. esc(pwd) .. "]" if tabdata.selected and selected then if gamedata.fav then - retval = retval .. "image_button[7.1,4.91;0.83,0.83;" .. esc(defaulttexturedir .. "trash.png") - .. ";btn_delete_favorite;;true;false]" + retval = retval .. "image_button[7.1,4.91;0.83,0.83;" .. + esc(defaulttexturedir .. "trash.png") .. ";btn_delete_favorite;;true;false]" end if selected.description then retval = retval .. "textarea[7.5,2.2;4.8,3;;" .. @@ -98,12 +97,14 @@ local function get_formspec(tabview, name, tabdata) end end - --favourites + --favorites retval = retval .. - "tableoptions[background=#27233F;border=false]" .. + "background9[-0.07,0.7;7.19,5.08;" .. + esc(defaulttexturedir) .. "worldlist_bg.png" .. ";false;40]" .. + "tableoptions[background=#0000;border=false]" .. "tablecolumns[" .. image_column(fgettext("Favorite")) .. ",align=center;" .. - image_column(fgettext("Lag")) .. ",padding=0.25;" .. + image_column(fgettext("Lag")) .. ",padding=0.5;" .. "color,span=3;" .. "text,align=right;" .. -- clients "text,align=center,padding=0.25;" .. -- "/" @@ -111,7 +112,7 @@ local function get_formspec(tabview, name, tabdata) image_column(fgettext("Server mode")) .. ",padding=0.5;" .. "color,span=1;" .. "text,padding=0.5]" .. - "table[-0.09,0.7;6.99,4.93;favorites;" + "table[-0.1,0.7;7,4.94;favorites;" if menudata.search_result then local favs = serverlistmgr.get_favorites() @@ -140,7 +141,7 @@ local function get_formspec(tabview, name, tabdata) table.insert(serverlistmgr.servers, i, table.remove(serverlistmgr.servers, j)) end end - if favs[i].address ~= serverlistmgr.servers[i].address then + if serverlistmgr.servers[i] and favs[i].address ~= serverlistmgr.servers[i].address then table.insert(serverlistmgr.servers, i, favs[i]) end end diff --git a/builtin/mainmenu/tab_settings.lua b/builtin/mainmenu/tab_settings.lua index 875f4bff6..32d7a369e 100644 --- a/builtin/mainmenu/tab_settings.lua +++ b/builtin/mainmenu/tab_settings.lua @@ -338,7 +338,7 @@ end return { name = "settings", - caption = fgettext("Settings"), + caption = "", -- fgettext("Settings"), cbf_formspec = formspec, cbf_button_handler = handle_settings_buttons } diff --git a/builtin/mainmenu/tab_settings_simple.lua b/builtin/mainmenu/tab_settings_simple.lua new file mode 100644 index 000000000..7a6b7ffbf --- /dev/null +++ b/builtin/mainmenu/tab_settings_simple.lua @@ -0,0 +1,258 @@ +--Minetest +--Copyright (C) 2020-2022 MultiCraft Development Team +--Copyright (C) 2013 sapier +-- +--This program is free software; you can redistribute it and/or modify +--it under the terms of the GNU Lesser General Public License as published by +--the Free Software Foundation; either version 3.0 of the License, or +--(at your option) any later version. +-- +--This program is distributed in the hope that it will be useful, +--but WITHOUT ANY WARRANTY; without even the implied warranty of +--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +--GNU Lesser General Public License for more details. +-- +--You should have received a copy of the GNU Lesser General Public License along +--with this program; if not, write to the Free Software Foundation, Inc., +--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +-------------------------------------------------------------------------------- + +local labels = { + node_highlighting = { + fgettext("Node Outlining"), + fgettext("Node Highlighting"), + fgettext("None") + } +} + +local dd_options = { + node_highlighting = { + table.concat(labels.node_highlighting, ","), + {"box", "halo", "none"} + } +} + +local getSettingIndex = { + NodeHighlighting = function() + local style = core.settings:get("node_highlighting") + for idx, name in pairs(dd_options.node_highlighting[2]) do + if style == name then return idx end + end + return 1 + end +} + +local function formspec(tabview, name, tabdata) + local fps = tonumber(core.settings:get("fps_max")) + local range = tonumber(core.settings:get("viewing_range")) + local sensitivity = tonumber(core.settings:get("mouse_sensitivity")) * 2000 + local touchtarget = core.settings:get_bool("touchtarget") or false + local sound = tonumber(core.settings:get("sound_volume")) ~= 0 and true or false + + local tab_string = + "box[0,0;3.75,5.5;#999999]" .. + "checkbox[0.25,-0.05;cb_smooth_lighting;" .. fgettext("Smooth Lighting") .. ";" + .. dump(core.settings:get_bool("smooth_lighting")) .. "]" .. + "checkbox[0.25,0.5;cb_particles;" .. fgettext("Particles") .. ";" + .. dump(core.settings:get_bool("enable_particles")) .. "]" .. + "checkbox[0.25,1.1;cb_3d_clouds;" .. fgettext("3D Clouds") .. ";" + .. dump(core.settings:get_bool("enable_3d_clouds")) .. "]" .. + --[["checkbox[0.25,1.7;cb_opaque_water;" .. fgettext("Opaque Water") .. ";" + .. dump(core.settings:get_bool("opaque_water")) .. "]" .. + "checkbox[0.25,2.0;cb_connected_glass;" .. fgettext("Connected Glass") .. ";" + .. dump(core.settings:get_bool("connected_glass")) .. "]" ..]] + "checkbox[0.25,1.7;cb_fog;" .. fgettext("Fog") .. ";" + .. dump(core.settings:get_bool("enable_fog")) .. "]" .. + "checkbox[0.25,2.3;cb_inventory_items_animations;" .. fgettext("Inv. animations") .. ";" + .. dump(core.settings:get_bool("inventory_items_animations")) .. "]" .. + "checkbox[0.25,2.9;cb_fancy_leaves;" .. fgettext("Fancy Leaves") .. ";" + .. dump(sound) .. "]" .. + "checkbox[0.25,3.5;cb_touchtarget;" .. fgettext("Touchtarget") .. ";" + .. dump(touchtarget) .. "]" .. + "checkbox[0.25,4.1;cb_sound;" .. fgettext("Sound") .. ";" + .. dump(sound) .. "]" .. + "box[4,0;3.75,5.5;#999999]" .. + + "label[4.25,0.15;" .. fgettext("Maximum FPS") .. ":]" .. + "dropdown[4.25,0.6;3.5;dd_fps_max;30,35,45,60;" .. + tonumber(fps <= 30 and 1 or fps == 35 and 2 or fps == 45 and 3 or 4) .. "]" .. + + "label[4.25,1.5;" .. fgettext("Viewing range") .. ":]" .. + "dropdown[4.25,1.95;3.5;dd_viewing_range;30,40,60,80,100,125,150,175,200;" .. + tonumber(range <= 30 and 1 or range == 40 and 2 or range == 60 and 3 or + range == 80 and 4 or range == 100 and 5 or range == 125 and 6 or + range == 150 and 7 or range == 175 and 8 or 9) .. "]" .. + + "label[4.25,2.85;" .. fgettext("Node highlighting") .. ":]" .. + "dropdown[4.25,3.3;3.5;dd_node_highlighting;" .. dd_options.node_highlighting[1] .. ";" + .. getSettingIndex.NodeHighlighting() .. "]" .. + + "label[4.25,4.2;" .. fgettext("Mouse sensitivity") .. ":]" .. + "scrollbar[4.25,4.65;3.22,0.5;horizontal;sb_sensitivity;" .. sensitivity .. "]" .. + + -- "box[8,0;3.75,4.5;#999999]" + "box[8,0;3.75,5.5;#999999]" + + local video_driver = core.settings:get("video_driver") + local shaders_enabled = video_driver == "opengl" or video_driver == "ogles2" + core.settings:set_bool("enable_shaders", shaders_enabled) + if shaders_enabled then + tab_string = tab_string .. + "label[8.25,0.15;" .. fgettext("Shaders") .. "]" + else + tab_string = tab_string .. + "label[8.25,0.15;" .. core.colorize("#888888", + fgettext("Shaders (unavailable)")) .. "]" + end + +--[[tab_string = tab_string .. + "button[8,3.22;3.95,1;btn_change_keys;" + .. fgettext("Change Keys") .. "]" + + tab_string = tab_string .. + "button[8,4.57;3.95,1;btn_advanced_settings;" + .. fgettext("All Settings") .. "]"]] + + if shaders_enabled then + tab_string = tab_string .. + "checkbox[8.25,0.55;cb_tonemapping;" .. fgettext("Tone Mapping") .. ";" + .. dump(core.settings:get_bool("tone_mapping")) .. "]" .. + "checkbox[8.25,1.15;cb_waving_water;" .. fgettext("Waving liquids") .. ";" + .. dump(core.settings:get_bool("enable_waving_water")) .. "]" .. + "checkbox[8.25,1.75;cb_waving_leaves;" .. fgettext("Waving leaves") .. ";" + .. dump(core.settings:get_bool("enable_waving_leaves")) .. "]" .. + "checkbox[8.25,2.35;cb_waving_plants;" .. fgettext("Waving plants") .. ";" + .. dump(core.settings:get_bool("enable_waving_plants")) .. "]" + else + tab_string = tab_string .. + "label[8.38,0.75;" .. core.colorize("#888888", + fgettext("Tone Mapping")) .. "]" .. + "label[8.38,1.35;" .. core.colorize("#888888", + fgettext("Waving Liquids")) .. "]" .. + "label[8.38,1.95;" .. core.colorize("#888888", + fgettext("Waving Leaves")) .. "]" .. + "label[8.38,2.55;" .. core.colorize("#888888", + fgettext("Waving Plants")) .. "]" + end + + return tab_string +end + +-------------------------------------------------------------------------------- +local function handle_settings_buttons(this, fields, tabname, tabdata) + -- Note dropdowns have to be handled LAST! + local ddhandled = false + +--[[if fields["btn_advanced_settings"] ~= nil then + local adv_settings_dlg = create_adv_settings_dlg() + adv_settings_dlg:set_parent(this) + this:hide() + adv_settings_dlg:show() + return true + end]] + if fields["cb_smooth_lighting"] then + core.settings:set("smooth_lighting", fields["cb_smooth_lighting"]) + return true + end + if fields["cb_particles"] then + core.settings:set("enable_particles", fields["cb_particles"]) + return true + end + if fields["cb_3d_clouds"] then + core.settings:set("enable_3d_clouds", fields["cb_3d_clouds"]) + return true + end + if fields["cb_opaque_water"] then + core.settings:set("opaque_water", fields["cb_opaque_water"]) + return true + end +--[[if fields["cb_connected_glass"] then + core.settings:set("connected_glass", fields["cb_connected_glass"]) + return true + end]] + if fields["cb_fog"] then + core.settings:set("enable_fog", fields["cb_fog"]) + return true + end + if fields["cb_inventory_items_animations"] then + core.settings:set("inventory_items_animations", fields["cb_inventory_items_animations"]) + return true + end + if fields["cb_fancy_leaves"] then + core.settings:set("dd_leaves_style", fields["cb_fancy_leaves"] and "fancy" or "opaque") + ddhandled = true + end + if fields["cb_touchtarget"] then + core.settings:set("touchtarget", fields["cb_touchtarget"]) + return true + end + if fields["cb_sound"] then + core.settings:set("sound_volume", (minetest.is_yes(fields["cb_sound"]) and "1.0") or "0.0") + return true + end + if fields["cb_shaders"] then + core.settings:set("enable_shaders", fields["cb_shaders"]) + return true + end + if fields["cb_tonemapping"] then + core.settings:set("tone_mapping", fields["cb_tonemapping"]) + return true + end + if fields["cb_waving_water"] then + core.settings:set("enable_waving_water", fields["cb_waving_water"]) + return true + end + if fields["cb_waving_leaves"] then + core.settings:set("enable_waving_leaves", fields["cb_waving_leaves"]) + end + if fields["cb_waving_plants"] then + core.settings:set("enable_waving_plants", fields["cb_waving_plants"]) + return true + end +--[[if fields["btn_change_keys"] then + core.show_keys_menu() + return true + end]] + + if fields["cb_touchscreen_target"] then + core.settings:set("touchtarget", fields["cb_touchscreen_target"]) + ddhandled = true + end + for i = 1, #labels.node_highlighting do + if fields["dd_node_highlighting"] == labels.node_highlighting[i] then + core.settings:set("node_highlighting", dd_options.node_highlighting[2][i]) + ddhandled = true + end + end + if fields["dd_fps_max"] then + core.settings:set("fps_max", fields["dd_fps_max"]) + ddhandled = true + end + if fields["dd_viewing_range"] then + core.settings:set("viewing_range", fields["dd_viewing_range"]) + ddhandled = true + end + if fields["sb_sensitivity"] then + -- reset old setting + core.settings:remove("touchscreen_threshold") + + local event = core.explode_scrollbar_event(fields["sb_sensitivity"]) + if event.type == "CHG" then + core.settings:set("mouse_sensitivity", event.value / 2000) + + -- The formspec cannot be updated or the scrollbar movement will + -- break. + ddhandled = false + end + end + + return ddhandled +end + +return { + name = "settings", + caption = "", -- fgettext("Settings"), + cbf_formspec = formspec, + cbf_button_handler = handle_settings_buttons +} diff --git a/builtin/mainmenu/textures.lua b/builtin/mainmenu/textures.lua index 74070840c..c93d8817e 100644 --- a/builtin/mainmenu/textures.lua +++ b/builtin/mainmenu/textures.lua @@ -46,6 +46,12 @@ end -------------------------------------------------------------------------------- function mm_texture.reset() mm_texture.gameid = nil + local have_bg = false + local have_overlay = mm_texture.set_generic("overlay") + + if not have_overlay then + have_bg = mm_texture.set_generic("background") + end mm_texture.clear("header") mm_texture.clear("footer") @@ -54,7 +60,13 @@ function mm_texture.reset() mm_texture.set_generic("footer") mm_texture.set_generic("header") - mm_texture.set_dirt_bg() + if not have_bg then + if core.settings:get_bool("menu_clouds") then + core.set_clouds(true) + else + mm_texture.set_dirt_bg() + end + end end -------------------------------------------------------------------------------- diff --git a/src/client/renderingengine.cpp b/src/client/renderingengine.cpp index 9620302ef..0a42b1981 100644 --- a/src/client/renderingengine.cpp +++ b/src/client/renderingengine.cpp @@ -516,7 +516,6 @@ void RenderingEngine::_draw_load_screen(const std::wstring &text, guienv->addStaticText(text.c_str(), textrect, false, false); guitext->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); - clouds = false; // disable clouds at loading time bool cloud_menu_background = clouds && g_settings->getBool("menu_clouds"); if (cloud_menu_background) { g_menuclouds->step(dtime * 3); diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index a1967515b..8d02b8e50 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -220,7 +220,7 @@ void set_default_settings() settings->setDefault("fall_bobbing_amount", "1.0"); settings->setDefault("enable_3d_clouds", "true"); settings->setDefault("cloud_radius", "12"); - settings->setDefault("menu_clouds", "true"); + settings->setDefault("menu_clouds", "false"); settings->setDefault("opaque_water", "false"); settings->setDefault("console_height", "0.6"); settings->setDefault("console_color", "(0,0,0)"); @@ -490,7 +490,6 @@ void set_default_settings() settings->setDefault("screen_dpi", "72"); settings->setDefault("display_density_factor", "1"); - settings->setDefault("mainmenu_last_selected_world", "1"); settings->setDefault("device_is_tablet", "false"); // Altered settings for macOS diff --git a/src/gui/guiEngine.cpp b/src/gui/guiEngine.cpp index a34258d6e..c6d0a8b5a 100644 --- a/src/gui/guiEngine.cpp +++ b/src/gui/guiEngine.cpp @@ -509,7 +509,7 @@ void GUIEngine::drawHeader(video::IVideoDriver *driver) if (free_space > splashsize.Y) { core::rect splashrect(0, 0, splashsize.X, splashsize.Y); splashrect += v2s32((screensize.Width/2)-(splashsize.X/2), - ((free_space/2)-splashsize.Y/2)+10); + ((free_space/2)-splashsize.Y/2)); draw2DImageFilterScaled(driver, texture, splashrect, core::rect(core::position2d(0,0), diff --git a/src/script/scripting_mainmenu.cpp b/src/script/scripting_mainmenu.cpp index 195f4da34..1d3a60c90 100644 --- a/src/script/scripting_mainmenu.cpp +++ b/src/script/scripting_mainmenu.cpp @@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "lua_api/l_base.h" #include "lua_api/l_http.h" #include "lua_api/l_mainmenu.h" +#include "lua_api/l_noise.h" #include "lua_api/l_sound.h" #include "lua_api/l_util.h" #include "lua_api/l_settings.h" @@ -82,6 +83,7 @@ void MainMenuScripting::initializeModApi(lua_State *L, int top) /******************************************************************************/ void MainMenuScripting::registerLuaClasses(lua_State *L, int top) { + LuaSecureRandom::Register(L); LuaSettings::Register(L); } diff --git a/textures/base/pack/authors_menu.png b/textures/base/pack/authors_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..deedb3d3bd8bcf96e2c7640e5608a5c63f4e3c76 GIT binary patch literal 349 zcmV-j0iyniP)IGG|NsBH+jCR^0004WQchCR=F{CmJX>`owBUcDC%;10M42QY(>06U&O2QcAH zOoB8GvT&fhXTJbsVLfkpLg>-yI@Qy%64vQv?72002ovPDHLkV1kjM Bl`jAQ literal 0 HcmV?d00001 diff --git a/textures/base/pack/bg_common.png b/textures/base/pack/bg_common.png index 6384c06cc3216d01bbaed6707b4dbbd41f69384e..62f593a48382d2273648abbb29e0f9c746e087ff 100644 GIT binary patch literal 746 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911MRQ8&P5Fq6m;1l8sq=Ot}L*ZOAv+h2FHYmKVcWj?bHvHrhrR@yhY2BUxF*S5v?F)TRqewVT%GMeH^{ zHTvW5G3@$YVFr!QyVv>fD=xjd*JNRv;<2y4x&k;Dru>|}ao_w`U)*1R)n;rks^9IK z`F;QKKP!RC*)M#b?dxUQqtEjD?^h0n7=8u&Kd1hLxc>h8mV=?Ebwk9GkZ0E~J}j_d z(qQ;|BWo&SkSk*agN~Tunj(f(tR5@Rum>nR{NrX}P*7zsWnRJp^dbYpD;5sLP$4iA z8+Fc zu!2{ig`J_{*R%ah3>GqN3-uZd%B(~g7=G9KG8pb-W_Ynng4I~l{0EmY8tj%m_=Pj6=FEQi0}>6(Dg~Y_v;0$AXUV{Dp5^z(!--j&Pk)K& zdHwa{4=Z^G#T`mA>UUpGIlliqdjLmW@Y_G9wLUZciEDW;&Hq4tM_1R9Lrat!L5}ov L^>bP0l+XkKzMSmF literal 162 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0L3?#3!&-4XSJOMr-uDsl0NA7&;-+9j~tVYsn zdMZ#n(9^{+q=GS7f!UyK5d*spQ{?Ii2fQA!{QKWjc>Vuz#fA%w&I~J<*ReY@9FCIW z=;7+&67Xwn2{w9o$Ki(T*Z&g_#4k8dFY@5PfgY`bhQ<;Gh6VMSRvTAs-w!mL!PC{x JWt~$(695}|H_-q9 diff --git a/textures/base/pack/bg_local.png b/textures/base/pack/bg_local.png deleted file mode 100644 index 2ede21741fc7dda13c3839911d160f9998f50c18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4805 zcmd^Bc~p~E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-cd91>^sZW$eObGA%K4F+0p8z;cM3un{V zk)>>>LLKF4=S(Br^3$;=3GQ$zk>H~O4{6j1%?dNEV3yD7 z+WJmKp`K>mrUXt@!zF;gO3LeB@}kybkQglT3B0wtbpMDU^^B|KT{na?)6JVQUQ3HC zp!xO^d&g@{0MgnE_yzadV*2&#dR>I~GOIlzVuk$=mQMSor|y^)CUaY6^SxB8ymxB8~Hk9m0VmagrEvC**%(W$k;JFc&_;|W=A z7`ngZeyjz1&*OVlK+KrRpQ*p^b{}>PTvt5Ni(qfm=*3s)NB8+15j-=cbAFIiv=KXcokv*{e>iFq#%BUQ)W)@?$s7-thJ)FvDgbQ$;)cq zxubESp!`<`6N4Mu9`_IJCCR8$*C=8MdS6>j7<`i+^Pt`6n*o|uc~eCHopm@5JIP-R z5Y5WE{klrh{;FTslYL>mc}s)2mu1a4+hv`Lf=g`*zU$-=T}P#~8IPN&HFbW+uEjq2 z&?V{9lCkF01NzRp)wJuzmh4yS%>B&61CxuQ9+CxF2OML+Xbl{QKzG^4PBgjiZPprh zETRo;53;KaqoxX%uowt_ZyEWm7KFQNN)PXTZFthkpk3n7&Gb*(f&;X3D$=ncbP*8|tZp#k zGu(hf`!3c$+xhjS5j9!CI}An}SpMX<2J6eFo1`QtuiU@Z6hN60MB$gZu@)!9;lgd7GfsL|X6vGm$BBBv7c^4|t4>KRhb(Ok# n=p}KoB;|6U^y|!Tzd-t7aeaJl($2z_$k=&{>*mrwQV;zb#S%73 diff --git a/textures/base/pack/bg_online.png b/textures/base/pack/bg_online.png deleted file mode 100644 index 864cc522710f33187307deffdc46d87e7492cee5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2676 zcmeAS@N?(olHy`uVBq!ia0y~y;3!~VVBW*R3>3L}{!BiQQVH-0aRt&|VKqnYd{Qxv z3{IVs*LKXtr|ROxi~s-sZ*FdW@ZdpQT-DzG6*jS}*kY(po_=K{Kn|^yi-+^6S>u zo;*E0{#d3t&^Us?B(;KL>m$7@ECPHE77Py=pi~R903VPCqQJr}%uouj9jk{dmnfNbyu6Bv*Ud^c_uM-1sR4zj2u9!p#aE$QXoFE zFb6wW7OD)c8mBO-ZXAXp2?I?ZAVZP;h12^;E+sish%_{Z`sroRC3u|K1=*$4O7JN8 z9m!B+yND_Vh{>7^4{snR3>@hNNtmbvPxG{il;?=bu{iTPvP(%dl-8j#go66_VdMgs zGKV|Ni88zAVZqQ1uJaE3JobBG>i650?rR@1=s+sLN0)!HeZL&x2~pEf&iG^Vy7w-+#gYLSB3 zoBuD#f07>BkoVz@82g@i>%OlFl2MR(AYbb357g1Z{6cGn45+G^A#)X!@eVuz<;nw3 zIxgquwlZ(9U|0^7t&?ZpAmh}LJj3sPgiL|54_GsZd{ko8#(h~|y#Do{v$MI`6N*4d z4MaX*lDP2o^UM7o^dD7J`kr~ja8KqT*f@*FK&tRoZTOmx1q_-oiJpn8-9D|_#Qft) z705+9stYW*{)AWOm)OoPQt4*q;ajie;MxMD(`6jy==4oXDA;r4{AMnYH3e%n7chtl z@EKT4n{sL4GLWYqv^ay>7|qIl=iMGM#8|fPFSf0j%RRp!0#uo*vbBecCU}PbUEgi* zEygY(6BpW`&B6ZRafMBto~;F_ykGEITORCb2{0+JeB+-7pg?JO#oi98joH9t&HoQD z@zOkHnFF)Z&%X<2-^cgl_-ZboJ*kHn?|rc?FNH-4!?Z7&&uz@BPi@RQKkxJP5&=GN zt-s>e9 z-`YJQWmp@-r_PZt|8=u3R)m3r#ew0DQpSHT50QU6?&dE$!gVLGzgVb7hQU_kN*Z@B dsGW!tG_b}5GdOPf80Q00;_2$=vd$@?2>=&6+@b&g diff --git a/textures/base/pack/btn_play.png b/textures/base/pack/btn_play.png index aa8f828229b65f23f9e09bc902f8a0d2d0a22a14..c59fde69f15c7574b87fa1aca3f9a11ca5c19d37 100644 GIT binary patch literal 1005 zcmV0001TP)t-sb)MR0 zl-5{^(n^5OvBB=d(DJ0V>!Y>nn5^iKrRIpAWmg0St;evvK-{0R}US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ADngVuv->OARPX^c0$D~j6_Xq)=N*aW1sVnt5aT%i5yFzoxEpfZ zIO{0T6eFv->bu<7_~-r2ssu~&&-?usXivolo$9&gg|A+IaBy>bGdsu`A3{E|_;G_6 zJs%#-oR|IpWa{~wKvy0BGWh2KLr0}RrW9z(WDfp$Hhl9AgWSPCkJpd!{I+W#FCA=t z{?@%x2E?=k+5u#_9|8r}frG)qz%bcd$I9-X3knq(o2{TwDfkf529(}o-_*R^&gM`v zJKwxppun`K&;kXfl0`)qh<@DNm!}}%CXdY`Cb^YBW9ISS{QcC;`^b4-U}|FU MboFyt=akR{0QvAEy#N3J diff --git a/textures/base/pack/btn_play_hover.png b/textures/base/pack/btn_play_hover.png new file mode 100644 index 0000000000000000000000000000000000000000..e87bf586203213ac87f771f07f68942fbed90919 GIT binary patch literal 984 zcmV;}11J26P)0001NP)t-sb)MR6 znAcyA)w;;=%hvR-zwNHR?WDHrov`Vas_096#op!kf0*KLi`oDG|BVUX1^EjZTJ){LU%jiTj|k&)x$<8g6uj-=&FYPglE=$5PLqO|KeRh2kXd`W4y zXCUak0009gNklDRW%qmXNQPH&b8aaQw@?21uB#l zi+v%Dr12O?Hi$?x98M;6J-xEoOg9s6^`paMbTj->>H8v@&z(df3q;Kch2iiAsLwJ6 zg|W0)2oi}*5LH#HH5`)XJ}sBAObbbfBojm=k_c2%)`&>7TGcg(kmh9e^LJBy`A+y| z_|5DRk*KP^h&&!e0J;W=LBTK)iIhMfdXb29-9~AYh(wYP^r{F%K#HBm{LRi55sBJu z5b1$Hlpg8r?X}DlznOg^66t|_qT3=(0$mtnezP-3L?S5_(e02X!AL}+GKhM;R75~Z zL4k%&ayZaN|#Nlz4FBN2%nn@EooUVRdg=+TM7NO~ev1QCfyB&8<;QdXj<%a20S z@)MDWL_o@Ta$#~IQ$!>p5sU3I4fG7yo7L<%7F zGKCl45D|$;^x@?LB_u-O#WzVrA`B_a*A}Nc6uGP0l?M5Q%a`A|J@k z!vjt(7W12th(vlM5ZT`3!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Z55NAz;Tnjub>XXDPiL9L#>Rf`<6gIJoxiavP|~vs$ecWN)oLJk{U!t` p8yma)!K+tQvp^!qK>N!M#@%Zci7-kP61+gajamnSrtAhou#e O#o+1c=d#Wzp$Py;d<%g9 literal 0 HcmV?d00001 diff --git a/textures/base/pack/gift_btn_pressed.png b/textures/base/pack/gift_btn_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..240ca4f8d4edca6d5905acf71bdd9f88d4bd3127 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kP61+gajamnSrtAhou#e O#o+1c=d#Wzp$Py;d<%g9 literal 0 HcmV?d00001 diff --git a/textures/base/pack/server_flags_creative.png b/textures/base/pack/server_flags_creative.png index e76455489fe045dd0b59b436acde71a8f88cbf7b..ae6ed66df1f2f2b78d127b56a606ec0a19fc5b40 100644 GIT binary patch delta 182 zcmV;n07?Id0@4AHB!3uCOjJex|NsC0{~@~uQPdc&+5aXz!ZS$L4K#;YY5cis(=6h00DGTPE!Ct=GbNc004tYL_t(|UNwtZ76UN| z!?4YgWR~{+r!AdDUr5i`#kK*Yy=<|n<|Og>TBE+7&pF7~M`aJrTEpWX+7AcLI%-9G z)yM=O9W}c2hr57GNmqy>(d?bv!|1mI)V~!JOXA347_g>m@&UuLJ~;1Z*|{0000#>jeEIvZ3eKwZ^2@_Pi2Ncw-R zv^Bp?YmN2^+2X5r&-zDa&zwdG(4m0>K|o`jfp6_Nf$b|2Sv@hj2R)Oq0d3}8++$FT yf1yGY7BK*UP|QGq9K?*A#EhKB?{H-vS^)rVWf6wFcqhLA00002o^I%bU2`tKVZuog(AjT*tR-IlgUY&QRrPHe^(J TawOn8(0B$-HrWRJc%le4fMm`8Upm7L_<24UyVsREZ6a)^j%1MdNc z<<0*Xd#`!&&pITZRM)Evf+D9JjtwF_Bq7J?CM(gMo% zsA*BS4}1dup}}KWaBsVmnv`@V6hN~qfZ^G6srPv#IL;G?29IgMsS%>+*z*FB|9*ci Temsc)0000XP5bOY*-H5kic@&TbS0;Xq#(Ki49 N002ovPDHLkV1nU|NpAoE delta 174 zcmV;f08#(D0m=c8B!3=IOjJbx006OW2luNr`MO%!+1azRv*zaJ`pbjO&CT-i@-iF2 z761SM0d!JMQvg8b*k%9#09r{zK~xwS1;K#d#85*16@BCf>IlEP#=_C9%x4yr)wr||D#9%0004WQchCt(I(?A{6NKG$0AY=Rhj&IRyg6Xq<_9hAo;qyX*#sAi{ZKt!nS z@0MeuWbfy@kIO8=O!o6;_SkTJ zh5g=;*PyVE5d_NF^0K>5HX+i6y&Q#XXfbnx1MCfRSryj&fy_0{0M5T7G9$L2M}wzA kfxw%U$C(asJpKp#0}%oP=iC2NIsgCw07*qoM6N<$f*ns}ZU6uP diff --git a/textures/base/pack/settings_menu.png b/textures/base/pack/settings_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..f5b3e0a6d87c8a5a61c4e739f8d8bffb90853f79 GIT binary patch literal 330 zcmV-Q0k!^#P)o#S|ag)(*g~+JE9PzbP`1znEOhJvF;#Nx068MlQWZNOeSx%9#cNPR0~7%$;uX*>09FIY zPtgOn0Avd!V)Y6TuRx?zbTt7YME4Tg03muHnm}|%D4XCUtRLM12ngMX4!DUebpeDJ zfoK5+$d~{`A|@dEpo%X+6(4~rz5!MAfjs~SX9S`TGNb`OXq_SO03hgXfH1ue5ITq8 jKOmr^0?CVmEr!jwttx7ho9wcir$r~=re1* zA_{MV00001bW%=J06^y0W&i*Jq)9|URCodH*oTs;KoEstbIv-L^ZUQ!oi-gDIHuv2 z!`go(wwt1gZ_Nd%SS*#ww#v^}ttLSf1yK-r!gRZXL9I6Yu+eCkyT;@6`DEgPD2TkAcDvx{ z{9p?52&7V}*SlSR3}eVFCn?AS5Su?o6dB{rrqjHUBtaBpHmlWKkayo`<<_G}NH7zk zsck+V2AzU9r95TMAQ->fe7;zmK|mrLXOQI*B%z~x0b~$sNaIVs&K?9DZ-Ye9atV@q zjwoUvgFrx}FhB;Og4pgkR&RDCIit87@iXnc;7E>B;~TQ}=$_jRru#;Xxu8 z;Gp*s0*DkK$l#j0p=&zI3dD~CB!a>@2*?0A8@lF`l^016AcJ^!8@}d)K?Wc;9}tij zBP4>6el00NTbtt1Br;Um807tKEiN(Z59dIf)wcH18W z93aUTNV}Z|q9Co7KL|J$rw9oF;b-wRzd~L?2JX8I!icZ=75*d0di^?wFq}Dz!7)hK zw_O|{jQE;gA#WhD=nQ}GHNQeuAW4$mYQB(MxM7 zTM!#Sq|Z6dAK2q0n~hAu3>*sb7-YL`+kAdx-fZO7g~Od0BeReLhk`r@+3h|j!L6TX z#^i}ZK{&{E3y^c4kl@z&EL@DoAPTbIw^|_itofYGf)5;rgMy@i?Dql!l3xoP3c^9Q z+bhZcVA<`$rZ{sbNIFQlEF_Z&NZkJ7(*uD+s#X=m1u57k&E%4%AZZ}-q&XfHLqQ0L skl2o=GzCcm5fbg3f~12e3jxvo0reV~gxH?2zW@LL07*qoM6N<$f}^vPC;$Ke literal 0 HcmV?d00001 diff --git a/textures/base/pack/world_delete_hover.png b/textures/base/pack/world_delete_hover.png new file mode 100644 index 0000000000000000000000000000000000000000..7e1ea818c235ff9c45b6797b202e1011ac8d4883 GIT binary patch literal 861 zcmV-j1ETziP)z%Oama6F9<@lqu>R)e!|NsAyrsj~P z=8>l7Z;RQ|Bqa1BBll-#VUX3aCMNrmlKFUejH2cKzrT*8<&~=Ff0*K;wChWJ#VIn3 zXaE2J0d!JMQvg8b*k%9#0-{MoK~#7F?bwBO<1i3~;f9$bhw=R%ay6mrsJa2mdm=aU zFVvm!34DdXk5np^%N1Mo>#Nm%gDA)uqh4>=>ZzKSTCM9*`w!N+)wTTwQIJxpQfW4O zr-TG7fI)fE^!xA4!?!Gu3!XZ~$D_hEnfT|^sSBbY^6RwM14s7@ zdjz5&)oP>B>xE+&LuLi(0f>Uw!a0(}7vqJxPQFGa;JU z7K>5TDTtHjN9GKI@w+V+%jFpaB*Jk9S*<`4JIV(@hN(t0y5#HpLBR1oNRq5pAi3vA z5(YAi1VoAhWEd-m?Ve-(W>=Ckip!Bcb2uF0NRGW>L)W==Px2`cDPE9f6CmISAQ233 z(EAbth!i2n@S3}!YdXpiB!B}Xg2Fin$PhUjy5^I05J?mu!*q8WzUG5r4j{G=5Re!n zB!c1NARx~Da?j#xeoDbXFe4yj%}$8`1SG3lJ`M)LM|{mMwD=&%4?@@c5`sZG9e{*$ zfTUO;osNR|K-%qa5O6F{5fTEz&*E!-2}K1Nx{oplBffS&Mgjs3VK{RbgJY1eSGzbs z81Xf~grb3@qBDHL*ZdOl0s%=j4oNuVNjyFW34M~yksh!4C1m3GI0&6$^wL_&7sLh- zDLcpc345Akvyn-hfkQzagKW1QTgaQtn~mIc;c#ch$Smf-p&-vecDw8(=ev%XF-79w zAPTbG0_0p465Mq%iyGrGh=T0*?KViVwOEi@^nv4W@PR1EelH*(`L@8pK@?=Wy^{P7 zmfbFHiZh2FL_sPQA(>7=;`SGRJPyV}9h@a&%YrVeB`EH8dTzu4mn&T)`ltgI5h@jf0*JiRjrF-I0yg$ z00eYWPE-H?{{TQLsq_E<0!B$hK~#7F?bwH!8X**hVSDciX6(8Do6ON)!eN6<*v7D& z&))TYoB}N*wcDLe_nBz;Pqdec!XiH?k;=$aJ8uIp5}i%@bDDnFF}g|Go-ORb$=qNubes7WX&1C&S-pzNtF z>lbBj?e{?x#Zl6;q(=b^M^TK*YT4`gpj6dc7ETgEF)C~^GL?&BRP0h@D;PyH18zYT zjG|o>jdDjh9IDFC0+Oma90Djt<*h&xl;N-eD2So(oE1-YC~FpIXpvzBP>`UwDCh^G zY&IMPy%WXrBtcQW`2~gZbSUvG2PcDaV8x)Qe^FRpOVUUb?Gf;sBtk(tGLE8oH7EfB zT>bL@NrO=w75_>&9ST_DI~=OYpv-d$B-HUJDD@~GWdREMYLwmX`#Pb00000NkvXXu0mjfW{Om< literal 0 HcmV?d00001 diff --git a/textures/base/pack/world_new_hover.png b/textures/base/pack/world_new_hover.png new file mode 100644 index 0000000000000000000000000000000000000000..1cf5686cd35d5c8eb228733981af41b517d8ddb8 GIT binary patch literal 768 zcmV+b1ONPqP)Z;RQHrshFtp;~&%maFJ$xJiB1 zSC!p%kfrAT|No4l<*ntFmE3mD^}JDtIZJA|maFNawCg%ml{iy;j-=&DX}3H~ZVUhb z00eYWPE-H?{{TQLsq_E<0!2wgK~#7F?bZbv8Zi)tVcZ=OTzdaYc0$9WYX^gCN&<8DSrHhiOU@t<+q5uLw7DFkb z001b~7dy)7bUex|p5%Buoj#&KA z&4!`)>Y@k>DT;Yt2-m%)DU>=aCq!i^Ctd{<^E(Rb-;xB0Vg&)&q%jn*ln*EZL@|m) z;0OQtb`l~A2#|abZUhA^HF6hn8Ol7CKti3*#VCsMCoDkmg^aS>2_!X86s0~4F8M=7 z5kP=K6{9E$SnB0aHqTC{5uz>^3>VM9)Z%%?3ls&C>-Ba!pYQiV6h)!_3uaibI^AH}iwfaCgF1|*Ouii|Q#u;s6QJaZsG>2?)GQFt82fp`){ y`Ghh~xWy}gI1)vXQT(6=l42A^Q4U4EZD882pp0GS#tF$)r&6j;<+tyD>3s4ZP$^?ckY6x^!?PP{K+b7T7srr_xVIM^ z1)U59niF-_v~JxXmc_^&v4U0Sij!_aqHACq$AYuxZ1_(8{m-|vc6#RQ(=J}jC+;r3 zYoEPeSH^{NL(!3qn_aIkypVon+sJ-F*oClDahRK-coF}0 zCItxvt%j@I9j6%?`*%of$Z}|4U}R$95Kvf9?C?Jr&U0vJc>eW3!mmIEAHE7vhPl5A zJ{?%g|LQPPf|JE7b$$nhDj@}yFFFi~g0qiBSXRj~Y_xo0^MTFp%KYm)jO#^#-eT}{ L^>bP0l+XkKfs=Bd literal 0 HcmV?d00001