From 3d33abf1cdf86658eb0a919d44ce6e843b6d079c Mon Sep 17 00:00:00 2001 From: Maksym H Date: Sun, 13 Nov 2022 17:44:48 +0100 Subject: [PATCH] Yet another MainMenu improvements PR (#101) * Yet another improvements instead of a complete redo Co-authored-by: luk3yx --- builtin/fstk/buttonbar.lua | 16 +-- builtin/fstk/dialog.lua | 7 +- builtin/fstk/tabview.lua | 34 ++--- builtin/fstk/ui.lua | 35 ++--- builtin/mainmenu/common.lua | 33 +++++ builtin/mainmenu/dlg_config_world.lua | 60 +++++---- builtin/mainmenu/dlg_contentstore.lua | 127 +++++++++--------- builtin/mainmenu/dlg_create_world.lua | 14 +- builtin/mainmenu/dlg_create_world_default.lua | 24 ++-- builtin/mainmenu/dlg_delete_content.lua | 28 ++-- builtin/mainmenu/dlg_delete_world.lua | 51 +++++-- builtin/mainmenu/dlg_outdated_server.lua | 17 +-- builtin/mainmenu/dlg_rename_modpack.lua | 8 +- builtin/mainmenu/dlg_settings_advanced.lua | 23 +++- builtin/mainmenu/dlg_version_info.lua | 15 ++- builtin/mainmenu/init.lua | 1 + builtin/mainmenu/serverlistmgr.lua | 19 +-- builtin/mainmenu/tab_content.lua | 20 +-- builtin/mainmenu/tab_credits.lua | 18 +-- builtin/mainmenu/tab_local.lua | 69 ++++++---- builtin/mainmenu/tab_local_default.lua | 40 +++--- builtin/mainmenu/tab_online.lua | 51 ++++--- builtin/mainmenu/tab_settings.lua | 2 + builtin/mainmenu/tab_settings_simple.lua | 36 +++-- src/client/game.cpp | 18 ++- src/client/renderingengine.cpp | 12 ++ src/client/renderingengine.h | 1 + src/content/subgames.cpp | 6 +- src/content/subgames.h | 6 +- src/gui/StyleSpec.h | 13 +- src/gui/guiFormSpecMenu.cpp | 3 + src/script/lua_api/l_mainmenu.cpp | 4 + textures/base/pack/attention.png | Bin 259 -> 235 bytes textures/base/pack/btn_play_icon.png | Bin 0 -> 215 bytes textures/base/pack/cdb_downloading.png | Bin 196 -> 200 bytes textures/base/pack/end_icon.png | Bin 690 -> 212 bytes textures/base/pack/field_bg.png | Bin 0 -> 170 bytes textures/base/pack/gui/gui_button.png | Bin 0 -> 439 bytes textures/base/pack/gui/gui_button.x2.png | Bin 0 -> 477 bytes textures/base/pack/gui/gui_button_gray.png | Bin 0 -> 439 bytes textures/base/pack/gui/gui_button_gray.x2.png | Bin 0 -> 477 bytes textures/base/pack/gui/gui_button_green.png | Bin 0 -> 435 bytes .../base/pack/gui/gui_button_green.x2.png | Bin 0 -> 472 bytes .../pack/gui/gui_button_green_hovered.png | Bin 0 -> 430 bytes .../pack/gui/gui_button_green_hovered.x2.png | Bin 0 -> 465 bytes .../pack/gui/gui_button_green_pressed.png | Bin 0 -> 435 bytes .../pack/gui/gui_button_green_pressed.x2.png | Bin 0 -> 472 bytes textures/base/pack/gui/gui_button_hovered.png | Bin 0 -> 435 bytes .../base/pack/gui/gui_button_hovered.x2.png | Bin 0 -> 477 bytes textures/base/pack/gui/gui_button_pressed.png | Bin 0 -> 439 bytes .../base/pack/gui/gui_button_pressed.x2.png | Bin 0 -> 477 bytes textures/base/pack/gui/gui_button_red.png | Bin 0 -> 425 bytes textures/base/pack/gui/gui_button_red.x2.png | Bin 0 -> 463 bytes .../base/pack/gui/gui_button_red_hovered.png | Bin 0 -> 427 bytes .../pack/gui/gui_button_red_hovered.x2.png | Bin 0 -> 463 bytes .../base/pack/gui/gui_button_red_pressed.png | Bin 0 -> 427 bytes .../pack/gui/gui_button_red_pressed.x2.png | Bin 0 -> 463 bytes textures/base/pack/gui/gui_button_yellow.png | Bin 0 -> 427 bytes .../base/pack/gui/gui_button_yellow.x2.png | Bin 0 -> 463 bytes .../pack/gui/gui_button_yellow_hovered.png | Bin 0 -> 427 bytes .../pack/gui/gui_button_yellow_hovered.x2.png | Bin 0 -> 463 bytes .../pack/gui/gui_button_yellow_pressed.png | Bin 0 -> 427 bytes .../pack/gui/gui_button_yellow_pressed.x2.png | Bin 0 -> 463 bytes textures/base/pack/gui_button.png | Bin 443 -> 0 bytes textures/base/pack/gui_button_hovered.png | Bin 443 -> 0 bytes textures/base/pack/gui_button_pressed.png | Bin 443 -> 0 bytes textures/base/pack/next_icon.png | Bin 517 -> 180 bytes textures/base/pack/prev_icon.png | Bin 517 -> 182 bytes textures/base/pack/refresh.png | Bin 279 -> 1864 bytes textures/base/pack/search.png | Bin 273 -> 1271 bytes textures/base/pack/server_flags_mc.png | Bin 187 -> 178 bytes textures/base/pack/side_menu_divider.png | Bin 570 -> 73 bytes textures/base/pack/side_menu_left.png | Bin 5681 -> 194 bytes textures/base/pack/start_icon.png | Bin 660 -> 214 bytes textures/base/pack/trash.png | Bin 329 -> 295 bytes textures/base/pack/trash_hover.png | Bin 329 -> 0 bytes textures/base/pack/trash_pressed.png | Bin 0 -> 295 bytes 77 files changed, 495 insertions(+), 316 deletions(-) create mode 100644 textures/base/pack/btn_play_icon.png create mode 100644 textures/base/pack/field_bg.png create mode 100644 textures/base/pack/gui/gui_button.png create mode 100644 textures/base/pack/gui/gui_button.x2.png create mode 100644 textures/base/pack/gui/gui_button_gray.png create mode 100644 textures/base/pack/gui/gui_button_gray.x2.png create mode 100644 textures/base/pack/gui/gui_button_green.png create mode 100644 textures/base/pack/gui/gui_button_green.x2.png create mode 100644 textures/base/pack/gui/gui_button_green_hovered.png create mode 100644 textures/base/pack/gui/gui_button_green_hovered.x2.png create mode 100644 textures/base/pack/gui/gui_button_green_pressed.png create mode 100644 textures/base/pack/gui/gui_button_green_pressed.x2.png create mode 100644 textures/base/pack/gui/gui_button_hovered.png create mode 100644 textures/base/pack/gui/gui_button_hovered.x2.png create mode 100644 textures/base/pack/gui/gui_button_pressed.png create mode 100644 textures/base/pack/gui/gui_button_pressed.x2.png create mode 100644 textures/base/pack/gui/gui_button_red.png create mode 100644 textures/base/pack/gui/gui_button_red.x2.png create mode 100644 textures/base/pack/gui/gui_button_red_hovered.png create mode 100644 textures/base/pack/gui/gui_button_red_hovered.x2.png create mode 100644 textures/base/pack/gui/gui_button_red_pressed.png create mode 100644 textures/base/pack/gui/gui_button_red_pressed.x2.png create mode 100644 textures/base/pack/gui/gui_button_yellow.png create mode 100644 textures/base/pack/gui/gui_button_yellow.x2.png create mode 100644 textures/base/pack/gui/gui_button_yellow_hovered.png create mode 100644 textures/base/pack/gui/gui_button_yellow_hovered.x2.png create mode 100644 textures/base/pack/gui/gui_button_yellow_pressed.png create mode 100644 textures/base/pack/gui/gui_button_yellow_pressed.x2.png delete mode 100644 textures/base/pack/gui_button.png delete mode 100644 textures/base/pack/gui_button_hovered.png delete mode 100644 textures/base/pack/gui_button_pressed.png delete mode 100644 textures/base/pack/trash_hover.png create mode 100644 textures/base/pack/trash_pressed.png diff --git a/builtin/fstk/buttonbar.lua b/builtin/fstk/buttonbar.lua index 25b9a668c..c051d7aa8 100644 --- a/builtin/fstk/buttonbar.lua +++ b/builtin/fstk/buttonbar.lua @@ -16,8 +16,6 @@ --51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -local defaulttexturedir = core.formspec_escape(defaulttexturedir) - local function buttonbar_formspec(self) if self.hidden then @@ -25,7 +23,7 @@ local function buttonbar_formspec(self) end local formspec = string.format("background9[%f,%f;%f,%f;%sside_menu_left.png;false;30]", - self.pos.x, self.pos.y - 0.1, self.size.x + 0.025, self.size.y + 0.35, defaulttexturedir) + self.pos.x, self.pos.y - 0.1, self.size.x + 0.025, self.size.y + 0.35, defaulttexturedir_esc) for i=self.startbutton,#self.buttons,1 do local btn_name = self.buttons[i].name @@ -62,8 +60,8 @@ local function buttonbar_formspec(self) if button.cdb then formspec = formspec .. - "style[" .. btn_name .. ";bgimg=" .. defaulttexturedir .. - "btn_download.png;bgimg_hovered=" .. defaulttexturedir .. "btn_download_hover.png]" .. + "style[" .. btn_name .. ";bgimg=" .. defaulttexturedir_esc .. + "btn_download.png;bgimg_hovered=" .. defaulttexturedir_esc .. "btn_download_hover.png]" .. ("image_button[%f,%f;%f,%f;;%s;%s;true;%s]tooltip[%s;%s]"):format( btn_pos.x, btn_pos.y, self.btn_size, self.btn_size, @@ -120,15 +118,15 @@ local function buttonbar_formspec(self) self.name, text_inc) else formspec = formspec .. - "style[btnbar_dec_" .. self.name .. ";bgimg=" .. defaulttexturedir .. - "btn_up.png;bgimg_hovered=" .. defaulttexturedir .. "btn_up_hover.png]" .. + "style[btnbar_dec_" .. self.name .. ";bgimg=" .. defaulttexturedir_esc .. + "btn_up.png;bgimg_hovered=" .. defaulttexturedir_esc .. "btn_up_hover.png]" .. ("image_button[%f,%f;%f,%f;;btnbar_dec_%s;;true;false]"):format( btn_dec_pos.x, btn_dec_pos.y, btn_size.x, btn_size.y, self.name) formspec = formspec .. - "style[btnbar_inc_" .. self.name .. ";bgimg=" .. defaulttexturedir .. - "btn_down.png;bgimg_hovered=" .. defaulttexturedir .. "btn_down_hover.png]" .. + "style[btnbar_inc_" .. self.name .. ";bgimg=" .. defaulttexturedir_esc .. + "btn_down.png;bgimg_hovered=" .. defaulttexturedir_esc .. "btn_down_hover.png]" .. ("image_button[%f,%f;%f,%f;;btnbar_inc_%s;;true;false]"):format( btn_inc_pos.x, btn_inc_pos.y, btn_size.x, btn_size.y, self.name) diff --git a/builtin/fstk/dialog.lua b/builtin/fstk/dialog.lua index feee1d46f..0712f486c 100644 --- a/builtin/fstk/dialog.lua +++ b/builtin/fstk/dialog.lua @@ -50,7 +50,7 @@ local dialog_metatable = { } dialog_metatable.__index = dialog_metatable -local bg = core.formspec_escape(defaulttexturedir .. "bg_common.png") +local bg = defaulttexturedir_esc .. "bg_common.png" function dialog_create(name, get_formspec, buttonhandler, eventhandler, add_background) local self = {} @@ -62,7 +62,7 @@ function dialog_create(name, get_formspec, buttonhandler, eventhandler, add_back if add_background then function self.formspec(data) return ([[ - size[12,5.4,false] + size[12,5.4] bgcolor[#0000] background9[0,0;0,0;%s;true;40] %s @@ -87,8 +87,9 @@ function messagebox(name, message) return ([[ set_focus[ok;true] textarea[1,1;10,4;;;%s] + %s button[5,4.5;2,0.8;ok;%s] - ]]):format(message, fgettext("OK")) + ]]):format(message, btn_style("ok"), fgettext("OK")) end, function(this, fields) if fields.ok then diff --git a/builtin/fstk/tabview.lua b/builtin/fstk/tabview.lua index d4fcd708b..8c54ea93f 100644 --- a/builtin/fstk/tabview.lua +++ b/builtin/fstk/tabview.lua @@ -26,8 +26,6 @@ -- element.getFormspec() returns formspec of tabview -- -------------------------------------------------------------------------------- -local defaulttexturedir = core.formspec_escape(defaulttexturedir) - -------------------------------------------------------------------------------- local function add_tab(self,tab) assert(tab.size == nil or (type(tab.size) == table and @@ -72,12 +70,12 @@ end -------------------------------------------------------------------------------- local function make_side_pane_tab(y, tab_name, tooltip, selected) local formspec = "style[" .. tab_name .. "_tab;bgimg=" .. - defaulttexturedir .. tab_name + defaulttexturedir_esc .. tab_name if selected then formspec = formspec .. "_menu_selected.png]" else formspec = formspec .. "_menu.png;bgimg_hovered=" .. - defaulttexturedir .. tab_name .. "_menu_hover.png]" + defaulttexturedir_esc .. tab_name .. "_menu_hover.png]" end return formspec .. @@ -98,14 +96,15 @@ local function get_formspec(self) string.format("size[%f,%f,%s]",tsize.width + 2,tsize.height + 1, dump(self.fixed_size)) .. "bgcolor[#0000]" .. + "listcolors[#000;#000;#000;#dff6f5;#302c2e]" .. "container[1,1]" .. "background9[-0.2,-1.26;" .. tsize.width + 0.4 .. "," .. - tsize.height + 1.75 .. ";" .. defaulttexturedir .. + tsize.height + 1.75 .. ";" .. defaulttexturedir_esc .. "bg_common.png;false;40]" .. - "background9[12.13,1.05;0.9,2.6;" .. defaulttexturedir .. "side_menu.png;false;30]" .. + "background9[12.13,1.05;0.9,2.6;" .. defaulttexturedir_esc .. "side_menu.png;false;30]" .. make_side_pane_tab(0.9, "settings", fgettext("Settings"), name == "settings") .. - "image[12.15,2.26;0.9,0.06;" .. defaulttexturedir .. "side_menu_divider.png]" .. + "image[12.15,2.26;0.9,0.06;" .. defaulttexturedir_esc .. "side_menu_divider.png]" .. make_side_pane_tab(2.3, "authors", fgettext("Credits"), name == "credits") end @@ -207,27 +206,28 @@ end]] -------------------------------------------------------------------------------- local function button_header(self) local visible_tabs = {} - local btn_widths = {} - local total_width = 0 +-- local btn_widths = {} +-- local total_width = 0 for i, tab in ipairs(self.tablist) do if not tab.hidden and tab.caption ~= "" then visible_tabs[#visible_tabs + 1] = tab - local w = utf8.len(core.get_translated_string(tab.caption)) - btn_widths[#visible_tabs] = w - total_width = total_width + w + -- local w = math.max(utf8.len(core.get_translated_string(tab.caption)), 10) + -- btn_widths[#visible_tabs] = w + -- total_width = total_width + w end end local toadd = "" - local coords_per_char = 12 / total_width +-- local coords_per_char = 12 / total_width -- The formspec is 15.4875 "real" coordinates wide -- local x = (12.39 - total_width) / 2 - 0.3 local x = -0.1 + local w = 12 / #visible_tabs for i = 1, #visible_tabs do local caption = visible_tabs[i].caption - local w = btn_widths[i] * coords_per_char + -- local w = btn_widths[i] * coords_per_char local texture = "upper_buttons_middle" if i == 1 then texture = "upper_buttons_left" @@ -236,13 +236,13 @@ local function button_header(self) end local btn_name = self.name .. "_" .. i toadd = toadd .. - "style[" .. btn_name .. ";padding=-10;bgimg=" .. defaulttexturedir .. + "style[" .. btn_name .. ";padding=-10;bgimg=" .. defaulttexturedir_esc .. texture if i == math.abs(self.last_tab_index) then toadd = toadd .. "_selected.png;" else - toadd = toadd .. ".png;bgimg_hovered=" .. defaulttexturedir .. + toadd = toadd .. ".png;bgimg_hovered=" .. defaulttexturedir_esc .. texture .. "_hover.png;" end @@ -293,7 +293,7 @@ local function handle_tab_buttons(self,fields) for field in pairs(fields) do if field:sub(1, name_prefix_len) == name_prefix then local index = tonumber(field:sub(name_prefix_len + 1)) - if self.last_tab_index == index then return false end + if math.abs(self.last_tab_index) == index then return false end switch_to_tab(self, index) return true end diff --git a/builtin/fstk/ui.lua b/builtin/fstk/ui.lua index f8cc8d03f..5c0b024dc 100644 --- a/builtin/fstk/ui.lua +++ b/builtin/fstk/ui.lua @@ -71,14 +71,16 @@ function ui.update() "formspec_version[3]", "size[14,8.25]", "bgcolor[#0000]", - "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;40]", + "background9[0,0;0,0;", defaulttexturedir_esc, "bg_common.png;true;40]", "set_focus[btn_reconnect_yes;true]", - "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), - "button[2,6.6;4,1;btn_reconnect_yes;" .. fgettext("Reconnect") .. "]", - "button[8,6.6;4,1;btn_reconnect_no;" .. fgettext("Main menu") .. "]" + "textarea[0.6,0.5;12.8,0.6;;;", fgettext("The server has requested a reconnect:"), "]", + "background9[0.4,1.1;13.2,5.2;", defaulttexturedir_esc, + "worldlist_bg.png;false;40]", + "textarea[0.6,1.3;12.8,4.8;;;", error_message, "]", + btn_style("btn_reconnect_yes") .. + "button[2,6.725;4,1;btn_reconnect_yes;" .. fgettext("Reconnect") .. "]", + btn_style("btn_reconnect_no") .. + "button[8,6.725;4,1;btn_reconnect_no;" .. fgettext("Main menu") .. "]" } ui.overridden = true elseif gamedata ~= nil and gamedata.errormessage ~= nil then @@ -95,23 +97,26 @@ function ui.update() if (maintab == "local" or maintab == "local_default") and mod_error and core.get_us_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("Main menu") .. "]" .. + btn_style("btn_reconnect_yes") .. + "button[2,6.725;4,1;btn_reconnect_yes;" .. fgettext("Restart") .. "]" .. + btn_style("btn_reconnect_no") .. + "button[8,6.725;4,1;btn_reconnect_no;" .. fgettext("Main menu") .. "]" .. "set_focus[btn_reconnect_yes;true]" else restart_btn = - "button[5,6.6;4,1;btn_reconnect_no;" .. fgettext("OK") .. "]" .. + btn_style("btn_reconnect_no") .. + "button[5,6.725;4,1;btn_reconnect_no;" .. fgettext("OK") .. "]" .. "set_focus[btn_reconnect_no;true]" end formspec = { "formspec_version[3]", "size[14,8.25]", "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), + "background9[0,0;0,0;", defaulttexturedir_esc, "bg_common.png;true;40]", + "textarea[0.6,0.5;12.8,0.6;;;", error_title, "]", + "background9[0.4,1.1;13.2,5.2;", defaulttexturedir_esc, + "worldlist_bg.png;false;40]", + "textarea[0.6,1.3;12.8,4.8;;;", error_message, "]", restart_btn } ui.overridden = true diff --git a/builtin/mainmenu/common.lua b/builtin/mainmenu/common.lua index c08bccc66..4bea5fdec 100644 --- a/builtin/mainmenu/common.lua +++ b/builtin/mainmenu/common.lua @@ -300,3 +300,36 @@ function get_language_list() return languages, language_dropdown, lang_idx, language_name_list end +-------------------------------------------------------------------------------- +local device_is_tablet = core.settings:get_bool("device_is_tablet", false) +local screen_density = core.get_screen_info().density +function is_high_dpi() + if PLATFORM == "OSX" then + return tonumber(core.settings:get("screen_dpi")) / 72 >= 2 + elseif PLATFORM == "iOS" and device_is_tablet then + return screen_density >= 2 + else + return screen_density >= 3 + end +end +-------------------------------------------------------------------------------- +function btn_style(field, color) + local button_path = defaulttexturedir_esc .. "gui" .. DIR_DELIM + local btn_size = is_high_dpi() and ".x2" or "" + color = (color and "_" .. color) or "" + + local retval = + "style[" .. field .. ";border=false]" .. + "style[" .. field .. ";bgimg=" .. button_path .. "gui_button" .. color .. btn_size .. + ".png;bgimg_middle=" .. (is_high_dpi() and 48 or 32) .. ";padding=" .. (is_high_dpi() and -30 or -20) .. "]" + + if color ~= "_gray" then + retval = retval .. + "style[" .. field .. ":hovered;bgimg=" .. button_path .. "gui_button" .. color .. "_hovered" .. btn_size .. + ".png]" .. + "style[" .. field .. ":pressed;bgimg=" .. button_path .. "gui_button" .. color .. "_pressed" .. btn_size .. + ".png]" + end + + return retval +end diff --git a/builtin/mainmenu/dlg_config_world.lua b/builtin/mainmenu/dlg_config_world.lua index 9596cf8d4..388a6ef08 100644 --- a/builtin/mainmenu/dlg_config_world.lua +++ b/builtin/mainmenu/dlg_config_world.lua @@ -69,12 +69,11 @@ local function get_formspec(data) local mod = data.list:get_list()[data.selected_mod] or {name = ""} local retval = - "size[11.5,7.5,false]" .. + "size[11.5,7.5]" .. "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 .. "]" + "background9[0,0;0,0;" .. defaulttexturedir_esc .. "bg_common.png;true;40]" .. + "background9[0.05,0.05;5.3,6.8;" .. defaulttexturedir_esc .. "desc_bg.png;false;32]" .. + "label[0.1,0;" .. fgettext("World:") .. " " .. data.worldspec.name .. "]" if mod.is_modpack or mod.type == "game" then local info = core.formspec_escape( @@ -87,56 +86,59 @@ local function get_formspec(data) end end retval = retval .. - "textarea[0.25,0.7;5.75,7.2;;" .. info .. ";]" + "textarea[0.4,0.8;5.2,6.8;;" .. + fgettext("Information:") .. ";" .. info .. "]" else local hard_deps, soft_deps = pkgmgr.get_dependencies(mod.path) local hard_deps_str = table.concat(hard_deps, ",") local soft_deps_str = table.concat(soft_deps, ",") retval = retval .. - "label[0,0.7;" .. fgettext("Mod:") .. "]" .. - "label[0.75,0.7;" .. mod.name .. "]" + "label[0.1,0.7;" .. fgettext("Mod:") .. " " .. mod.name .. "]" if hard_deps_str == "" then if soft_deps_str == "" then retval = retval .. - "label[0,1.25;" .. + "label[0.1,1.25;" .. fgettext("No (optional) dependencies") .. "]" else retval = retval .. - "label[0,1.25;" .. fgettext("No hard dependencies") .. + "label[0.1,1.25;" .. fgettext("No hard dependencies") .. "]" .. - "label[0,1.75;" .. fgettext("Optional dependencies:") .. + "label[0.1,1.75;" .. fgettext("Optional dependencies:") .. "]" .. - "textlist[0,2.25;5,4;world_config_optdepends;" .. + "textlist[0.1,2.25;5,4;world_config_optdepends;" .. soft_deps_str .. ";0]" end else if soft_deps_str == "" then retval = retval .. - "label[0,1.25;" .. fgettext("Dependencies:") .. "]" .. - "textlist[0,1.75;5,4;world_config_depends;" .. + "label[0.1,1.25;" .. fgettext("Dependencies:") .. "]" .. + "textlist[0.1,1.75;5,4;world_config_depends;" .. hard_deps_str .. ";0]" .. - "label[0,6;" .. fgettext("No optional dependencies") .. "]" + "label[0.1,6;" .. fgettext("No optional dependencies") .. "]" else retval = retval .. - "label[0,1.25;" .. fgettext("Dependencies:") .. "]" .. - "textlist[0,1.75;5,2.125;world_config_depends;" .. + "label[0.1,1.25;" .. fgettext("Dependencies:") .. "]" .. + "textlist[0.1,1.75;5,2.125;world_config_depends;" .. hard_deps_str .. ";0]" .. - "label[0,3.9;" .. fgettext("Optional dependencies:") .. + "label[0.1,3.9;" .. fgettext("Optional dependencies:") .. "]" .. - "textlist[0,4.375;5,1.8;world_config_optdepends;" .. + "textlist[0.1,4.375;5,1.8;world_config_optdepends;" .. soft_deps_str .. ";0]" end end end retval = retval .. - "button[3.25,7;2.5,0.5;btn_config_world_save;" .. + btn_style("btn_config_world_save") .. + "button[5.5,7.1;3,0.5;btn_config_world_save;" .. fgettext("Save") .. "]" .. - "button[5.75,7;2.5,0.5;btn_config_world_cancel;" .. + btn_style("btn_config_world_cancel") .. + "button[8.5,7.1;3,0.5;btn_config_world_cancel;" .. fgettext("Cancel") .. "]" .. - "button[9,7;2.5,0.5;btn_config_world_cdb;" .. + btn_style("btn_config_world_cdb") .. + "button[-0.05,7.1;3.5,0.5;btn_config_world_cdb;" .. fgettext("Find More Mods") .. "]" if mod.name ~= "" and not mod.is_game_content then @@ -144,26 +146,30 @@ local function get_formspec(data) if pkgmgr.is_modpack_entirely_enabled(data, mod.name) then retval = retval .. - "button[5.5,0.125;3,0.5;btn_mp_disable;" .. + btn_style("btn_mp_disable") .. + "button[5.5,0.025;3,0.5;btn_mp_disable;" .. fgettext("Disable modpack") .. "]" else retval = retval .. - "button[5.5,0.125;3,0.5;btn_mp_enable;" .. + btn_style("btn_mp_enable") .. + "button[5.5,0.025;3,0.5;btn_mp_enable;" .. fgettext("Enable modpack") .. "]" end else retval = retval .. - "checkbox[5.5,-0.125;cb_mod_enable;" .. fgettext("enabled") .. + "checkbox[5.5,-0.125;cb_mod_enable;" .. fgettext("Enabled") .. ";" .. tostring(mod.enabled) .. "]" end end if enabled_all then retval = retval .. - "button[8.95,0.125;2.5,0.5;btn_disable_all_mods;" .. + btn_style("btn_disable_all_mods") .. + "button[8.95,0.025;2.5,0.5;btn_disable_all_mods;" .. fgettext("Disable all") .. "]" else retval = retval .. - "button[8.95,0.125;2.5,0.5;btn_enable_all_mods;" .. + btn_style("btn_enable_all_mods") .. + "button[8.95,0.025;2.5,0.5;btn_enable_all_mods;" .. fgettext("Enable all") .. "]" end return retval .. diff --git a/builtin/mainmenu/dlg_contentstore.lua b/builtin/mainmenu/dlg_contentstore.lua index caf66cdd8..1c40a8506 100644 --- a/builtin/mainmenu/dlg_contentstore.lua +++ b/builtin/mainmenu/dlg_contentstore.lua @@ -15,6 +15,8 @@ --with this program; if not, write to the Free Software Foundation, Inc., --51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +local esc = core.formspec_escape + if not core.get_http_api then function create_store_dlg() return messagebox("store", @@ -104,9 +106,6 @@ local function start_install(package) elseif package.type == "game" then conf_path = path .. DIR_DELIM .. "game.conf" name_is_title = true - - ui.childlist = {} - menudata.init_tabs() elseif package.type == "txp" then conf_path = path .. DIR_DELIM .. "texture_pack.conf" end @@ -325,7 +324,7 @@ function install_dialog.get_formspec() selected_game_idx = i end - games[i] = core.formspec_escape(games[i].name) + games[i] = esc(games[i].name) end local selected_game = pkgmgr.games[selected_game_idx] @@ -336,7 +335,7 @@ function install_dialog.get_formspec() local formatted_deps = {} for _, dep in pairs(install_dialog.dependencies) do formatted_deps[#formatted_deps + 1] = "#fff" - formatted_deps[#formatted_deps + 1] = core.formspec_escape(dep.name) + formatted_deps[#formatted_deps + 1] = esc(dep.name) if dep.installed then formatted_deps[#formatted_deps + 1] = "#ccf" formatted_deps[#formatted_deps + 1] = fgettext("Already installed") @@ -368,8 +367,9 @@ function install_dialog.get_formspec() local formspec = { "formspec_version[3]", "size[7,7.85]", + "bgcolor[#0000]", + "background9[0,0;0,0;", defaulttexturedir_esc, "bg_common.png", ";true;40]", "style[title;border=false]", - "box[0,0;7,0.5;#3333]", "button[0,0;7,0.5;title;", fgettext("Install $1", package.title) , "]", "container[0.375,0.70]", @@ -388,13 +388,13 @@ function install_dialog.get_formspec() fgettext("Install missing dependencies"), ";", will_install_deps and "true" or "false", "]", - "box[0,5.4;7,1.2;", message_bg, "]", + "box[0.04,5.4;6.94,1.2;", message_bg, "]", "textarea[0.375,5.5;6.25,1;;;", message, "]", - "container[1.375,6.85]", - "button[0,0;2,0.8;install_all;", fgettext("Install"), "]", - "button[2.25,0;2,0.8;cancel;", fgettext("Cancel"), "]", - "container_end[]", + btn_style("install_all"), + "button[0.5,6.85;2.8,0.8;install_all;", fgettext("Install"), "]", + btn_style("cancel"), + "button[3.75,6.85;2.8,0.8;cancel;", fgettext("Cancel"), "]", } return table.concat(formspec, "") @@ -455,11 +455,12 @@ local confirm_overwrite = {} function confirm_overwrite.get_formspec() local package = confirm_overwrite.package - return "size[11.5,4.5,true]" .. + return "size[11.5,4.5]" .. "label[2,2;" .. fgettext("\"$1\" already exists. Would you like to overwrite it?", package.name) .. "]".. - "style[install;bgcolor=red]" .. + btn_style("install", "red") .. "button[3.25,3.5;2.5,0.5;install;" .. fgettext("Overwrite") .. "]" .. + btn_style("cancel") .. "button[5.75,3.5;2.5,0.5;cancel;" .. fgettext("Cancel") .. "]" end @@ -498,9 +499,9 @@ end local function get_screenshot(package) if not package.thumbnail then - return defaulttexturedir .. "no_screenshot.png" + return defaulttexturedir_esc .. "no_screenshot.png" elseif screenshot_downloading[package.thumbnail] then - return defaulttexturedir .. "loading_screenshot.png" + return defaulttexturedir_esc .. "loading_screenshot.png" end -- Get tmp screenshot path @@ -512,12 +513,12 @@ local function get_screenshot(package) local file = io.open(filepath, "r") if file then file:close() - return filepath + return esc(filepath) end -- Show error if we've failed to download before if screenshot_downloaded[package.thumbnail] then - return defaulttexturedir .. "error_screenshot.png" + return defaulttexturedir_esc .. "error_screenshot.png" end -- Download @@ -538,10 +539,10 @@ local function get_screenshot(package) screenshot_downloading[package.thumbnail] = true else core.log("error", "ERROR: async event failed") - return defaulttexturedir .. "error_screenshot.png" + return defaulttexturedir_esc .. "error_screenshot.png" end - return defaulttexturedir .. "loading_screenshot.png" + return defaulttexturedir_esc .. "loading_screenshot.png" end function store.load() @@ -703,40 +704,48 @@ function store.get_formspec(dlgdata) if #store.packages_full > 0 then formspec = { "formspec_version[3]", - "size[15.75,9.5;false]", - "bgcolor[#0000]" .. - "background9[0,0;0,0;", core.formspec_escape(defaulttexturedir .. - "bg_common.png"), ";true;40]", + "size[15.75,9.5]", + "bgcolor[#0000]", + "background9[0,0;0,0;", defaulttexturedir_esc, "bg_common.png;true;40]", "style[status,downloading,queued;border=false]", "container[0.375,0.375]", - "field[0,0;7.225,0.8;search_string;;", core.formspec_escape(search_string), "]", + "image[0,0;7.25,0.8;", defaulttexturedir_esc, "field_bg.png;32]", + "style[search_string;border=false;bgcolor=transparent]", + "field[0.1,0;7.15,0.8;search_string;;", esc(search_string), "]", "field_close_on_enter[search_string;false]", - "image_button[7.3,0;0.8,0.8;", core.formspec_escape(defaulttexturedir .. "search.png"), ";search;;true;false]", - -- "image_button[8.125,0;0.8,0.8;", core.formspec_escape(defaulttexturedir .. "clear.png"), ";clear;;true;false]", - -- "dropdown[9.6,0;2.4,0.8;type;", table.concat(filter_types_titles, ","), ";", filter_type, "]", + "set_focus[search_string;true]", + btn_style("search"), + "image_button[7.4,0;0.8,0.8;", defaulttexturedir_esc, "search.png;search;;true;false]", + -- "image_button[8.125,0;0.8,0.8;", defaulttexturedir_esc, "clear.png;clear;;true;false]", + "dropdown[8.35,0;3.5,0.8;type;", table.concat(filter_types_titles, ","), ";", filter_type, "]", "container_end[]", -- Page nav buttons "container[0,", H - 0.8 - 0.375, "]", - "style[back;padding=-5;bgimg=", core.formspec_escape(defaulttexturedir .. "select_btn.png"), ";bgimg_middle=10]", - "image_button[0.375,0;5,0.8;;back;", "< ", fgettext("Back to Main Menu"), ";true;false]", + btn_style("back"), + "button[0.375,0;5,0.8;back;< ", fgettext("Back to Main Menu"), "]", "container[", W - 0.375 - 0.8*4 - 2, ",0]", - "image_button[0,0;0.8,0.8;", core.formspec_escape(defaulttexturedir), "start_icon.png;pstart;]", - "image_button[0.8,0;0.8,0.8;", core.formspec_escape(defaulttexturedir), "prev_icon.png;pback;]", + btn_style("pstart"), + "image_button[-0.1,0;0.8,0.8;", defaulttexturedir_esc, "start_icon.png;pstart;;true;false]", + btn_style("pback"), + "image_button[0.8,0;0.8,0.8;", defaulttexturedir_esc, "prev_icon.png;pback;;true;false]", "style[pagenum;border=false]", - "button[1.6,0;2,0.8;pagenum;", tonumber(cur_page), " / ", tonumber(dlgdata.pagemax), "]", - "image_button[3.6,0;0.8,0.8;", core.formspec_escape(defaulttexturedir), "next_icon.png;pnext;]", - "image_button[4.4,0;0.8,0.8;", core.formspec_escape(defaulttexturedir), "end_icon.png;pend;]", + "button[1.5,0;2,0.8;pagenum;", tonumber(cur_page), " / ", tonumber(dlgdata.pagemax), "]", + btn_style("pnext"), + "image_button[3.5,0;0.8,0.8;", defaulttexturedir_esc, "next_icon.png;pnext;;true;false]", + btn_style("pend"), + "image_button[4.4,0;0.8,0.8;", defaulttexturedir_esc, "end_icon.png;pend;;true;false]", "container_end[]", "container_end[]", } if number_downloading > 0 then - formspec[#formspec + 1] = "button[12.75,0.375;2.625,0.8;downloading;" + formspec[#formspec + 1] = "style[downloading;content_offset=0]" + formspec[#formspec + 1] = "button[12.4,0.375;3.1,0.8;downloading;" if #download_queue > 0 then formspec[#formspec + 1] = fgettext("$1 downloading,\n$2 queued", number_downloading, #download_queue) else @@ -754,32 +763,33 @@ function store.get_formspec(dlgdata) end if num_avail_updates == 0 then - formspec[#formspec + 1] = "button[12.65,0.375;2.825,0.8;status;" + formspec[#formspec + 1] = "style[status;content_offset=0]" + formspec[#formspec + 1] = "button[12.4,0.375;3.1,0.8;status;" formspec[#formspec + 1] = fgettext("No updates") formspec[#formspec + 1] = "]" else - formspec[#formspec + 1] = "button[12.75,0.375;2.625,0.8;update_all;" + formspec[#formspec + 1] = "style[update_all;content_offset=0]" + formspec[#formspec + 1] = btn_style("update_all") + formspec[#formspec + 1] = "button[12.4,0.375;3.1,0.8;update_all;" formspec[#formspec + 1] = fgettext("Update All [$1]", num_avail_updates) formspec[#formspec + 1] = "]" end end if #store.packages == 0 then - formspec[#formspec + 1] = "label[4,3;" + formspec[#formspec + 1] = "style[msg;content_offset=0]" + formspec[#formspec + 1] = "image_button[1,4.25;13.75,1;;msg;" formspec[#formspec + 1] = fgettext("No results") - formspec[#formspec + 1] = "]" + formspec[#formspec + 1] = ";false;false]" end else formspec = { - "size[12,6.4;false]", - "bgcolor[#0000]" .. - "background9[0,0;0,0;", core.formspec_escape(defaulttexturedir .. - "bg_common.png"), ";true;40]", + "size[12,6.4]", + "bgcolor[#0000]", + "background9[0,0;0,0;", defaulttexturedir_esc, "bg_common.png;true;40]", "label[4,3;", fgettext("No packages could be retrieved"), "]", - "container[0,", H - 0.8 - 0.375 - 2, "]", - "style[back;padding=-5;bgimg=", core.formspec_escape(defaulttexturedir .. "select_btn.png"), ";bgimg_middle=10]", - "image_button[0,0;4,0.8;;back;", "< ", fgettext("Back to Main Menu"), ";true;false]", - "container_end[]", + btn_style("back"), + "button[0-0.11,5.8;5.5,0.9;back;< ", fgettext("Back to Main Menu"), "]", } end @@ -798,29 +808,29 @@ function store.get_formspec(dlgdata) -- image formspec[#formspec + 1] = "image[0,0;1.5,1;" - formspec[#formspec + 1] = core.formspec_escape(get_screenshot(package)) + formspec[#formspec + 1] = get_screenshot(package) formspec[#formspec + 1] = "]" -- title formspec[#formspec + 1] = "label[1.875,0.1;" - formspec[#formspec + 1] = core.formspec_escape( + formspec[#formspec + 1] = esc( core.colorize(mt_color_green, package.title) .. core.colorize("#BFBFBF", " by " .. package.author)) formspec[#formspec + 1] = "]" -- buttons - local left_base = "image_button[-1.55,0;0.7,0.7;" .. core.formspec_escape(defaulttexturedir) + local left_base = "image_button[-1.55,0;0.7,0.7;" .. defaulttexturedir_esc formspec[#formspec + 1] = "container[" formspec[#formspec + 1] = W - 0.375*2 formspec[#formspec + 1] = ",0.1]" if package.downloading then formspec[#formspec + 1] = "animated_image[-1.7,-0.15;1,1;downloading;" - formspec[#formspec + 1] = core.formspec_escape(defaulttexturedir) - formspec[#formspec + 1] = "cdb_downloading.png;3;400;]" + formspec[#formspec + 1] = defaulttexturedir_esc + formspec[#formspec + 1] = "cdb_downloading.png;4;300;]" elseif package.queued then formspec[#formspec + 1] = left_base - formspec[#formspec + 1] = core.formspec_escape(defaulttexturedir) + formspec[#formspec + 1] = defaulttexturedir_esc formspec[#formspec + 1] = "cdb_queued.png;queued]" elseif not package.path then local elem_name = "install_" .. i .. ";" @@ -846,7 +856,7 @@ function store.get_formspec(dlgdata) local web_elem_name = "view_" .. i .. ";" formspec[#formspec + 1] = "image_button[-0.7,0;0.7,0.7;" .. - core.formspec_escape(defaulttexturedir) .. "cdb_viewonline.png;" .. web_elem_name .. "]" + defaulttexturedir_esc .. "cdb_viewonline.png;" .. web_elem_name .. "]" formspec[#formspec + 1] = "tooltip[" .. web_elem_name .. fgettext("View more information in a web browser") .. tooltip_colors formspec[#formspec + 1] = "container_end[]" @@ -857,7 +867,7 @@ function store.get_formspec(dlgdata) formspec[#formspec + 1] = "textarea[1.855,0.3;" formspec[#formspec + 1] = tostring(description_width) formspec[#formspec + 1] = ",0.8;;;" - formspec[#formspec + 1] = core.formspec_escape(package.short_description) + formspec[#formspec + 1] = esc(package.short_description) formspec[#formspec + 1] = "]" formspec[#formspec + 1] = "style_type[textarea;font_size=]" @@ -955,7 +965,7 @@ function store.handle_submit(this, fields) local function on_confirm() local deps = get_raw_dependencies(package) - if deps and has_hard_deps(deps) then + if deps and has_hard_deps(deps) and #pkgmgr.games > 0 then local dlg = install_dialog.create(package, deps) dlg:set_parent(this) this:hide() @@ -1008,11 +1018,6 @@ function create_store_dlg(type) search_string = "" cur_page = 1 - -- ToDo: delete me when MultiCraft ContentDB is ready - if type and type ~= "game" then - type = "game" - end - if type then -- table.indexof does not work on tables that contain `nil` for i, v in pairs(filter_types_type) do diff --git a/builtin/mainmenu/dlg_create_world.lua b/builtin/mainmenu/dlg_create_world.lua index 11c30b8c4..c0c8120a1 100644 --- a/builtin/mainmenu/dlg_create_world.lua +++ b/builtin/mainmenu/dlg_create_world.lua @@ -97,14 +97,14 @@ local function create_world_formspec(dialogdata) -- Error out when no games found if #pkgmgr.games == 0 then - return "size[12.25,3,false]" .. + return "size[12.25,3]" .. "bgcolor[#0000]" .. - "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;40]" .. + "background9[0,0;0,0;" .. defaulttexturedir_esc .. "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" .. fgettext("Download one from minetest.net") .. "]" .. + btn_style("world_create_cancel") .. "button[4.75,2.5;3,0.5;world_create_cancel;" .. fgettext("Cancel") .. "]" end @@ -334,10 +334,9 @@ local function create_world_formspec(dialogdata) end local retval = - "size[12.25,7,false]" .. + "size[12.25,7]" .. "bgcolor[#0000]" .. - "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;40]" .. + "background9[0,0;0,0;" .. defaulttexturedir_esc .. "bg_common.png;true;40]" .. -- Left side "container[0,0]".. @@ -367,8 +366,9 @@ local function create_world_formspec(dialogdata) "container_end[]".. -- Menu buttons - "style[world_create_confirm;bgcolor=#00d12b]" .. + btn_style("world_create_confirm", "green") .. "button[3.25,6.5;3,0.5;world_create_confirm;" .. fgettext("Create") .. "]" .. + btn_style("world_create_cancel") .. "button[6.25,6.5;3,0.5;world_create_cancel;" .. fgettext("Cancel") .. "]" return retval diff --git a/builtin/mainmenu/dlg_create_world_default.lua b/builtin/mainmenu/dlg_create_world_default.lua index 0abd82dde..60f1c7a2a 100644 --- a/builtin/mainmenu/dlg_create_world_default.lua +++ b/builtin/mainmenu/dlg_create_world_default.lua @@ -56,19 +56,23 @@ local function create_world_formspec() end mglist = mglist:sub(1, -2) - return - "label[1.5,0.9;" .. fgettext("World name") .. ":" .. "]".. - "field[4.5,1.2;6,0.5;te_world_name;;]" .. + return "real_coordinates[true]" .. "formspec_version[3]" .. - "label[1.5,1.9;" .. fgettext("Seed") .. ":" .. "]".. - "field[4.5,2.2;6,0.5;te_seed;;".. current_seed .. "]" .. + "image[3.5,1.1;8.5,0.8;" .. defaulttexturedir_esc .. "field_bg.png;32]" .. + "style[te_world_name;border=false;bgcolor=transparent]" .. + "field[3.55,1.1;8.4,0.8;te_world_name;" .. fgettext("World name") .. ":" .. ";]" .. - "label[1.5,2.9;" .. fgettext("Mapgen") .. ":" .. "]".. - "dropdown[4.2,2.75;6.3;dd_mapgen;" .. mglist .. ";" .. selindex .. "]" .. + "image[3.5,2.5;8.5,0.8;" .. defaulttexturedir_esc .. "field_bg.png;32]" .. + "style[te_seed;border=false;bgcolor=transparent]" .. + "field[3.55,2.5;8.4,0.8;te_seed;" .. fgettext("Seed") .. ":" .. ";".. current_seed .. "]" .. - "style[world_create_confirm;bgcolor=#00d12b]" .. - "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") .. "]" + "label[3.5,3.7;" .. fgettext("Mapgen") .. ":" .. "]".. + "dropdown[3.5,3.9;8.5,0.8;dd_mapgen;" .. mglist .. ";" .. selindex .. "]" .. + + btn_style("world_create_confirm", "green") .. + "button[4.1,5.3;3.5,0.8;world_create_confirm;" .. fgettext("Create") .. "]" .. + btn_style("world_create_cancel") .. + "button[7.9,5.3;3.5,0.8;world_create_cancel;" .. fgettext("Cancel") .. "]" end local function create_world_buttonhandler(this, fields) diff --git a/builtin/mainmenu/dlg_delete_content.lua b/builtin/mainmenu/dlg_delete_content.lua index 402441d36..b4742c87a 100644 --- a/builtin/mainmenu/dlg_delete_content.lua +++ b/builtin/mainmenu/dlg_delete_content.lua @@ -19,15 +19,24 @@ local function delete_content_formspec(dialogdata) local title = dialogdata.content.title or dialogdata.content.name - local retval = - "image_button[2,1;8,3;" .. core.formspec_escape(defaulttexturedir) .. - "blank.png;;" .. fgettext("Are you sure you want to delete \"$1\"?", title) .. - ";true;false;]" .. - "style[dlg_delete_content_confirm;bgcolor=red]" .. - "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") .. "]" + local retval = { + "real_coordinates[true]", + "image[6.5,0.8;2.5,2.5;", defaulttexturedir_esc, "attention.png]", - return retval + "style[msg;content_offset=0]", + "image_button[1,3.5;13.5,0.8;;msg;", + fgettext("Are you sure you want to delete \"$1\"?", title), ";false;false]", + + btn_style("dlg_delete_content_confirm", "red"), + "image_button[4.1,5.3;3.5,0.8;;dlg_delete_content_confirm;", + fgettext("Delete"), ";true;false]", + + btn_style("dlg_delete_content_cancel"), + "image_button[7.9,5.3;3.5,0.8;;dlg_delete_content_cancel;", + fgettext("Cancel"), ";true;false]", + } + + return table.concat(retval) end -------------------------------------------------------------------------------- @@ -45,9 +54,6 @@ local function delete_content_buttonhandler(this, fields) if this.data.content.type == "game" then pkgmgr.update_gamelist() - - ui.childlist = {} - menudata.init_tabs() else pkgmgr.refresh_globals() end diff --git a/builtin/mainmenu/dlg_delete_world.lua b/builtin/mainmenu/dlg_delete_world.lua index b566bc61d..722f68b13 100644 --- a/builtin/mainmenu/dlg_delete_world.lua +++ b/builtin/mainmenu/dlg_delete_world.lua @@ -23,14 +23,30 @@ local function delete_world_formspec(dialogdata) delete_name = delete_name .. " (" .. game_name .. ")" end - local retval = - "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,4.8;3,0.5;world_delete_confirm;" .. fgettext("Delete") .. "]" .. - "button[6,4.8;3,0.5;world_delete_cancel;" .. fgettext("Cancel") .. "]" - return retval + local formspec = { + "real_coordinates[true]", + "image[6.5,0.8;2.5,2.5;", defaulttexturedir_esc, "attention.png]", + + "style[msg,wait;content_offset=0]", + "image_button[1,3.5;13.5,0.8;;msg;", + fgettext("Delete World \"$1\"?", delete_name), ";false;false]", + + btn_style("world_delete_cancel"), + "image_button[7.9,5.3;3.5,0.8;;world_delete_cancel;", + fgettext("Cancel"), ";true;false]", + } + + if dialogdata.cooldown > 0 then + formspec[#formspec + 1] = btn_style("wait", "gray") + formspec[#formspec + 1] = "image_button[4.1,5.3;3.5,0.8;;wait;" .. + fgettext("Delete") .. " (" .. dialogdata.cooldown .. ");true;false]" + else + formspec[#formspec + 1] = btn_style("world_delete_confirm", "red") + formspec[#formspec + 1] = "image_button[4.1,5.3;3.5,0.8;;world_delete_confirm;" .. + fgettext("Delete") .. ";true;false]" + end + + return table.concat(formspec) end local function delete_world_buttonhandler(this, fields) @@ -52,6 +68,23 @@ local function delete_world_buttonhandler(this, fields) return false end +-- core.handle_async requires a function defined in Lua +local function sleep_ms(delay) + return core.sleep_ms(delay) +end + +local function start_timer(msgbox) + core.handle_async(sleep_ms, 1000, function() + -- If this.hidden isn't true then the dialog must have been closed and + -- the countdown can be stopped. + if msgbox.parent and msgbox.parent.hidden then + msgbox.data.cooldown = msgbox.data.cooldown - 1 + ui.update() + start_timer(msgbox) + end + end) +end + function create_delete_world_dlg(name_to_del, index_to_del, game_to_del) assert(name_to_del ~= nil and type(name_to_del) == "string" and name_to_del ~= "") @@ -64,6 +97,8 @@ function create_delete_world_dlg(name_to_del, index_to_del, game_to_del) retval.data.delete_name = name_to_del retval.data.delete_game = game_to_del retval.data.delete_index = index_to_del + retval.data.cooldown = 5 + start_timer(retval) return retval end diff --git a/builtin/mainmenu/dlg_outdated_server.lua b/builtin/mainmenu/dlg_outdated_server.lua index a82fb9324..1a84937ef 100644 --- a/builtin/mainmenu/dlg_outdated_server.lua +++ b/builtin/mainmenu/dlg_outdated_server.lua @@ -15,23 +15,24 @@ --with this program; if not, write to the Free Software Foundation, Inc., --51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -local blank = core.formspec_escape(defaulttexturedir .. "blank.png") local function outdated_server_formspec(this) return ([[ style_type[image_button;content_offset=0] - image[4.9,0.3;2.5,2.5;%s] - image_button[1,2.5;10,0.8;%s;;%s;false;false] - image_button[1,3.2;10,0.8;%s;;%s;false;false] + image[4.9,0.3;2.5,2.5;%sattention.png] + style[msg;content_offset=0] + image_button[1,2.5;10,0.8;;msg;%s;false;false] + image_button[1,3.2;10,0.8;;msg;%s;false;false] + %s button[2,4.5;4,0.8;cancel;%s] - style[continue;bgcolor=yellow] + %s button[6,4.5;4,0.8;continue;%s] ]]):format( - core.formspec_escape(defaulttexturedir .. "attention.png"), - blank, + defaulttexturedir_esc, fgettext("The server you are trying to connect to is outdated!"), - blank, fgettext("Support for older servers may be removed at any time."), + btn_style("cancel"), fgettext("Cancel"), + btn_style("continue", "yellow"), fgettext("Join anyway") ) end diff --git a/builtin/mainmenu/dlg_rename_modpack.lua b/builtin/mainmenu/dlg_rename_modpack.lua index de39abb23..32b6decd9 100644 --- a/builtin/mainmenu/dlg_rename_modpack.lua +++ b/builtin/mainmenu/dlg_rename_modpack.lua @@ -19,8 +19,10 @@ local function rename_modpack_formspec(dialogdata) local retval = + btn_style("dlg_rename_modpack_confirm", "green") .. "button[3,4.8;3,0.5;dlg_rename_modpack_confirm;".. fgettext("Accept") .. "]" .. + btn_style("dlg_rename_modpack_cancel") .. "button[6,4.8;3,0.5;dlg_rename_modpack_cancel;".. fgettext("Cancel") .. "]" @@ -32,7 +34,11 @@ local function rename_modpack_formspec(dialogdata) input_y = 2.5 end retval = retval .. - "field[2.5," .. input_y .. ";7,0.5;te_modpack_name;" .. + "formspec_version[3]" .. + "image[2.5," .. input_y - 0.47 .. ";8.55,0.84;" .. + defaulttexturedir_esc .. "field_bg.png;32]" .. + "style[te_modpack_name;border=false;bgcolor=transparent]" .. + "field[2.85," .. input_y .. ";6.9,0.5;te_modpack_name;" .. fgettext("Rename Modpack:") .. ";" .. dialogdata.mod.dir_name .. "]" return retval diff --git a/builtin/mainmenu/dlg_settings_advanced.lua b/builtin/mainmenu/dlg_settings_advanced.lua index a1737962b..eded14bd4 100644 --- a/builtin/mainmenu/dlg_settings_advanced.lua +++ b/builtin/mainmenu/dlg_settings_advanced.lua @@ -621,7 +621,8 @@ local function create_change_setting_formspec(dialogdata) end formspec = "field[0.28," .. height + 0.15 .. ";8,1;te_setting_value;;" .. core.formspec_escape(current_value) .. "]" - .. "button[8," .. height - 0.15 .. ";2,1;btn_browser_" + .. btn_style("btn_browser_" .. setting.type) + .. "button[8," .. height - 0.2 .. ";2,1;btn_browser_" .. setting.type .. ";" .. fgettext("Browse") .. "]" height = height + 1.15 @@ -825,14 +826,15 @@ local function create_change_setting_formspec(dialogdata) end return ( - "size[" .. width .. "," .. height + 0.25 .. ",false]" .. + "size[" .. width .. "," .. height + 0.25 .. "]" .. "bgcolor[#0000]" .. - "background9[0,0;0,0;" .. core.formspec_escape(defaulttexturedir .. - "bg_common.png") .. ";true;40]" .. + "background9[0,0;0,0;" .. defaulttexturedir_esc .. "bg_common.png;true;40]" .. create_textfield(description_box, setting_name, comment_text) .. formspec .. + btn_style("btn_done") .. "button[" .. width / 2 - 2.5 .. "," .. height - 0.4 .. ";2.5,1;btn_done;" .. fgettext("Save") .. "]" .. + btn_style("btn_cancel") .. "button[" .. width / 2 .. "," .. height - 0.4 .. ";2.5,1;btn_cancel;" .. fgettext("Cancel") .. "]" ) @@ -1019,8 +1021,12 @@ local function create_settings_formspec(tabview, _, tabdata) local formspec = "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) .. "]" .. + "formspec_version[3]" .. + "image[-0.05,-0.13;12.55,0.8;" .. defaulttexturedir_esc .. "field_bg.png;32]" .. + "style[search_string;border=false;bgcolor=transparent]" .. + "field[0.3,0.15;10.15,0.9;search_string;;" .. core.formspec_escape(search_string) .. "]" .. "field_close_on_enter[search_string;false]" .. + btn_style("search") .. "button[10.1,-0.22;2,1;search;" .. fgettext("Search") .. "]" .. "table[0,0.8;12,3.5;list_settings;" @@ -1068,9 +1074,12 @@ local function create_settings_formspec(tabview, _, tabdata) formspec = formspec:sub(1, -2) -- remove trailing comma end formspec = formspec .. ";" .. selected_setting .. "]" .. + btn_style("btn_back") .. "button[0,4.9;4,1;btn_back;".. fgettext("< Back to Settings page") .. "]" .. - "button[10,4.9;2,1;btn_edit;" .. fgettext("Edit") .. "]" .. - "button[7,4.9;3,1;btn_restore;" .. fgettext("Restore Default") .. "]" .. + btn_style("btn_restore") .. + "button[5.5,4.9;4,1;btn_restore;" .. fgettext("Restore Default") .. "]" .. + btn_style("btn_edit") .. + "button[9.5,4.9;2.5,1;btn_edit;" .. fgettext("Edit") .. "]" .. "checkbox[0,4.3;cb_tech_settings;" .. fgettext("Show technical names") .. ";" .. dump(core.settings:get_bool("main_menu_technical_settings")) .. "]" diff --git a/builtin/mainmenu/dlg_version_info.lua b/builtin/mainmenu/dlg_version_info.lua index de653e5dd..330151057 100644 --- a/builtin/mainmenu/dlg_version_info.lua +++ b/builtin/mainmenu/dlg_version_info.lua @@ -25,7 +25,6 @@ if not core.get_http_api then end local esc = core.formspec_escape -local defaulttexturedir = esc(defaulttexturedir) local LANG = core.settings:get("language") if not (LANG and (LANG ~= "")) then LANG = os.getenv("LANG") end @@ -45,19 +44,21 @@ local function version_info_formspec(data) return ([[ style_type[image_button;content_offset=0] - image[4.9,0;2.5,2.5;%s] - image_button[1,2;10,0.8;%s;;%s;false;false] + image[4.9,0;2.5,2.5;%slogo.png] + style[msg;content_offset=0] + image_button[1,2;10,0.8;;msg;%s;false;false] hypertext[1.3,2.6;10,2;;
%s
] - style[version_check_remind;bgcolor=yellow] + %s button[2,4.5;4,0.8;version_check_remind;%s] - style[version_check_visit;bgcolor=green] + %s button[6,4.5;4,0.8;version_check_visit;%s] ]]):format( - defaulttexturedir .. "logo.png", - defaulttexturedir .. "blank.png", + defaulttexturedir_esc, esc(data.title), esc(changes), + btn_style("version_check_remind", "yellow"), fgettext("Cancel"), + btn_style("version_check_visit", "green"), fgettext("Update") ) -- "Remind me later", "Update now" end diff --git a/builtin/mainmenu/init.lua b/builtin/mainmenu/init.lua index 887eec30c..516b0609e 100644 --- a/builtin/mainmenu/init.lua +++ b/builtin/mainmenu/init.lua @@ -26,6 +26,7 @@ local basepath = core.get_builtin_path() local mobile = PLATFORM == "Android" or PLATFORM == "iOS" defaulttexturedir = core.get_texturepath_share() .. DIR_DELIM .. "base" .. DIR_DELIM .. "pack" .. DIR_DELIM +defaulttexturedir_esc = core.formspec_escape(defaulttexturedir) dofile(basepath .. "common" .. DIR_DELIM .. "filterlist.lua") dofile(basepath .. "fstk" .. DIR_DELIM .. "buttonbar.lua") diff --git a/builtin/mainmenu/serverlistmgr.lua b/builtin/mainmenu/serverlistmgr.lua index f5da5da7a..df3b466e8 100644 --- a/builtin/mainmenu/serverlistmgr.lua +++ b/builtin/mainmenu/serverlistmgr.lua @@ -20,18 +20,10 @@ serverlistmgr = {} -------------------------------------------------------------------------------- local function order_server_list(list) local res = {} - - -- orders the multicraft list before support + --orders the favorite list after support for i = 1, #list do local fav = list[i] - if fav.server_id == "multicraft" then - res[#res + 1] = fav - end - end - for i = 1, #list do - local fav = list[i] - if is_server_protocol_compat(fav.proto_min, fav.proto_max) and - fav.server_id ~= "multicraft" then + if is_server_protocol_compat(fav.proto_min, fav.proto_max) then res[#res + 1] = fav end end @@ -66,11 +58,8 @@ function serverlistmgr.sync() core.handle_async( function(param) local http = core.get_http_api() - local serverlist = core.settings:get("serverlist_url") - local address = ("%s/list%s"):format(serverlist, - serverlist == minetest.decode_base64("c2VydmVycy5tdWx0aWNyYWZ0Lndvcmxk") and "_prod" or "") - local url = ("%s?proto_version_min=%d&proto_version_max=%d&platform=%s"):format( - address, + local url = ("%s/list?proto_version_min=%d&proto_version_max=%d&platform=%s"):format( + core.settings:get("serverlist_url"), core.get_min_supp_proto(), core.get_max_supp_proto(), PLATFORM) diff --git a/builtin/mainmenu/tab_content.lua b/builtin/mainmenu/tab_content.lua index a6c83de7a..feeb615ac 100644 --- a/builtin/mainmenu/tab_content.lua +++ b/builtin/mainmenu/tab_content.lua @@ -16,9 +16,6 @@ --with this program; if not, write to the Free Software Foundation, Inc., --51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -local esc = core.formspec_escape -local defaulttexturedir = esc(defaulttexturedir) - local packages_raw local packages @@ -62,15 +59,14 @@ local function get_formspec(tabview, name, tabdata) local retval = - "style_type[image_button;padding=-5;bgimg=" .. defaulttexturedir .. - "select_btn.png;bgimg_middle=10]" .. "label[-0.05,-0.25;".. fgettext("Installed Packages:") .. "]" .. - "background9[0,0.23;5.3,4.46;" .. defaulttexturedir .. "worldlist_bg.png" .. ";false;40]" .. + "background9[0,0.23;5.3,4.46;" .. defaulttexturedir_esc .. "worldlist_bg.png" .. ";false;40]" .. "tablecolumns[color;tree;text]" .. "tableoptions[background=#0000;border=false]" .. "table[0,0.25;5.1,4.3;pkglist;" .. pkgmgr.render_packagelist(packages) .. ";" .. tabdata.selected_pkg .. "]" .. + btn_style("btn_contentdb") .. "image_button[-0.11,4.8;5.5,0.9;;btn_contentdb;" .. fgettext("Browse online content") .. ";true;false]" @@ -91,7 +87,7 @@ local function get_formspec(tabview, name, tabdata) end if modscreenshot == nil then - modscreenshot = defaulttexturedir .. "no_screenshot.png" + modscreenshot = defaulttexturedir_esc .. "no_screenshot.png" end local info = core.get_content_info(selected_pkg.path) @@ -101,13 +97,14 @@ local function get_formspec(tabview, name, tabdata) end retval = retval .. - "image[5.5,0;3,2;" .. esc(modscreenshot) .. "]" .. - "label[8.25,0.6;" .. esc(selected_pkg.name) .. "]" .. - "background9[5.6,2.3;6.2,2.4;" .. defaulttexturedir .. "desc_bg.png" .. ";false;32]" + "image[5.5,0;3,2;" .. core.formspec_escape(modscreenshot) .. "]" .. + "label[8.25,0.6;" .. core.formspec_escape(selected_pkg.name) .. "]" .. + "background9[5.6,2.3;6.2,2.4;" .. defaulttexturedir_esc .. "desc_bg.png" .. ";false;32]" if selected_pkg.type == "mod" then if selected_pkg.is_modpack then retval = retval .. + btn_style("btn_mod_mgr_rename_modpack") .. "image_button[8.65,4.8;3.25,0.9;;btn_mod_mgr_rename_modpack;" .. fgettext("Rename") .. ";true;false]" else @@ -136,10 +133,12 @@ local function get_formspec(tabview, name, tabdata) if selected_pkg.type == "txp" then if selected_pkg.enabled then retval = retval .. + btn_style("btn_mod_mgr_disable_txp") .. "image_button[8.65,4.8;3.25,0.9;;btn_mod_mgr_disable_txp;" .. fgettext("Disable Texture Pack") .. ";true;false]" else retval = retval .. + btn_style("btn_mod_mgr_use_txp") .. "image_button[8.65,4.8;3.25,0.9;;btn_mod_mgr_use_txp;" .. fgettext("Use Texture Pack") .. ";true;false]" end @@ -151,6 +150,7 @@ local function get_formspec(tabview, name, tabdata) if core.may_modify_path(selected_pkg.path) then retval = retval .. + btn_style("btn_mod_mgr_delete_mod") .. "image_button[5.5,4.8;3.25,0.9;;btn_mod_mgr_delete_mod;" .. fgettext("Uninstall Package") .. ";true;false]" end diff --git a/builtin/mainmenu/tab_credits.lua b/builtin/mainmenu/tab_credits.lua index ed9906c86..5fed1230a 100644 --- a/builtin/mainmenu/tab_credits.lua +++ b/builtin/mainmenu/tab_credits.lua @@ -15,9 +15,6 @@ --with this program; if not, write to the Free Software Foundation, Inc., --51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -local esc = core.formspec_escape -local defaulttexturedir = esc(defaulttexturedir) - -------------------------------------------------------------------------------- local multicraft_developers = { @@ -106,6 +103,7 @@ local previous_contributors = { "Jeija [HTTP, particles]", } +local esc = core.formspec_escape local function buildCreditList(source) local ret = {} for i = 1, #source do @@ -119,7 +117,7 @@ return { caption = "", -- fgettext("Credits"), cbf_formspec = function(tabview, name, tabdata) local version = core.get_version() - local logofile = defaulttexturedir .. "logo.png" + local logofile = defaulttexturedir_esc .. "logo.png" local fs = "image[-0.25,-0.3;2,2;" .. logofile .. "]" .. "label[1.3,-0.25;" .. "MultiCraft Open Source, ver. " .. version.string .. "\n" .. @@ -127,14 +125,12 @@ return { "License: GNU LGPLv3.0+ and CC BY-SA 4.0\n" .. "Created and Powered by Minetest Engine, ver. 5.4.1]" .. - "style[homepage;padding=-5;bgimg=" .. defaulttexturedir .. - "select_btn.png;bgimg_middle=10]" .. - "image_button[9.5,-0.2;2.6,0.8;;homepage;Home Page;true;false]" .. - "style[privacy;padding=-5;bgimg=" .. defaulttexturedir .. - "select_btn.png;bgimg_middle=10]" .. - "image_button[9.5,0.65;2.6,0.8;;privacy;Privacy Policy;true;false]" .. + btn_style("homepage") .. + "image_button[9.5,-0.2;2.6,0.85;;homepage;Home Page;true;false]" .. + btn_style("privacy") .. + "image_button[9.5,0.6;2.6,0.85;;privacy;Privacy Policy;true;false]" .. - "background9[0,1.5;12,4.2;" .. defaulttexturedir .. + "background9[0,1.5;12,4.2;" .. defaulttexturedir_esc .. "worldlist_bg.png" .. ";false;40]" .. "tablecolumns[color;text]" .. "tableoptions[background=#0000;highlight=#00000000;border=false]" .. diff --git a/builtin/mainmenu/tab_local.lua b/builtin/mainmenu/tab_local.lua index 9d60e7c41..b80eddf3e 100644 --- a/builtin/mainmenu/tab_local.lua +++ b/builtin/mainmenu/tab_local.lua @@ -19,7 +19,7 @@ local lang = core.settings:get("language") if not lang or lang == "" then lang = os.getenv("LANG") end local esc = core.formspec_escape -local defaulttexturedir = esc(defaulttexturedir) +local small_screen = (PLATFORM == "Android" or PLATFORM == "iOS") and not core.settings:get_bool("device_is_tablet") local function current_game() local last_game_id = core.settings:get("menu_last_game") @@ -118,53 +118,56 @@ local function get_formspec(_, _, tab_data) creative_bg = "creative_bg_" .. lang .. ".png" end + local space = small_screen and ("\n"):rep(3) or ("\n"):rep(5) local retval = - "style[world_delete;fgimg=" .. defaulttexturedir .. - "world_delete.png;fgimg_hovered=" .. defaulttexturedir .. "world_delete_hover.png]" .. + "style[world_delete;fgimg=" .. defaulttexturedir_esc .. + "world_delete.png;fgimg_hovered=" .. defaulttexturedir_esc .. "world_delete_hover.png]" .. "image_button[-0.1,4.84;3.45,0.92;;world_delete;;true;false]" .. "tooltip[world_delete;".. fgettext("Delete") .. "]" .. - "style[world_create;fgimg=" .. defaulttexturedir .. - "world_new.png;fgimg_hovered=" .. defaulttexturedir .. "world_new_hover.png]" .. + "style[world_create;fgimg=" .. defaulttexturedir_esc .. + "world_new.png;fgimg_hovered=" .. defaulttexturedir_esc .. "world_new_hover.png]" .. "image_button[3.15,4.84;3.45,0.92;;world_create;;true;false]" .. - "tooltip[world_create;".. fgettext("New") .. "]" .. + "tooltip[world_create;".. fgettext("New") .. "]" - "style[play;fgimg=" .. defaulttexturedir .. "btn_play.png;fgimg_hovered=" .. - defaulttexturedir .. "btn_play_hover.png]" .. - "image_button[6.72,1.43;4.96,1.41;;play;;true;false]" .. + local world = menudata.worldlist:get_list()[index] + local game = world and pkgmgr.find_by_gameid(world.gameid) + if game and game.moddable then + retval = retval .. + btn_style("world_configure") .. + "image_button[9,4.84;3,0.92;;world_configure;" .. fgettext("Select Mods") .. ";true;false]" + end + + retval = retval .. + btn_style("play") .. + "style[play;font_size=*" .. (small_screen and 2.25 or 3) .. "]" .. + "image_button[6.72,1.43;4.96,1.41;;play;" .. space .. " " .. + fgettext("Play") .. space .. ";true;false]" .. + "image[7,1.63;1,1;" .. defaulttexturedir_esc .. "btn_play_icon.png]" .. "tooltip[play;".. fgettext("Play Game") .. "]" .. - "image_button[7.2,3.09;4,0.83;" .. defaulttexturedir .. creative_bg .. ";;;true;false]" .. + "image_button[7.2,3.09;4,0.83;" .. defaulttexturedir_esc .. creative_bg .. ";;;true;false]" .. "style[cb_creative_mode;content_offset=0]" .. - "image_button[7.2,3.09;4,0.83;" .. defaulttexturedir .. creative_checkbox .. + "image_button[7.2,3.09;4,0.83;" .. defaulttexturedir_esc .. creative_checkbox .. ";cb_creative_mode;;true;false]" .. - "background9[0,0;6.5,4.8;" .. defaulttexturedir .. "worldlist_bg.png" .. ";false;40]" .. + "background9[0,0;6.5,4.8;" .. defaulttexturedir_esc .. "worldlist_bg.png" .. ";false;40]" .. "tableoptions[background=#0000;border=false]" .. "table[0,0;6.28,4.64;sp_worlds;" .. menu_render_worldlist() .. ";" .. index .. "]" if tab_data.hidden then retval = retval .. - "style[switch_local_default;fgimg=" .. defaulttexturedir .. "switch_local_default.png;fgimg_hovered=" .. - defaulttexturedir .. "switch_local_default_hover.png]" .. + "style[switch_local_default;fgimg=" .. defaulttexturedir_esc .. "switch_local_default.png;fgimg_hovered=" .. + defaulttexturedir_esc .. "switch_local_default_hover.png]" .. "image_button[10.6,-0.1;1.5,1.5;;switch_local_default;;true;false]" end - if PLATFORM ~= "Android" and PLATFORM ~= "iOS" then - retval = retval .. - "style[world_configure;padding=-5;bgimg=" .. defaulttexturedir .. - "select_btn.png;bgimg_middle=10]" .. - "image_button[9.3,4.84;2.7,0.92;;world_configure;" .. fgettext("Select Mods") .. ";true;false]" - end - local enable_server = core.settings:get_bool("enable_server") if enable_server then retval = retval .. "checkbox[6.6,5;cb_server;".. fgettext("Create Server") ..";" .. dump(enable_server) .. "]" - end - if enable_server then if core.settings:get_bool("server_announce") then retval = retval .. "checkbox[9.3,5;cb_server_announce;" .. fgettext("Announce Server") .. ";true]" @@ -180,7 +183,7 @@ local function get_formspec(_, _, tab_data) return retval end -local function main_button_handler(this, fields, name) +local function main_button_handler(this, fields, name, tab_data) assert(name == "local") local world_doubleclick = false @@ -243,6 +246,22 @@ local function main_button_handler(this, fields, name) if world then local game = pkgmgr.find_by_gameid(world.gameid) core.settings:set("menu_last_game", (game and game.id or "")) + + -- Disable all mods on games that aren't moddable + if game and not game.moddable then + local conf = Settings(world.path .. DIR_DELIM .. "world.mt") + local needs_update = false + for _, key in ipairs(conf:get_names()) do + if key:sub(1, 9) == "load_mod_" and conf:get_bool(key) then + conf:set_bool(key, false) + needs_update = true + end + end + + if needs_update then + conf:write() + end + end end if core.settings:get_bool("enable_server") then @@ -327,7 +346,7 @@ local function main_button_handler(this, fields, name) if #pkgmgr.games > 1 or (pkgmgr.games[1] and pkgmgr.games[1].id ~= "default") then this:set_tab("content") else - local dlg = create_store_dlg() + local dlg = create_store_dlg("game") dlg:set_parent(this) this:hide() dlg:show() diff --git a/builtin/mainmenu/tab_local_default.lua b/builtin/mainmenu/tab_local_default.lua index 50028b5ac..be507da29 100644 --- a/builtin/mainmenu/tab_local_default.lua +++ b/builtin/mainmenu/tab_local_default.lua @@ -18,8 +18,7 @@ local lang = core.settings:get("language") if not lang or lang == "" then lang = os.getenv("LANG") end -local esc = core.formspec_escape -local defaulttexturedir = esc(defaulttexturedir) +local small_screen = (PLATFORM == "Android" or PLATFORM == "iOS") and not core.settings:get_bool("device_is_tablet") local default_worlds = { {name = "World 1", mg_name = "v7p", seed = "15823438331521897617"}, @@ -30,6 +29,8 @@ local default_worlds = { } local function create_default_worlds() + if #menudata.worldlist:get_list() > 0 then return end + local _, gameindex = pkgmgr.find_by_gameid("default") if not gameindex or gameindex == 0 then return end @@ -62,7 +63,7 @@ end local checked_worlds = false local function get_formspec(this) -- Only check the worlds once (on restart) - if not checked_worlds and #menudata.worldlist:get_list() == 0 then + if not checked_worlds then create_default_worlds() end checked_worlds = true @@ -86,40 +87,43 @@ local function get_formspec(this) creative_bg = "creative_bg_" .. lang .. ".png" end + local space = small_screen and ("\n"):rep(3) or ("\n"):rep(5) local retval = - "style[world_delete;fgimg=" .. defaulttexturedir .. - "world_delete.png;fgimg_hovered=" .. defaulttexturedir .. "world_delete_hover.png]" .. + "style[world_delete;fgimg=" .. defaulttexturedir_esc .. + "world_delete.png;fgimg_hovered=" .. defaulttexturedir_esc .. "world_delete_hover.png]" .. "image_button[-0.1,4.84;3.45,0.92;;world_delete;;true;false]" .. "tooltip[world_delete;".. fgettext("Delete") .. "]" .. - "style[world_create;fgimg=" .. defaulttexturedir .. - "world_new.png;fgimg_hovered=" .. defaulttexturedir .. "world_new_hover.png]" .. + "style[world_create;fgimg=" .. defaulttexturedir_esc .. + "world_new.png;fgimg_hovered=" .. defaulttexturedir_esc .. "world_new_hover.png]" .. "image_button[3.15,4.84;3.45,0.92;;world_create;;true;false]" .. "tooltip[world_create;".. fgettext("New") .. "]" .. - "style[play;fgimg=" .. defaulttexturedir .. "btn_play.png;fgimg_hovered=" .. - defaulttexturedir .. "btn_play_hover.png]" .. - "image_button[6.72,1.43;4.96,1.41;;play;;true;false]" .. + btn_style("play") .. + "style[play;font_size=*" .. (small_screen and 2.25 or 3) .. "]" .. + "image_button[6.72,1.43;4.96,1.41;;play;" .. space .. " " .. + fgettext("Play") .. space .. ";true;false]" .. + "image[7,1.63;1,1;" .. defaulttexturedir_esc .. "btn_play_icon.png]" .. "tooltip[play;".. fgettext("Play Game") .. "]" .. - "image_button[7.2,3.09;4,0.83;" .. defaulttexturedir .. creative_bg .. ";;;true;false]" .. + "image_button[7.2,3.09;4,0.83;" .. defaulttexturedir_esc .. creative_bg .. ";;;true;false]" .. "style[cb_creative_mode;content_offset=0]" .. - "image_button[7.2,3.09;4,0.83;" .. defaulttexturedir .. creative_checkbox .. + "image_button[7.2,3.09;4,0.83;" .. defaulttexturedir_esc .. creative_checkbox .. ";cb_creative_mode;;true;false]" .. - "background9[0,0;6.5,4.8;" .. defaulttexturedir .. "worldlist_bg.png" .. ";false;40]" .. + "background9[0,0;6.5,4.8;" .. defaulttexturedir_esc .. "worldlist_bg.png" .. ";false;40]" .. "tableoptions[background=#0000;border=false]" .. "table[0,0;6.28,4.64;sp_worlds;" .. menu_render_worldlist() .. ";" .. index .. "]" .. - "style[switch_local;fgimg=" .. defaulttexturedir .. "switch_local.png;fgimg_hovered=" .. - defaulttexturedir .. "switch_local_hover.png]" .. + "style[switch_local;fgimg=" .. defaulttexturedir_esc .. "switch_local.png;fgimg_hovered=" .. + defaulttexturedir_esc .. "switch_local_hover.png]" .. "image_button[10.6,-0.1;1.5,1.5;;switch_local;;true;false]" if PLATFORM == "Android" then retval = retval .. "image_button[6.6,-0.1;1.5,1.5;" .. - defaulttexturedir .. "gift_btn.png;upgrade;;true;false;" .. - defaulttexturedir .. "gift_btn_pressed.png]" + defaulttexturedir_esc .. "gift_btn.png;upgrade;;true;false;" .. + defaulttexturedir_esc .. "gift_btn_pressed.png]" end local enable_server = core.settings:get_bool("enable_server") @@ -138,7 +142,7 @@ local function get_formspec(this) retval = retval .. -- Name / Password "field[6.9,4.6;2.8,0.5;te_playername;" .. fgettext("Name") .. ":;" .. - esc(core.settings:get("name")) .. "]" .. + core.formspec_escape(core.settings:get("name")) .. "]" .. "pwdfield[9.6,4.6;2.8,0.5;te_passwd;" .. fgettext("Password") .. ":]" end diff --git a/builtin/mainmenu/tab_online.lua b/builtin/mainmenu/tab_online.lua index 4972eedb4..f6cbb8607 100644 --- a/builtin/mainmenu/tab_online.lua +++ b/builtin/mainmenu/tab_online.lua @@ -19,8 +19,8 @@ local password_tmp = "" local esc = core.formspec_escape -local defaulttexturedir = esc(defaulttexturedir) local lower = utf8.lower +local small_screen = (PLATFORM == "Android" or PLATFORM == "iOS") and not core.settings:get_bool("device_is_tablet") local function get_formspec(tabview, name, tabdata) -- Update the cached supported proto info, @@ -46,41 +46,52 @@ local function get_formspec(tabview, name, tabdata) local retval = -- Search "formspec_version[3]" .. - "image[-0.1,4.9;7,0.89;" .. defaulttexturedir .. "desc_bg.png;32]" .. + "image[-0.1,4.93;7,0.81;" .. defaulttexturedir_esc .. "field_bg.png;32]" .. "style[Dte_search;border=false;bgcolor=transparent]" .. - "field[0.25,5.2;5.75,1;Dte_search;;" .. esc(tabdata.search_for) .. "]" .. - "image_button[5.6,4.93;0.83,0.83;" .. defaulttexturedir .. + "field[0.25,5.25;5.7,0.83;Dte_search;;" .. esc(tabdata.search_for) .. "]" .. + btn_style("btn_mp_search") .. + "image_button[5.6,4.93;0.83,0.83;" .. defaulttexturedir_esc .. "search.png;btn_mp_search;;true;false]" .. - "image_button[6.35,4.93;0.83,0.83;" .. defaulttexturedir .. + btn_style("btn_mp_refresh") .. + "image_button[6.35,4.93;0.83,0.83;" .. defaulttexturedir_esc .. "refresh.png;btn_mp_refresh;;true;false]" .. -- Address / Port - "field[7.4,0.55;5,0.5;te_address;" .. fgettext("Address / Port") .. ":" .. ";" .. + "image[7.1,0.09;6,0.8;" .. defaulttexturedir_esc .. "field_bg.png;32]" .. + "style[te_address;border=false;bgcolor=transparent]" .. + "field[7.45,0.55;4.9,0.5;te_address;" .. fgettext("Address / Port") .. ":" .. ";" .. esc(address) .. "]" .. -- Name - "field[7.4,1.7;3.2,0.5;te_name;" .. fgettext("Name") .. ":" .. ";" .. + "image[7.1,1.25;2.95,0.8;" .. defaulttexturedir_esc .. "field_bg.png;32]" .. + "style[te_name;border=false;bgcolor=transparent]" .. + "field[7.45,1.7;2.45,0.5;te_name;" .. fgettext("Name") .. ":" .. ";" .. esc(core.settings:get("name")) .. "]" .. + -- Password + "image[9.55,1.25;2.95,0.8;" .. defaulttexturedir_esc .. "field_bg.png;32]" .. + "style[te_pwd;border=false;bgcolor=transparent]" .. + "pwdfield[9.9,1.7;2.45,0.5;te_pwd;" .. fgettext("Password") .. ":" .. ";" .. + esc(password_tmp) .. "]" .. + -- Description Background - "background9[7.2,2.2;4.8,2.65;" .. defaulttexturedir .. "desc_bg.png" .. ";false;32]" .. + "background9[7.2,2.2;4.8,2.65;" .. defaulttexturedir_esc .. "desc_bg.png" .. ";false;32]" .. -- Connect - "style[btn_mp_connect;fgimg=" .. defaulttexturedir .. - "btn_play.png;fgimg_hovered=" .. defaulttexturedir .. "btn_play_hover.png]" .. - "image_button[8.8,4.9;3.3,0.9;;btn_mp_connect;;true;false]" .. - "tooltip[btn_mp_connect;".. fgettext("Connect") .. "]" - - -- Password - retval = retval .. "pwdfield[10.45,1.7;1.95,0.5;te_pwd;" .. - fgettext("Password") .. ":" .. ";" .. esc(password_tmp) .. "]" + btn_style("btn_mp_connect") .. + "style[btn_mp_connect;font_size=*" .. (small_screen and 1.5 or 2) .. "]" .. + "image_button[8.8,4.88;3.3,0.9;;btn_mp_connect;" .. + ("\n"):rep(3) .. " " .. fgettext("Play") .. ("\n"):rep(3) .. ";true;false]" .. -- Connect + "image[9,5;0.6,0.6;" .. defaulttexturedir_esc .. "btn_play_icon.png]" .. + "tooltip[btn_mp_connect;" .. fgettext("Connect") .. "]" if tabdata.selected and selected then if gamedata.fav then retval = retval .. - "style[btn_delete_favorite;fgimg=" .. defaulttexturedir .. - "trash.png;fgimg_hovered=" .. defaulttexturedir .. "trash_hover.png]" .. - "image_button[7.1,4.93;0.83,0.83;;btn_delete_favorite;;true;false]" + btn_style("btn_delete_favorite", "red") .. + "image_button[7.1,4.93;0.83,0.83;" .. defaulttexturedir_esc .. + "trash.png;btn_delete_favorite;;true;false;" .. defaulttexturedir_esc .. "trash_pressed.png]" .. + "tooltip[btn_delete_favorite;" .. fgettext("Del. Favorite") .. "]" end if selected.description then retval = retval .. "textarea[7.5,2.2;4.8,3;;" .. @@ -91,7 +102,7 @@ local function get_formspec(tabview, name, tabdata) --favorites retval = retval .. "background9[0,-0.1;7.1,5;" .. - defaulttexturedir .. "worldlist_bg.png" .. ";false;40]" .. + defaulttexturedir_esc .. "worldlist_bg.png" .. ";false;40]" .. "tableoptions[background=#0000;border=false]" .. "tablecolumns[" .. image_column(fgettext("Favorite")) .. ",align=center;" .. diff --git a/builtin/mainmenu/tab_settings.lua b/builtin/mainmenu/tab_settings.lua index 32d7a369e..65fb6f337 100644 --- a/builtin/mainmenu/tab_settings.lua +++ b/builtin/mainmenu/tab_settings.lua @@ -172,10 +172,12 @@ local function formspec(tabview, name, tabdata) end tab_string = tab_string .. + btn_style("btn_change_keys") .. "button[8,4.75;3.95,1;btn_change_keys;" .. fgettext("Change Keys") .. "]" tab_string = tab_string .. + btn_style("btn_advanced_settings") .. "button[0,4.75;3.95,1;btn_advanced_settings;" .. fgettext("All Settings") .. "]" diff --git a/builtin/mainmenu/tab_settings_simple.lua b/builtin/mainmenu/tab_settings_simple.lua index 6bbb221d9..4b74b2286 100644 --- a/builtin/mainmenu/tab_settings_simple.lua +++ b/builtin/mainmenu/tab_settings_simple.lua @@ -19,13 +19,22 @@ local function create_confirm_reset_dlg() return dialog_create("reset_all_settings", function() - return - "image_button[2,1;8,3;" .. core.formspec_escape(defaulttexturedir .. - "blank.png") .. ";;" .. fgettext("Reset all settings?") .. - ";true;false;]" .. - "style[reset_confirm;bgcolor=red]" .. - "button[3,4.8;3,0.5;reset_confirm;" .. fgettext("Reset") .. "]" .. - "button[6,4.8;3,0.5;reset_cancel;" .. fgettext("Cancel") .. "]" + return table.concat({ + "real_coordinates[true]", + "image[6.5,0.8;2.5,2.5;", defaulttexturedir_esc, "attention.png]", + + "style[msg;content_offset=0]", + "image_button[1,3.5;13.5,0.8;;msg;", + fgettext("Reset all settings?"), ";false;false]", + + btn_style("reset_confirm", "red"), + "image_button[4.1,5.3;3.5,0.8;;reset_confirm;", + fgettext("Reset"), ";true;false]", + + btn_style("reset_cancel"), + "image_button[7.9,5.3;3.5,0.8;;reset_cancel;", + fgettext("Cancel"), ";true;false]", + }) end, function(this, fields) if fields["reset_confirm"] then @@ -84,7 +93,7 @@ local function formspec(tabview, name, tabdata) local sensitivity = tonumber(core.settings:get("touch_sensitivity")) * 2000 local touchtarget = core.settings:get_bool("touchtarget") or false local fancy_leaves = core.settings:get("leaves_style") == "fancy" - local fast_move = core.settings:get_bool("fast_move") or false + local arm_inertia = core.settings:get_bool("arm_inertia") or false local sound = tonumber(core.settings:get("sound_volume")) ~= 0 and true or false local tab_string = @@ -107,8 +116,8 @@ local function formspec(tabview, name, tabdata) .. dump(fancy_leaves) .. "]" .. "checkbox[0.15,3.5;cb_touchtarget;" .. fgettext("Touchtarget") .. ";" .. dump(touchtarget) .. "]" .. - "checkbox[0.15,4.1;cb_fast_move;" .. fgettext("Fast movement") .. ";" - .. dump(fast_move) .. "]" .. + "checkbox[0.15,4.1;cb_arm_inertia;" .. fgettext("Arm inertia") .. ";" + .. dump(arm_inertia) .. "]" .. "checkbox[0.15,4.7;cb_sound;" .. fgettext("Sound") .. ";" .. dump(sound) .. "]" .. @@ -146,10 +155,12 @@ local function formspec(tabview, name, tabdata) end --[[tab_string = tab_string .. + btn_style("btn_change_keys") .. "button[8,3.22;3.95,1;btn_change_keys;" .. fgettext("Change Keys") .. "]" tab_string = tab_string .. + btn_style("btn_advanced_settings") .. "button[8,4.57;3.95,1;btn_advanced_settings;" .. fgettext("All Settings") .. "]"]] @@ -179,6 +190,7 @@ local function formspec(tabview, name, tabdata) "label[8.25,3.35;" .. fgettext("Language") .. ":]" .. "dropdown[8.25,3.8;3.58;dd_language;" .. language_dropdown .. ";" .. lang_idx .. ";true]" .. + btn_style("btn_reset") .. "button[8.25,4.81;3.5,0.8;btn_reset;" .. fgettext("Reset all settings") .. "]" return tab_string @@ -229,8 +241,8 @@ local function handle_settings_buttons(this, fields, tabname, tabdata) core.settings:set("touchtarget", fields["cb_touchtarget"]) return true end - if fields["cb_fast_move"] then - core.settings:set("fast_move", fields["cb_fast_move"]) + if fields["cb_arm_inertia"] then + core.settings:set("arm_inertia", fields["cb_arm_inertia"]) return true end if fields["cb_sound"] then diff --git a/src/client/game.cpp b/src/client/game.cpp index a27bd8658..ac6d138d8 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -4351,15 +4351,18 @@ void Game::showPauseMenu() #ifdef __IOS__ ypos += 0.5f; #endif + const bool high_dpi = RenderingEngine::isHighDpi(); + const std::string x2 = high_dpi ? ".x2" : ""; std::ostringstream os; os << "formspec_version[1]" << SIZE_TAG << "no_prepend[]" << "bgcolor[#00000060;true]" - << "style_type[image_button_exit,image_button;bgimg=gui_button.png;bgimg_middle=20;padding=-10]" - << "style_type[image_button_exit,image_button:hovered;bgimg=gui_button_hovered.png]" - << "style_type[image_button_exit,image_button:pressed;bgimg=gui_button_pressed.png]" + << "style_type[image_button_exit,image_button;bgimg=gui/gui_button" << x2 << + ".png;bgimg_middle=" << (high_dpi ? "48" : "32") << ";padding=" << (high_dpi ? "-30" : "-20") << "]" + << "style_type[image_button_exit,image_button:hovered;bgimg=gui/gui_button_hovered" << x2 << ".png]" + << "style_type[image_button_exit,image_button:pressed;bgimg=gui/gui_button_pressed" << x2 << ".png]" << "image_button_exit[3.5," << (ypos++) << ";4,0.9;;btn_continue;" << strgettext("Continue") << ";;false]"; @@ -4452,6 +4455,8 @@ void Game::showChangePasswordDialog(std::string old_pw, std::string new_pw, str_formspec_escape(new_pw); str_formspec_escape(confirm_pw); + const bool high_dpi = RenderingEngine::isHighDpi(); + const std::string x2 = high_dpi ? ".x2" : ""; std::ostringstream os; os << "formspec_version[5]" << "size[10.5,7.5]" @@ -4461,9 +4466,10 @@ void Game::showChangePasswordDialog(std::string old_pw, std::string new_pw, << "pwdfield[1,1.2;8.5,0.8;old_pw;" << strgettext("Old Password") << ":;" << old_pw << "]" << "pwdfield[1,2.8;8.5,0.8;new_pw;" << strgettext("New Password") << ":;" << new_pw << "]" << "pwdfield[1,4.4;8.5,0.8;confirm_pw;" << strgettext("Confirm Password") << ":;" << confirm_pw << "]" - << "style_type[image_button_exit,image_button;bgimg=gui_button.png;bgimg_middle=20;padding=-10]" - << "style_type[image_button_exit,image_button:hovered;bgimg=gui_button_hovered.png]" - << "style_type[image_button_exit,image_button:pressed;bgimg=gui_button_pressed.png]" + << "style_type[image_button_exit,image_button;bgimg=gui/gui_button" << x2 + << ".png;bgimg_middle=" << (high_dpi ? "48" : "32") << ";padding=" << (high_dpi ? "-30" : "-20") << "]" + << "style_type[image_button_exit,image_button:hovered;bgimg=gui/gui_button_hovered" << x2 << ".png]" + << "style_type[image_button_exit,image_button:pressed;bgimg=gui/gui_button_pressed" << x2 << ".png]" << "image_button[1,5.9;4.1,0.8;;btn_change_pw;" << strgettext("Change") << ";;false]" << "image_button_exit[5.4,5.9;4.1,0.8;;btn_cancel;" << strgettext("Cancel") << ";;false]"; diff --git a/src/client/renderingengine.cpp b/src/client/renderingengine.cpp index 97af9ca46..8cff29d04 100644 --- a/src/client/renderingengine.cpp +++ b/src/client/renderingengine.cpp @@ -801,3 +801,15 @@ v2u32 RenderingEngine::getDisplaySize() return engine->getWindowSize(); } #endif // __ANDROID__/__IOS__ + +bool RenderingEngine::isHighDpi() +{ +#if defined(__MACH__) && defined(__APPLE__) && !defined(__IOS__) + return g_settings->getFloat("screen_dpi") / 72.0f >= 2; +#elif defined(__IOS__) + float density = RenderingEngine::getDisplayDensity(); + return g_settings->getBool("device_is_tablet") ? (density >= 2) : (density >= 3); +#else + return RenderingEngine::getDisplayDensity() >= 3; +#endif +} diff --git a/src/client/renderingengine.h b/src/client/renderingengine.h index b527ea74a..cefd44501 100644 --- a/src/client/renderingengine.h +++ b/src/client/renderingengine.h @@ -50,6 +50,7 @@ public: static const char *getVideoDriverFriendlyName(irr::video::E_DRIVER_TYPE type); static float getDisplayDensity(); static v2u32 getDisplaySize(); + static bool isHighDpi(); bool setupTopLevelWindow(const std::string &name); void setupTopLevelXorgWindow(const std::string &name); diff --git a/src/content/subgames.cpp b/src/content/subgames.cpp index 18aceddb0..840ed4796 100644 --- a/src/content/subgames.cpp +++ b/src/content/subgames.cpp @@ -133,13 +133,17 @@ SubgameSpec findSubgame(const std::string &id) if (conf.exists("release")) game_release = conf.getS32("release"); + bool moddable = true; + if (conf.exists("moddable")) + moddable = conf.getBool("moddable"); + std::string menuicon_path; #ifndef SERVER menuicon_path = getImagePath( game_path + DIR_DELIM + "menu" + DIR_DELIM + "icon.png"); #endif return SubgameSpec(id, game_path, gamemod_path, mods_paths, game_name, - menuicon_path, game_author, game_release); + menuicon_path, game_author, game_release, moddable); } SubgameSpec findWorldSubgame(const std::string &world_path) diff --git a/src/content/subgames.h b/src/content/subgames.h index 22a6ec561..2ee93eb55 100644 --- a/src/content/subgames.h +++ b/src/content/subgames.h @@ -35,6 +35,7 @@ struct SubgameSpec std::string gamemods_path; std::set addon_mods_paths; std::string menuicon_path; + bool moddable; SubgameSpec(const std::string &id = "", const std::string &path = "", const std::string &gamemods_path = "", @@ -42,11 +43,12 @@ struct SubgameSpec std::set(), const std::string &name = "", const std::string &menuicon_path = "", - const std::string &author = "", int release = 0) : + const std::string &author = "", int release = 0, + const bool moddable = true) : id(id), name(name), author(author), release(release), path(path), gamemods_path(gamemods_path), addon_mods_paths(addon_mods_paths), - menuicon_path(menuicon_path) + menuicon_path(menuicon_path), moddable(moddable) { } diff --git a/src/gui/StyleSpec.h b/src/gui/StyleSpec.h index 795c2a994..f454592e5 100644 --- a/src/gui/StyleSpec.h +++ b/src/gui/StyleSpec.h @@ -19,6 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "client/tile.h" // ITextureSource #include "client/fontengine.h" +#include "client/renderingengine.h" #include "debug.h" #include "irrlichttypes_extrabloated.h" #include "util/string.h" @@ -75,20 +76,22 @@ public: static std::array getButtonStyle(const std::string texture_path = "") { std::array ret; + const bool high_dpi = RenderingEngine::isHighDpi(); + const std::string x2 = high_dpi ? ".x2" : ""; StyleSpec btn_spec; - btn_spec.set(BGIMG, texture_path + "gui_button.png"); - btn_spec.set(BGIMG_MIDDLE, "20"); + btn_spec.set(BGIMG, texture_path + "gui/gui_button" + x2 + ".png"); + btn_spec.set(BGIMG_MIDDLE, high_dpi ? "48" : "32"); btn_spec.set(BORDER, "false"); - btn_spec.set(PADDING, "-10"); + btn_spec.set(PADDING, high_dpi ? "-30" : "-20"); ret[STATE_DEFAULT] = btn_spec; StyleSpec hovered_spec; - hovered_spec.set(BGIMG, texture_path + "gui_button_hovered.png"); + hovered_spec.set(BGIMG, texture_path + "gui/gui_button_hovered" + x2 + ".png"); ret[STATE_HOVERED] = hovered_spec; StyleSpec pressed_spec; - pressed_spec.set(BGIMG, texture_path + "gui_button_pressed.png"); + pressed_spec.set(BGIMG, texture_path + "gui/gui_button_pressed" + x2 + ".png"); ret[STATE_PRESSED] = pressed_spec; return ret; diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp index 6b3deb394..02de8d87d 100644 --- a/src/gui/guiFormSpecMenu.cpp +++ b/src/gui/guiFormSpecMenu.cpp @@ -1563,6 +1563,9 @@ void GUIFormSpecMenu::parsePwdField(parserData* data, const std::string &element e->setNotClipped(style.getBool(StyleSpec::NOCLIP, false)); e->setDrawBorder(style.getBool(StyleSpec::BORDER, true)); e->setOverrideColor(style.getColor(StyleSpec::TEXTCOLOR, video::SColor(0xFFFFFFFF))); + if (style.get(StyleSpec::BGCOLOR, "") == "transparent") { + e->setDrawBackground(false); + } e->setOverrideFont(style.getFont()); irr::SEvent evt; diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp index 9e9456c74..46d2d031d 100644 --- a/src/script/lua_api/l_mainmenu.cpp +++ b/src/script/lua_api/l_mainmenu.cpp @@ -326,6 +326,10 @@ int ModApiMainMenu::l_get_games(lua_State *L) lua_pushstring(L, game.menuicon_path.c_str()); lua_settable(L, top_lvl2); + lua_pushstring(L, "moddable"); + lua_pushboolean(L, game.moddable); + lua_settable(L, top_lvl2); + lua_pushstring(L, "addon_mods_paths"); lua_newtable(L); int table2 = lua_gettop(L); diff --git a/textures/base/pack/attention.png b/textures/base/pack/attention.png index e204d93b575d60987a0778e154e7b42a1147f4af..8000d4c1df3929ed50895a50815a25d809b18665 100644 GIT binary patch delta 202 zcmZo>dd)aNv;IE>ykq!!S>fFw%@-RD5A_NxsOM=;;7oO6&{t%RyehMSfq{XsB*-tA z!Qt7BG$5zK)5S5Q;?~`>o?HzM0?vWAcNYI=miFrLP{@m!`L;fU_db9A-iJ&5xs@b1 zi{@)2=}$Zmr|{*k;u_%t^H>t*GO%nfXkb!Zb6#+RGq=YN#=g6brHq`fXSuK>Gro?# zAG3kG#KD0nciM{=uX-Q6GYVI?V7<0QDD$v=8AF;N`)h$1)heJP7(8A5T-G@yGywqX C+fz;e delta 226 zcmaFO*vvFRv;OO41${;4L%jm;4r%^>$M9mKVRHiK|Ns9}-53_s^8gtf`7+@Q3=G^Q zL4LtNE)+0$`7?e33b%Q>IEGZ*x_a4=@2~-nbKoY=m+E_~8@{tl_DN7WU=ieV?#*GxFGd%6XBZp^H~*(sa@+1)eS^ML XnAGXae;+!5PGazM^>bP0l+XkKsf}cF diff --git a/textures/base/pack/btn_play_icon.png b/textures/base/pack/btn_play_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3ea426a188af533c70e1096f91bb6514ff639bd6 GIT binary patch literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0J3?w7mbKU|e(Ey(i*Z=?jiweqKxNxDVspSb`ul~Pq@{ttg<5N_;fp#-^y85}Sb4q9e07pGXZ2$lO literal 0 HcmV?d00001 diff --git a/textures/base/pack/cdb_downloading.png b/textures/base/pack/cdb_downloading.png index 6786b925d29da8fcc56b9389da96c4777b08ee54..b4d35f0b6834fc329cfc3187b4e4fa619dfa155a 100644 GIT binary patch delta 145 zcmX@Yc!F_)I9CG;GXn#|439F+iHh1a>7Fi*Ar*0NCvD_BV8Fw|I`hHaMtg3F^ArB2 zb3F=PA+&>2<=WKaQ`6To>2Mo~mn@p4cTRy%{BY7D1r;t3ao9+q(WS#BhW{IP){Lk2 vQTM;}OR-6*{cpYlX0V+!$VmBrOWs`RpW=O^Bg!T~s~J39{an^LB{Ts5FtIjk delta 141 zcmV;80CNAx0mK227Ybkm0{{R3jtp(9ks&L1V@X6oRCodHk^u(5Fc1WfykPT#Y(7wV zL;wG#9tm#YD5$m>SjGazo&~rq$Xw77HR$vp3Z29B(k)W-;EZlckptEw0;mlT;RJCm vZ1cHbFoVhaAa@@>4F)q9B*CDP?QMNrWtSO&Y1#+&00000NkvXXu0mjfHTyVT diff --git a/textures/base/pack/end_icon.png b/textures/base/pack/end_icon.png index 61d1cbe69aa2a5d08bf2dbf5ca3a6acfc490180f..964ff7de48ac0a7dbddfb0365f4f3bd9981ab3eb 100644 GIT binary patch literal 212 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyLIFM@u0VSC$%l(~KY8{3+npyL z{{R24G;y&8P?WJG$S;_|;n|HeAg937#WAGf*4=ZBY|Vxu&JR_i@BN?ZzW&r4Er!qW zA3XVgRb69!q`9z9L7@4j_MFdtL9tCC(-p2to{0l8IP5n6?>Kntt?o;XXSE`pR{s;c zy=(I~T<3Cpv^9(;ZLP$aD8mh^9E~iB6BOpKd}R51wU%*~Cv)dAnM)gib~AXo`njxg HN@xNAaDG$S literal 690 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H0wgodS2{2-FjacGIEGX(zB$Oq2oz*g_&49o zMHI*a0ltzavl`nc7s?#7fB*g6yHJmwm~BpiEa{74Sp;SY|6RG!`!8c|V|Rn{3g4hu z&f{j=;|2H|-rD>+`OI}=w21*ygZ75!SVh5Io3-}%T}>69AxaT zSZ2A*Z!3es3!?|ESJGaEa5F?z$-H!xm1SmNZdw?3<;qHthQ41rvQm*LO$=hqVh0{>XusbeTQn7k|1UYbGiMX|^9y}x81 zoSfv8C|(qIV2f;Ex0cKd75GLf8!mW&aam|FsZxunZLxx zzVl~QbBr4-pU=rR`QICNpYy=_jmG=(7TKM>AIG4*%*W#C^ILO;&)yGXuzF&w_vd)L zI74L3ks0z+wps_pFJ-v4!9sig&%X=?8E015F*7tD>v?62;N$=~A2QFZw^J=z<=;8y zRj|_XUsF!3gmRCscX{_yVCQq^C-e9xR@*^2OJ?UY7(C~nZ*uh7O0fgxc14G>eGN-j zu^ObF(e~X~y6W%lKjn4Ir_&PO<;>Xs_Fy9@K`~7DpRK%N6&Pq~tbB4Qw<>J{NZixa K&t;ucLK6V37bw>N diff --git a/textures/base/pack/field_bg.png b/textures/base/pack/field_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..2f7754af5676a9a8bd78c8a6b16438ed768ef141 GIT binary patch literal 170 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0L3?#3!&-4XSoB=)|uK&TnBd&e<%*wMsLB^6G zzhDN3XE)M-9Dh$2$B+uf{t literal 0 HcmV?d00001 diff --git a/textures/base/pack/gui/gui_button.png b/textures/base/pack/gui/gui_button.png new file mode 100644 index 0000000000000000000000000000000000000000..4e614d15b1b303c1b8f8c6b4bd4f0a6b18a70cd9 GIT binary patch literal 439 zcmV;o0Z9IdP)zJ(Qkfr8`pXDxJsM_K8Zi?PqeANH{|ALz1C{&bBam#&{ z;(wUpL1n&&pXHUR=rvib9Xx6?YrU7-t^5E000DGTPE!Ct=GbNc009?CL_t(|0qxag zS_454gyG1#yWIbxR1Z5eJkZg?^ZlO5g=DBfsMSG7f?e1zXWp{I0~6rpIHJ zkpRr2D0c~=h(!oept1x(0`k17f}p;lXP{{qfSkTO*LixTdaFcj3*v6za0tUZx5qZp zA`*b!&TFIeB`y#I3h3DC^8kBp5qv=Boskk`0HrRSTX{g@0Z|0Nnj6HQ15lFuM&JP? z2@is literal 0 HcmV?d00001 diff --git a/textures/base/pack/gui/gui_button.x2.png b/textures/base/pack/gui/gui_button.x2.png new file mode 100644 index 0000000000000000000000000000000000000000..511b7d29e34fe4c6020790ec16845271a47cf6be GIT binary patch literal 477 zcmV<30V4j1P)zJ(Qkfr8`pXDxJsM_K8Zi?PqeANH{|ALz1C{&bBam#&{ z;(wUpL1n&&pXHUR=rvib9Xx6?YrR>2R5$NmPHDy@_g9*THp63`U4)+Givg82d(Fx$+dh}(5Dl=781%m*% zTrPM-0iO2@Ajvc)$agA_IaTAOHve4|u=>NPy!X-&ujCX+qQSFM+btwk<1g z@TUY;pfPEn>pHh}4Im~UP1E;3Nk@Lxl!dO5g=DBfsMSG7f?e1zXWp{I0~6rpIHJ zkpRr2D0c~=h(!oept1x(0`k17f}p;lXP{{qfSkTO*LixTdaFcj3*v6za0tUZx5qZp zA`*b!&TFIeB`y#I3h3DC^8kBp5qv=Boskk`0HrRSTX{g@0Z|0Nnj6HQ15lFuM&JP? z2@iNmPHDy@_g9*THp63`U4)+Givg82d(Fx$+dh}(5Dl=781%m*% zTrPM-0iO2@Ajvc)$agA_IaTAOHve4|u=>NPy!X-&ujCX+qQSFM+btwk<1g z@TUY;pfPEn>pHh}4Im~UP1E;3Nk@Lxl!dP)t-s?f?Kk znO`Z6Oe&8}iM*Pc$Etm|k#w?(ZLfr8tbieLKCsigQlf7|nqmL{|6!_p9%DBzkx^Z! zcweb{CV@tAv4|jRI~74CCWA)aSj+za0004WQchC;qIDL7(o2OT*eWld4LOcy@Hes0O_Si<+mIg?N z^V%r=hzkV44$!gP=KddN1xNstxMj`;`aY5F`LHC?Fz|s}Kdx+`?-f8d%oUJWKvBf8638C!=Hoa`!!XYb zpeO(+aV?#*fxcG)U7G5=>n4c-tQ=96O4u253Q*oq>l$1bGXW6GavPxt#+b7Jv>0W3 dH9j3vfHw|y%IR^w%4h%p002ovPDHLkV1g3&yAc2Y literal 0 HcmV?d00001 diff --git a/textures/base/pack/gui/gui_button_green.x2.png b/textures/base/pack/gui/gui_button_green.x2.png new file mode 100644 index 0000000000000000000000000000000000000000..f97a51bcae432be0a51f2125f9f602fe34da4ea4 GIT binary patch literal 472 zcmV;}0Vn>6P)P)t-sRR91# znO`Z6Oe&8}iM*Pc$Etm|k#w?(ZLfr8tbieLKCsigQlf7|nqmL{|6!_p9%DBzkx^Z! zcweb{CV@tAv4|jRI~74CCWA(VsRNP#0004WQchCoRF}%BsnofO#h-w{n0daEal4HreMP_C%3HB}N~vrA|Nm>bi6L%1G@n{$w}olA zhboRveZQ6@c0m_NDJqaocUEH_00001bW%=J06^y0W&i*I6iGxuRCodH)m37{Kn#T8 zbj{56{cl>$)(R^)<^1pSCFYIxCb>J(9S6WT2tp}Xi`L?k5?`7+mt`CP^C-%FAa;mF z04b!h1i=CFysCnrzM~JIX&3-bU!L#g>6PlWQfgZvo(7x?!#uagHqy2thr6_f!(|_+7VeBkzvD;MZ{1<(z11tboRF}%BsnofO#h-w{n0daEal4HreMP_C%3HB}N~vrA|Nm>bi6L%1G@n{$w}olA zhboRveZQ6@c0m_NDJqao6<4Z|00001bW%=J06^y0W&i*IH%UZ6RCodH*hP{9F%U%2 zW@fzqO(#P&P%)-*YnRsFE1wxU(#5XCJH1H*$aI>fnJZQ0s^W3wPgPaHsOy>uz%&jw zKLNO9EQTG9b@$0QPl@5r7W_ zko-9bKmhmw764OZKv5I{2tWV`00ICB;Q#ZT6jK;w_VhX{fM-G*l6_aN&+`lbaR5k+uIsd6 z@5MR`&|PZ!Y5hs2`2aD_^So{-My6$*36M@h^-ZHnPqP4DD;K9dnZG6g00000NkvXX Hu0mjfw0FD# literal 0 HcmV?d00001 diff --git a/textures/base/pack/gui/gui_button_green_pressed.png b/textures/base/pack/gui/gui_button_green_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..f342aff01efe586afdb3713a481185e5fadbea7f GIT binary patch literal 435 zcmV;k0ZjghP)P)t-sDgXdX zwsSJ7Tr;a(q}R8%;K!HKt&Gm4gv_6N$(ksLOU>!mW50$`w{`#j|8>WeBzQtOtzvM+ zk#okAE}K<|&7&uQM;T8oE}d1rw2H3)0004WQchC;qIDL7(o2OT*eWld4LOcy@Hes0O_Si<+mIg?N z^V%r=hzkV44$!gP=KddN1xNstxMj`;`aY5F`LHC?Fz|s}Kdx+`?-f8d%oUJWKvBf8638C!=Hoa`!!XYb zpeO(+aV?#*fxcG)U7G5=>n4c-tQ=96O4u253Q*oq>l$1bGXW6GavPxt#+b7Jv>0W3 dH9j3vfHw|y%IR^w%4h%p002ovPDHLkV1jlPzpMZN literal 0 HcmV?d00001 diff --git a/textures/base/pack/gui/gui_button_green_pressed.x2.png b/textures/base/pack/gui/gui_button_green_pressed.x2.png new file mode 100644 index 0000000000000000000000000000000000000000..8c1f930adb78700fc78320179930d8153909bed0 GIT binary patch literal 472 zcmV;}0Vn>6P)P)t-s0000? zwsSJ7Tr;a(q}R8%;K!HKt&Gm4gv_6N$(ksLOU>!mW50$`w{`#j|8>WeBzQtOtzvM+ zk#okAE}K<|&7&uQM;T8oE}d0F5xYwO0004WQchCP)t-s?f?K` znB7Ey(M5sNzs~g0-1f7?@u$1*p0w_kuI)2vx8&;jdYI>CiQoVK|BtEbEM1~kebx`%CNN~)fx$iq;ydXk#Id;oK!r27?0004WQchC;qIDL7(o2OT*eWld4LOcy@Hes0O_Si<+mIg?N z^V%r=hzkV44$!gP=KddN1xNstxMj`;`aY5F`LHC?Fz|s}Kdx+`?-f8d%oUJWKvBf8638C!=Hoa`!!XYb zpeO(+aV?#*fxcG)U7G5=>n4c-tQ=96O4u253Q*oq>l$1bGXW6GavPxt#+b7Jv>0W3 dH9j3vfHw|y%IR^w%4h%p002ovPDHLkV1g`N$2CiQoVK|BtEbEM1~kebx`%CNN~)RuI;0_?>l3>AVPIHcFUZCB@h4r00DGTPE!Ct=GbNc00BKoL_t(|0qxjF z62dSLL{Tz0OU}OkMd{KIriwJ6U8BEuKXTAYw+?OIwl$O5g=DBfsMSG7f?e1zXWp{I0~6rpIHJ zkpRr2D0c~=h(!oept1x(0`k17f}p;lXP{{qfSkTO*LixTdaFcj3*v6za0tUZx5qZp zA`*b!&TFIeB`y#I3h3DC^8kBp5qv=Boskk`0HrRSTX{g@0Z|0Nnj6HQ15lFuM&JP? z2@iNmPHDy@_g9*THp63`U4)+Givg82d(Fx$+dh}(5Dl=781%m*% zTrPM-0iO2@Ajvc)$agA_IaTAOHve4|u=>NPy!X-&ujCX+qQSFM+btwk<1g z@TUY;pfPEn>pHh}4Im~UP1E;3Nk@Lxl!d8!7xDlq^5 z|JGz{Q56~7cz?<^KOk0t9{>OV0d!JMQvg8b*k%9#0TM|>K~#9!?bTIc!$1s#;Vhcg z4EH~3rL9#~aLW1L=S$27X`|W;k{t%%v9$wb_sYHIT_#u8ZR;Ec;CWg4923uoMlh17 z5SYLK-cOUY^94NueUAY6^m+e0uTM1Z1*)ouxEW~MVenob>qu3>0P6L8R;r)E0@l6+ z<`aDupwD#z4?NF1rDp;RP<2k9O9F5>pez|s<_huW0Lqx(2;2cReGQ3j#=q0U=H$b2Jd6 z5Ztk;%)8D}2;h*35QNZE<`5v9QI#uljspTrjN^HPAUx(d3gAX1_o9AJ#t`5EN&>)v T?I-`g00000NkvXXu0mjfdq}r7 literal 0 HcmV?d00001 diff --git a/textures/base/pack/gui/gui_button_red.x2.png b/textures/base/pack/gui/gui_button_red.x2.png new file mode 100644 index 0000000000000000000000000000000000000000..840d6bb02a3b18a0254406efcb780ab5ae258199 GIT binary patch literal 463 zcmV;=0WkiFP)>8!8dh>YBOf7*0<*lKT(CM@s7$Iwq#%Q`~;|NquxYj+hvZJAk$sfeaAXguNt2BxEjY1hB1Z- zz%(xYxdMB3h15mM^80>&kg^Ut|6F}(=2-#^sA_Mxq2T-=28gC0U z0LjM*3&0OFpaGa71BPKB00@8vG@t=Ufcn>WR$yJ%N38xMPx$5m#(t{xD(ot@^|%m2*JcS03?RBRv87| zuhRgwD1WtG8Ho-M<2=t|Lo+fh>r8-jW@M5Um7Zn+egTrkq0`ZCxl#ZC002ovPDHLk FV1fwXy}3@f06BfKAEZe=KCIA2c0d!JMQvg8b*k%9#0Tf9@K~#7F?bTIc!$1s#;nd8_ zd;g0=$S76wo+=bO^-7#67O z=fHNNj{@|$PT+y3xl?)~zyLLr^tmJehXdM{0cEZbzYd`K{wD(eK;PqluKNf60Rkun zgg9r82E6a7OFk?;6#^bO|Ko}Uycd8wV=e%N0_M5vgy8h?(>%s;3?U^1FwYDKaVnXk z0q=$2j!k9m+(;pSLm`$$2t8#E0hTkerBE6f%Sz+3%$|%Pz&&F5 VxvfUZ=e_^{002ovPDHLkV1guXz+33@f06BfKAELAbIng9R*0d!JMQvg8b*k%9#0XRuSK~#7F?byL?gdh}!;kH&s zDk7-*{*T%dZftIflQ6J5!@u`@3o%hYbf2-W>hvZJAk$sfeaAXguNt2BxEjY1hB1Z- zz%(xYxdMB3h15mM^80>&kg^Ut|6F}(=2-#^sA_Mxq2T-=28gC0U z0LjM*3&0OFpaGa71BPKB00@8vG@t=Ufcn>WR$yJ%N38xMPx$5m#(t{xD(ot@^|%m2*JcS03?RBRv87| zuhRgwD1WtG8Ho-M<2=t|Lo+fh>r8-jW@M5Um7Zn+egTrkq0`ZCxl#ZC002ovPDHLk FV1k6czg_?U literal 0 HcmV?d00001 diff --git a/textures/base/pack/gui/gui_button_red_pressed.png b/textures/base/pack/gui/gui_button_red_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..39411720a56874df77436b21cf6cc47fa23a7912 GIT binary patch literal 427 zcmV;c0aX5pP)B{?0bX1Brf{q=jT*m<2ObB|NrZ9eWe~G-Y+`pYjo;v zc+x5}?vI&t6&cJYG2tQ0;s5{u0d!JMQvg8b*k%9#0Tf9@K~#7F?bTIc!$1s#;nd8_ zd;g0=$S76wo+=bO^-7#67O z=fHNNj{@|$PT+y3xl?)~zyLLr^tmJehXdM{0cEZbzYd`K{wD(eK;PqluKNf60Rkun zgg9r82E6a7OFk?;6#^bO|Ko}Uycd8wV=e%N0_M5vgy8h?(>%s;3?U^1FwYDKaVnXk z0q=$2j!k9m+(;pSLm`$$2t8#E0hTkerBE6f%Sz+3%$|%Pz&&F5 VxvfUZ=e_^{002ovPDHLkV1msv!?^$e literal 0 HcmV?d00001 diff --git a/textures/base/pack/gui/gui_button_red_pressed.x2.png b/textures/base/pack/gui/gui_button_red_pressed.x2.png new file mode 100644 index 0000000000000000000000000000000000000000..27d1a1951b3ecea9c0fd74098e4140a7299fde17 GIT binary patch literal 463 zcmV;=0WkiFP)B{?0bX1Brf{q=jT*m<2ObB|NrZ9eWe~G-Y+`pYjo;v zc+x5}?vI&t6&cJYG1#Es(f|Me0d!JMQvg8b*k%9#0XRuSK~#7F?byL?gdh}!;kH&s zDk7-*{*T%dZftIflQ6J5!@u`@3o%hYbf2-W>hvZJAk$sfeaAXguNt2BxEjY1hB1Z- zz%(xYxdMB3h15mM^80>&kg^Ut|6F}(=2-#^sA_Mxq2T-=28gC0U z0LjM*3&0OFpaGa71BPKB00@8vG@t=Ufcn>WR$yJ%N38xMPx$5m#(t{xD(ot@^|%m2*JcS03?RBRv87| zuhRgwD1WtG8Ho-M<2=t|Lo+fh>r8-jW@M5Um7Zn+egTrkq0`ZCxl#ZC002ovPDHLk FV1l>q!tek9 literal 0 HcmV?d00001 diff --git a/textures/base/pack/gui/gui_button_yellow.png b/textures/base/pack/gui/gui_button_yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..cc40d63de67b5b8e2651f469c9babe6bc2ebd87c GIT binary patch literal 427 zcmV;c0aX5pP)E5m1&xzd1eA&fu*TQF%e<|0=$S76wo+=bO^-7#67O z=fHNNj{@|$PT+y3xl?)~zyLLr^tmJehXdM{0cEZbzYd`K{wD(eK;PqluKNf60Rkun zgg9r82E6a7OFk?;6#^bO|Ko}Uycd8wV=e%N0_M5vgy8h?(>%s;3?U^1FwYDKaVnXk z0q=$2j!k9m+(;pSLm`$$2t8#E0hTkerBE6f%Sz+3%$|%Pz&&F5 VxvfUZ=e_^{002ovPDHLkV1gY%#Iyha literal 0 HcmV?d00001 diff --git a/textures/base/pack/gui/gui_button_yellow.x2.png b/textures/base/pack/gui/gui_button_yellow.x2.png new file mode 100644 index 0000000000000000000000000000000000000000..637bb5cc74163814643752b194a2b8e0382dbe05 GIT binary patch literal 463 zcmV;=0WkiFP)E5m1&xzd1eA&fu*TQF%e<|hvZJAk$sfeaAXguNt2BxEjY1hB1Z- zz%(xYxdMB3h15mM^80>&kg^Ut|6F}(=2-#^sA_Mxq2T-=28gC0U z0LjM*3&0OFpaGa71BPKB00@8vG@t=Ufcn>WR$yJ%N38xMPx$5m#(t{xD(ot@^|%m2*JcS03?RBRv87| zuhRgwD1WtG8Ho-M<2=t|Lo+fh>r8-jW@M5Um7Zn+egTrkq0`ZCxl#ZC002ovPDHLk FV1n@@!=nHI literal 0 HcmV?d00001 diff --git a/textures/base/pack/gui/gui_button_yellow_hovered.png b/textures/base/pack/gui/gui_button_yellow_hovered.png new file mode 100644 index 0000000000000000000000000000000000000000..be7dfdb570dc50a88c3c5cf76078faae8b24e33c GIT binary patch literal 427 zcmV;c0aX5pP)0=$S76wo+=bO^-7#67O z=fHNNj{@|$PT+y3xl?)~zyLLr^tmJehXdM{0cEZbzYd`K{wD(eK;PqluKNf60Rkun zgg9r82E6a7OFk?;6#^bO|Ko}Uycd8wV=e%N0_M5vgy8h?(>%s;3?U^1FwYDKaVnXk z0q=$2j!k9m+(;pSLm`$$2t8#E0hTkerBE6f%Sz+3%$|%Pz&&F5 VxvfUZ=e_^{002ovPDHLkV1nBW#-IQI literal 0 HcmV?d00001 diff --git a/textures/base/pack/gui/gui_button_yellow_hovered.x2.png b/textures/base/pack/gui/gui_button_yellow_hovered.x2.png new file mode 100644 index 0000000000000000000000000000000000000000..5fd4c13316d097b49cc1768c475943feb5b9c683 GIT binary patch literal 463 zcmV;=0WkiFP)hvZJAk$sfeaAXguNt2BxEjY1hB1Z- zz%(xYxdMB3h15mM^80>&kg^Ut|6F}(=2-#^sA_Mxq2T-=28gC0U z0LjM*3&0OFpaGa71BPKB00@8vG@t=Ufcn>WR$yJ%N38xMPx$5m#(t{xD(ot@^|%m2*JcS03?RBRv87| zuhRgwD1WtG8Ho-M<2=t|Lo+fh>r8-jW@M5Um7Zn+egTrkq0`ZCxl#ZC002ovPDHLk FV1fgw#j5}S literal 0 HcmV?d00001 diff --git a/textures/base/pack/gui/gui_button_yellow_pressed.png b/textures/base/pack/gui/gui_button_yellow_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..2126f3a8d117298ac089251c64cbebed960e2c7e GIT binary patch literal 427 zcmV;c0aX5pP)bX_VCK_=A`fAmG0k&?Av~@nKJqH-{;d|0=$S76wo+=bO^-7#67O z=fHNNj{@|$PT+y3xl?)~zyLLr^tmJehXdM{0cEZbzYd`K{wD(eK;PqluKNf60Rkun zgg9r82E6a7OFk?;6#^bO|Ko}Uycd8wV=e%N0_M5vgy8h?(>%s;3?U^1FwYDKaVnXk z0q=$2j!k9m+(;pSLm`$$2t8#E0hTkerBE6f%Sz+3%$|%Pz&&F5 VxvfUZ=e_^{002ovPDHLkV1hmE$>ab4 literal 0 HcmV?d00001 diff --git a/textures/base/pack/gui/gui_button_yellow_pressed.x2.png b/textures/base/pack/gui/gui_button_yellow_pressed.x2.png new file mode 100644 index 0000000000000000000000000000000000000000..baee76705ce3f0d6bc0aa823a57f46b8a17ec607 GIT binary patch literal 463 zcmV;=0WkiFP)bX_VCK_=A`fAmG0k&?Av~@nKJqH-{;d|hvZJAk$sfeaAXguNt2BxEjY1hB1Z- zz%(xYxdMB3h15mM^80>&kg^Ut|6F}(=2-#^sA_Mxq2T-=28gC0U z0LjM*3&0OFpaGa71BPKB00@8vG@t=Ufcn>WR$yJ%N38xMPx$5m#(t{xD(ot@^|%m2*JcS03?RBRv87| zuhRgwD1WtG8Ho-M<2=t|Lo+fh>r8-jW@M5Um7Zn+egTrkq0`ZCxl#ZC002ovPDHLk FV1nf+$mIY4 literal 0 HcmV?d00001 diff --git a/textures/base/pack/gui_button.png b/textures/base/pack/gui_button.png deleted file mode 100644 index 5027564607279abf98d68f2d2007bb5c0de28619..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 443 zcmV;s0Yv_ZP)zJ(Qkfr8`pXDxJsM_K8Zi?PqeANH{|ALz1C{&bBam#&{ z;(wUpL1n&&pXHUR=rvib9Xx6?YrUi(WxW6Z00DGTPE!Ct=GbNc00A3GL_t(|0qxag za>HN@gyDdh8Sa14O0G4oS)T4!%=>?z#C((P)MKOPPO`%QJhm*Gvc{Y-ca=Bf`_E?( zU;v&wPB_HGgzOQFL{uCzfdRrWNh~Y9&^wT22!Kyt7*2Elq;xE%@|=iI1CNJohv9sz zL-HI3P%_ts1uSb0q`Mgf6!SS^3P=?h0I2!A*lAAS0LPgF#X)9)X|5xH0OfhV5qJTf zhXY*q1^g7?+6x5?Pz>l_s(7F*J?hGb#iOdq1W?zCIUFcU0i?t61W+g-idCiQoVK|BtEbEM1~kebx`%CNN~)RuI;0_?>l3>AVPIHcFQL3DzpFq00DGTPE!Ct=GbNc00A3GL_t(|0qxag za>HN@gyDdh8Sa14O0G4oS)T4!%=>?z#C((P)MKOPPO`%QJhm*Gvc{Y-ca=Bf`_E?( zU;v&wPB_HGgzOQFL{uCzfdRrWNh~Y9&^wT22!Kyt7*2Elq;xE%@|=iI1CNJohv9sz zL-HI3P%_ts1uSb0q`Mgf6!SS^3P=?h0I2!A*lAAS0LPgF#X)9)X|5xH0OfhV5qJTf zhXY*q1^g7?+6x5?Pz>l_s(7F*J?hGb#iOdq1W?zCIUFcU0i?t61W+g-idHN@gyDdh8Sa14O0G4oS)T4!%=>?z#C((P)MKOPPO`%QJhm*Gvc{Y-ca=Bf`_E?( zU;v&wPB_HGgzOQFL{uCzfdRrWNh~Y9&^wT22!Kyt7*2Elq;xE%@|=iI1CNJohv9sz zL-HI3P%_ts1uSb0q`Mgf6!SS^3P=?h0I2!A*lAAS0LPgF#X)9)X|5xH0OfhV5qJTf zhXY*q1^g7?+6x5?Pz>l_s(7F*J?hGb#iOdq1W?zCIUFcU0i?t61W+g-idFW^?+lYZVB7^8J-V*swam1G5UGB;qdg+K=}5@)qS_Ze@oSF amOk0Xc<9;g?fZacGkCiCxvX(Ye!RSF-wAqeqo)`bQ_I@p_U9H{x^PbQ8_dRA>TdzfBuSF)LHbN* z+tBvYk3pj1EHB^YMj-3QDeZS1a!w2f!tWIy{w%=s;J@>Z(}D+qs-Nm|G|X_8b~v|? z!{L{Jkizo-_6ge$unWMjyof8qN5_wB$D17(1z7AFeq8ZjpHRGl`Gn;a#wTJw7@8aq zT$xu4Mcg$EjthXYCX7#H;Y59 zdG=U_kBS#q1?IEtWO(#Lt6`3v{DA}2c||JA{TV*g|9oH6wAHefts$mP)WL5)m%?&? zW`WD<3<5s!3@euDGvr(rXV~_Vo8k5s)`r|)Ob5(r85QR2W0@dl&zN$YpW*sP<^!dF z7z$+V8DfCks~?#a`quw`{PK8VjepK#rRkPZ$G0CT+P3NVAAXT%8)qC9{`UDVdhi2d b<1bTP_6fzerT@Z!(aYfJ>gTe~DWM4f*X!Rh diff --git a/textures/base/pack/prev_icon.png b/textures/base/pack/prev_icon.png index e2d6d9234a300183ffb3fcf5526e5202a8c66850..0573920789c1d40d34af7ad45bb7da29b801dd78 100644 GIT binary patch literal 182 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyLIFM@u0VSC$%n7re_Oo!$(<)3 z{{R1PUM;d0D9Tt8+Y$Iyayb34mzL(_x=U1y4Yr0@TOf%5b;ZD+~5$gdV{WzlA@5( c!v3#JXXZ1W40yAi5okJtr>mdKI;Vst0IQKibpQYW literal 517 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H0wgodS2{2-FrM*raSW+oe0%%oPSHRHmWK!D zsWn&&KA6U&eJ8Q|X=BO(zU?^$*Cj6e7Txq#mhbA+gMXg;*za}DUc2>L6bfN4mh5A6 za?L@>$2#f8*)z-~lEqfvIB(gv`C8?#)fT5r<%;Izp1W*+LO0Ifk(G7L^8HhqV;=J= zUtlyi=k={%qI!=4gUa;(TK$#mj0!vdh*uu84q!O)^8M3W+fVy5N%-Gq7Py?w)bWy= z;q_C0hKpZR8=ij=b}0MBnPB~wMWE)PFvF9_@(+^g9tHy$s~JAsmJ@aGo6n`N+@E#A z`+Zyr^6{(_E-z;~@iLh4$(NN3pYDb;g47lL3SsEkIODHntz1K1_#+ptpZ%cSxq_~*%}W&`&V^mun6TlP#AP32vn^gTe~DWM4fT&3MT diff --git a/textures/base/pack/refresh.png b/textures/base/pack/refresh.png index 8e0d28d21e39b6e033954c2ec18f2d45f7a5a301..9ef583fe21e5265ac90139ba2caae863a3a3bec7 100644 GIT binary patch literal 1864 zcmV-O2e}9*E_=G$P`}Ghi=pnc zr@3_qC8Luj9YQ(jXHz#BET=d*L)~fPx1g{W^uY9(i!YDvlbSDsa&WTT$3;Wnc1CZ zg!D!^-)#AYUpWsG&UDZ~F@agX~~SL+^1NuyQ0q>_GjkNLxYkXg|S{@qn24M2DM8=~^w zu#U!myZp7hLDB%s>?+Nw!(jXTW0<7T#y%iv02cIsYBJV2f4LiIYg?cD@2)IK05Z#Z zMnq-q20GZyApU0n-AXa3UCSG)(_0=g!vA(fs{_zrBOfSUvrj$f3dh;SS{BfxtAXaT zy6qj|0(be;uaYQ105WTOLveocxZTYdTk6opEcW!MAF45c;{N+1-D)!fWd%ju*V-=k ztx~$YRRLJgg9`P5UGxq`GtmA%D`5a#Tl3t%NnyTrn5NKbrgW$;D;$9CPSz}cBb{X? zStt=xJK8r|>#`yP&}e5vrgm|0z;xiSH);-?Fx>Ok1s|8ml!fDj)!v9SsrltsOOnGBAbn zO{9DQOy@c=V;!Y)CA2e69~(dCY9WFaY;!^~ zGX#Ftav>R=>|>Y|&dV==RlFQsSs54-(aoVoQ^^2gkHDYoCrdcn|JLsn3_#|X$Om}M zY9S$+c6yu9!d9`V-5udfSG&h^-Z#VqImJ3xJOCY?@Bh2bbfIEoI_PgUi(AuH_I9lE z+~7ek`NT+*A^~&=F?vUCfz1xr7^;*8T})|i%UIX;4sfE2-QqE?`@;857Z1Qx9*e91 zY!_;oS-cq?1J*M0M3$Uiu}Y|A=8p`6AGdg@WfqDIL+&zHsAU$5>;ztG+EB|ZsX0Cm ztYMak>;;~zeLaBsU!Z;ytUm_p1EKm*xIP)G0rlx{tu2VeRsWJ$dTAF$Yd~~a{Ac^i zLhVYwF;aO6x5jEfJ#FMI4(aZ@p1VG4R$a{%plu`sPqLB30TH6;_fgDKiN2OJY=B|G5Hlw&*B=BfU=BL%~(a{^9@$?ynJ0_nh-Y`HBjhm zH(!e>V)z@O(M|@-*I3t=zJ-R&9Ii4}zCO35hJ+*Th*8ciX%m$uM;Ii3V;rDE^0nfK zZ%Wigr>m{Js}Rjj(<{WKZ=~cyyXq5)Br}ygyyjPh$hp?^A)>skv~IJxCRu@nGb^~k zXc1+do5-x;b;bGF6ZVKVQ`6Q=wsNUYwTMVDJ5AqC?=ug%((!h+wgolmqK{cEVQt$v z+TDg|QM^~Jt|6qP!J1xIogTM@EJW05OU)Lyn=3@sYE#uoE;n7d_mHnNQFR#Wbp0!_ z9=pH6DsQAibPtuF(JEe4Nxyr{G8#h?)!$tGTLX^eK2 zMYRo+8~tqJCWGV@XS~;(W>tM;llQs9Iql)D0$#Q@(VNb+rhc+eJ2dER5nDUSt)B6g z&y6tNBx8K+Id{6)arU%{CG}5#;dOO&b#--hb$Eakt!MNliW16d>K%8*R2cKvHHZMO${He zOB{2I`*@H4hs;5jOR1jhJMvyz9XPK0`k&Q-{=?51_dR|2y_92y)apcr+lma!7;jdY z@NAOhGYb80bG a3=E5zRJTu(-aZxR2?kGBKbLh*2~7Y4Sa6d7 diff --git a/textures/base/pack/search.png b/textures/base/pack/search.png index 729487f37fcf27669490082b18a903c909aec113..51d469930cf925695a35509b8a922e8fcab86968 100644 GIT binary patch literal 1271 zcmVu#5u)i^6-G9Y`nq*VoACywB=z*nRt?3+$Q->Qk{sD_r*8mBEj=51@TBqK`9Os zeA`GP?#KTaiYa#~FYd-uti!B6c*U*wfS)jL8IOw_k((>n@eOZ_+fb7@?72vKw>|wh z0(YKG%%C4lDNSxF(wd>nXD7D_+-Y7Fx8Osr5}02YNJi~9#v>GCDi;aN0UmM7UH>Qi zyT=edl>iVy7M2l+Ie6S~?ytk2cxLjJBnlbXgMS?))EI(48Os5=c`cF`xnt2<^>5F zGI9^yItc}Op}Wp!5>!-02RX$yUgb8LI0{S9F$i5GUa^Y_=-P<^M6d>3dE2+YSTq|A zb{j6DIUqJs0Zlw<#2A{QdsXaVKAM?g5D#z|O+A|zpc^>5Yx-VBc^4dppIF8Xg(72=z+6MVhLXL9-3XuV`AtV6P(0Z1u>7+IO{LgZ~$km#5|&L)>N!v znemI5j`KJxE!HpwXY<57d^pQ3*3buM8^k!^(2NNER4|JeM^`lE#11l`St^F{2&d7!X|Ex1 z3Qfk4wZkIC9!8_tEe7#C*U{7$d&q;XxER9-GLf z41Nm z7kC}7*V!4)Q55cu;2kcK7_pq>0LvIdA11Me7%mVGI`>DAo--Kb{s>;x&tl$_KhVLQ5h%z>B*_=`SGyzSMc}18 z2S} zI~8cf5azLg`HZ0_&8S4Sz~}qFw`Ye248#Bo12cW*E;K875TNr0I_mcX&xZg30t5&U zAV7cs0RjXF5FkK+009C72oQWGxaX7!?vA(|!Sa&?%TE$4KS{9sB*F5N1j|nnEWb*S h%pbwud^0mMvmcQLx{pIQ)>;4n002ovPDHLkV1lH(GcN!D literal 273 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0L3?#3!&-4XSJOMr-u0T3CbDZV%~{WBqjX2@gW1W?Tp_!d6apIM4mJul zCi*ovS~j2 zGE3~~5-rK7vW40qvzn5*cv_vpSD3IK7m<*xYMXXY=!R=V{*@~2>$CU%v#w!intk0@ TOT%Ib(D@9Wu6{1-oD!M<{$6fR diff --git a/textures/base/pack/server_flags_mc.png b/textures/base/pack/server_flags_mc.png index f092a5ad067ff183c4a44084298e41304c20cdcb..bbb8d17593eef782f58997a5f10b3c5692e96c7e 100644 GIT binary patch delta 145 zcmV;C0B--g0kQ#*DS!X}|Mbp%@x4&)uOHf+2&!=aFtW$^00001bW%=J06^y0W&i*H zPDw;TRCwBDjyVnhF$@A@1ONZ>ngS`#P6rwvCrD?ZYVD$-l?mOE08NvHcHO0lNW^DSz6W2&!=a?yn#5y-@VdegFUe?((?200006bW%=J|NsC0{{XYU zq`v?F08&XrK~#9!RgOUt03is&Qo#RzdF{A3k_*#_Ro0JmCY>uaMaB>!m?EM(I`arQ zgUs@P*ko3LFxU9>vQ5Ah-YDJ;Ujg)1#CgSZ1L}`8%VP2Yp%XCzre}oFHvj+t07*qo IM6N<$f(sN#5C8xG diff --git a/textures/base/pack/side_menu_divider.png b/textures/base/pack/side_menu_divider.png index 917ad150542d31f7d1207f6de32438650528f43e..97d52774da0b4d1c8d62f0384122690e1644103a 100644 GIT binary patch delta 54 zcmdnR;yFRmfQf;DLF}<&0gw{#ba4#fh)zC{ZF|rl_i8c&A1Cwu;`r1nKsg3aS3j3^ HP6m0GWZdCjbBeglR)VP)S2WAaHVTW@&6?001bFeUUv#!$2Ix zUsJV3Dh?JAafnczEQpFYY88r5q0|bkI+$Gg1x*@~6cF9F6jh^qA>*>bd5g1JuCnGm`3pliZDpD3 zG=~t!B9@SZe+U^>lu(9+D6JYPCQ`H?^Y9Nk{v^3%a+Scyv49FxNRA);4}N!R<|ilI zq)-g#e6j715g@P&G-|f}eQeu}6TtrrTxl(Tr4Gz|l3r_Rkt3jY8@RY`Y4RR$xdRM5 z>5?HilAorK&jasg^i5fy?-uA@b9-y<eSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{ t000t6B}73~2-joCYd!IwNkdhd0RR-y10`&6(Zv7&002ovPDHLkV1keA>MZ~O diff --git a/textures/base/pack/side_menu_left.png b/textures/base/pack/side_menu_left.png index d84644a69561d4b832f36b2b3255be5849cc24af..0e883121f8f617a6a8f593b026c7d1db76b25595 100644 GIT binary patch delta 178 zcmdm}bBJ+*L_HHT0|Uc#_L;swiYLG)#1%-}l${n8lr5ciOYi>SZXlnrB*-tA!Qt7B zG$1F%)5S5QBJS-KL%stB9L^Wd-RYlsdE<{s>$Flkr+m;4=+8g;?55CLL8o2KVXv5? zPJWS8DXrUhUf`9^dKt&qZ!8Nx@noGB&}uSkkjQG5*Pf-o@uR4wHcw#tgxP1ZAGm(h es=WC}HqPVc&E;?SqE7)WWbkzLb6Mw<&;$Tcen^S{ literal 5681 zcmeHLXH-+!77k5mGGb^dIx!XoA<0chA(7AmNHG|i6e*_Mgpf)SNI*bEa8PU@0ym=#&;8}>&+k6dh^e$b(4E{`S#x5+2`DIvYFw( ze1_p1Ll_J;!^hhr5c+jhU%EQbci3{_Fbp=0nH(IZ2xKY|QkjIy7lH^yk`zRMDn1tm zQ}tAYuFkbPV)B+}ep=U6zh0)Y?SJ+Fy)KZESY3M;p142A91R?HcP+KPT-ClXyCIT}H2QqT8rl2&aM6@k*k?=;d z=@pX!eeT^_oWZ#xH(gix8o$X2UPIfq8ScQdKu4YjTW#eX;Z=H#OBS^l_*vv2Ln035 z8Wu#B9u4+Ac%ytF6g&){`yu|a^FUtg$75AT!!i+2h@eW|R zj5nhcS-m(t6He@KwW{)l4Y17qb)YoB)Kk{{MVqPzpMGqK`imHtD zx5SoL{8EGHXo&+{?^rf=hjaIH&x7&3IF(tuynKb=u~l}TD4km{R1UwhQ69DY{^j3t zCsziHhmTn&Pwd%;9fK>T7p;jOGY^b9J*}AeAk9_rlU80exBs->QFEUj zbiQBgcSGkdm2~XNOe^1K_g2Y}VMZo%lb?}Oo}YadB~STz-`bqM`;NnFhekUxE)+>v z*q-NRr8z6x=8ax*$bEfg5!~LL7hZyTpuhUjp!{v#)85ne6XG{7-1XOXnVpb^X8Yut z?#hx>zBKuh@yi6~U`r-(w;;xXri|?;^!I9w{rUQK`mQ%{fyw?My=tRPcd-mBlXaIZ zmU-?KHFQ_AuYLA!aetJ`}jRH7%^w-D&Drl^_KBXKt; zjInVE?I9r^^8i%zkj~XXv!A?+9gFJq?gZqS3r4qXJMfBemVUqDWouZn`ACshq{?|W@O>9s;;tU8+Z4J-|0D!5aX5`nr)8tihd%rW%!hy)1B#9 z9+F0xS?AObD9lk2_Tgm%y<&<|bEw`|T&){p zg3cn%r*F)1N0C%5kDHEI}IIeXBlXrml;t zb#akdR9VBj#hDh^`PSnDeHWYhmaRWlVBS7trGxJy25mmKv*m>0!B7Pg=2TLcZ`M`_ zZ(NkpbepOzyqH~S|4zPcdo+P(>*|Ww7h>GCx9m$@=Hwink5t z3e2|a6l1o(z-nhCZt!Z4uiG*2P`tM8{tb2)|2TPb!=9C$0u)N7`%|_C(%t5+18#<{d5P%3&FcB(|P%NjYs7MVi z1-e&@F-U~QL?NIe!{`hIO(Fvkcr+djpgdLlL>$uD5aA@_a4CTvUhg5GCn_>lp^#EA z7^PB)Ryv?1G9Cs?CX+D$4uiv?APbZ{NvvS1P-6K)HN+H#2PkLD_)-O5B1Wh&nJh_y zf{H{!dc=qPL{d8aBfMDto&|^xjEX76V9@|ZB*J{|Ay;@NLLl!G`dbfqFtmrl1cGu& zf{YD%CW2zc!p|W%?2rD^1es7%4u_2ag`fyBl|xanUxZxlLuY*SP*cF;i=-Mai0m&c z6@2a|vcAYotYbp)_1 z4x27&q@u&fuM*?EDIz8EEE(SK;f|< z3FXM;a-cPpK*W;RY$hH@)EFJkgQj8x3iDAa^g+!#JoBn}OHk}!l! z1s8IlB3JOm393(uV7>?pQZUtQVu=I-*#RH{P!JpmNBU&63Y5vAPE=!J0kp#uu6kG~ zP%#j(Om&|^02&Xd779%UG8Gb8utXxHBGoA&)SjC5MmS9kiZ@>lStO}D{(a8}f$>vM zQ&T|5*QgK(P1{nK?5QAfW+FH>B9PydiXF=o^FU~Rzi+4ya{k{978$_eh#(t<#o|E} zp35epSOfrvViEur7X(QFne3n`<0HCU!c{1lGSH0&RSH!DHISwn#19%OZNIcu#)4{| z0BCLlL=?^;7;vQE2^0Wths99<0Eu~DFh)JAKUD05`5#W4GzOn71CZa83|d~G)e7@* zxq8o;n#OD->(e+gfe3kLH?)pa8S26Ha#^1W@|3;VLrvnct zhIT$*ieOHOZRV!)687~3JHmHDA}vLre-O;|;T`DTQkWLY zZ@C97OK+Yx^k5+M4wu7VMsW3|1>0L>1qr7seCVFjA5OC{L+Q5eqHKahDjyHGVDF~k z-IX)`1?cPUS!{Po`^`18wvtmty3~=Vl=64KU&ifdCLJx<6RcNUrq^ecL6*UDX4^}355YvtZ%x;Ov& kSjM(1can?RSNHryiZLlHBsyP^K{>#DJpDaRxUWh7FY*Dn@c;k- diff --git a/textures/base/pack/start_icon.png b/textures/base/pack/start_icon.png index 834ff2e661b049c4802db2cb2d30c52fa3b40606..e1b429bcb7060cabce4d86b536d325931d1bc330 100644 GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyLIFM@u0Z<#|NpyBK7955+v43% z?mYRhGHz8IP?WJG$S;_|;n|HeAg9RF#WAGf*4;iwz6J*lX5Hxj|5MF{f|uAFIFWg2 zCi8KA{zW&HT^74{xb+M8)-@`9x9q<2T&HM%`oy1eTo1FqX5qftz2my=Wd6N>V^bU) z9JR$H9AB|(A8-m2VBqd$1tRTA$4wK(d-r5KaaGpu*;gR$zlq5|_QtbwK-(ESUHx3v IIVCg!0QCJ(p8x;= literal 660 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H0wgodS2{2-FhzU1IEGX(zB$+k6k}*u@OP#7 zN+u8!$T?}8t)sC>qhrxx=>u~`A8c#wENB6T#}gjEoAvNojFFbK<`%#G zf7rI)d;jbIoPW~JtyZOM(LVnIQkjZpoGO^lDaU3!^Jz{x^W_?~%HNYCPYdQ|LKYI%{r3vJMZmF;ZfW5%j$%LPukbgX@)bm9M+d?_FTWO&xmjG&f1ed ze7<~BeQbR3_Vk|fDKRy3Q)Sc~>sf!7c9u@sIHRWavLHz#SmgmS}$SC?a+?SU|Co@|9M_B^)!!MLRE_bjGA44=L> zHZb(O(spMEkvLow8vm0i!>BtqW^uzNHiQ1PF<-yW|Ig`@Ff+d4BjXSKhCd8{%o98q zj)nfnmvj2rzi@jEqkY344!KWGJ;DxEvT=`kW?W$iY4^4~aCl#d-==7vEQVEwKdyP= z5pRCT@LKmrrW5-F`!;z173au$9ZUT5pG!%y`{I*p3sZR9Cdaltqqdh%HQDH8sfOfa&-Kp0&?y0h=L-&C@Lm)IhV~-m2|eds+!cT! z+XsvYVcEu%8Z|2>puz%{@XX7fW`5zAwsGp&GarBqHG}?_Jti~%EOeTzHr4*@l=8YQ l?CjuV=p}Fed;2 diff --git a/textures/base/pack/trash.png b/textures/base/pack/trash.png index d22ba206f77cfd9f253c241937adc34c8736a630..8de657b62f6d9ad7fcbb4f9ab5783d402bea47a8 100644 GIT binary patch delta 280 zcmX@fw47;zL_G&H0|Ud{?Tv4Mlw5#Mi0hGk`ySuB7ZV;nW8y?pW8)8R-u(anf6daR zEj2Yj#*OBdGeDJGB|(0{KrRF@Y&xTJ9w@rb)5S5Q;?~=1jcm+@0xb`pnC+gs??1P> z=3KFtxhpN7KWT6H8SrJ>o&Rs{95}|uX0g7frC#R7jTzF?N30nSRJMG7<@ZjoIe;NK zuCD6{E2F}1!M);)CmQBeSBAa*Q_5b_AbH^6b#Vh>29=_QVn%}wnFlqD+z|(umN;bp zykC_a&i<)?wN%H6K5p9s%E?tRFBms#9^5%o#>0wlhi?$GiiN)XUXF9344rc=!kH@7 bndK(F3KT3|E5_aebUTBmtDnm{r-UW|G$(%* delta 314 zcmV-A0mc5O0?7i97=Hu<00013M{Ml?001XYOjJex|Ns900mQz(ga82J-rihSS2Z&; zn30k2?Ck&l|E#5@gnWGeg@ve%m*W5c00DGTPE!Ct=GbNc007WQL_t(|Ue(n>4Z|=D zh2c>Mg-{3uQwW7pFa=Wxg;EHGfLhrng*m4E(W3i zTW%NIhz_)Hnw)d5p=khm>z#Cyx(Pr`0R4HeOknW<8G!sP7@wREl-O5%;CT2V#RnK-@9YD^ z++f}30uX3%+cUbNn?U%AzP%a%#Lt2fK!i!m2SowyUcLL5_x|;N1ElbhR3#5Mi~s-t M07*qoM6N<$f>~#Ws{jB1 diff --git a/textures/base/pack/trash_hover.png b/textures/base/pack/trash_hover.png deleted file mode 100644 index f2b4cf67748f25c1e509a813de56db86075b3785..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 329 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0J3?w7mbKU|e^#Gp`*Z=?jPf=9-uc-8Y>eRyA z+~w(g|zzjJSq2IGt4d)1Yc-8!5W%x#-7bB>!U>xFyW7sNiM2Qpr0w-JzMzxdBn zQ2w>!6oHJrUTfH8PBL`Ga4Q%!>=SZGark|{S(7=KTY&jVe&gMzw;Hxv*Ghj-dhK_g ztwQitv9v)ZTc)RU!v#GB&4ufkvlPDR*L WiN77oSstL@7(8A5T-G@yGywozaf2lQ diff --git a/textures/base/pack/trash_pressed.png b/textures/base/pack/trash_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..899f539f9c166d592623297fd922ee89122dd6bf GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!EaktaqI21MmAYdnec&z>pkQ*L8%IQQ^1XUU9|~4fCoi!(RU>WiM%vJaF*3xPdT(N>M{Gqd|wv zgBnKehyzSZ9I}7jugVT*|J1))s^df-x9tJt