diff --git a/builtin/fstk/buttonbar.lua b/builtin/fstk/buttonbar.lua index c051d7aa8..5b480d82f 100644 --- a/builtin/fstk/buttonbar.lua +++ b/builtin/fstk/buttonbar.lua @@ -23,7 +23,8 @@ 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_esc) + self.pos.x, self.pos.y - 0.1, self.size.x + 0.025, self.size.y + 0.35, + defaulttexturedir_esc .. "gui" .. DIR_DELIM_esc) for i=self.startbutton,#self.buttons,1 do local btn_name = self.buttons[i].name @@ -59,9 +60,10 @@ local function buttonbar_formspec(self) end if button.cdb then + local tpath = defaulttexturedir_esc .. "gui" .. DIR_DELIM_esc formspec = formspec .. - "style[" .. btn_name .. ";bgimg=" .. defaulttexturedir_esc .. - "btn_download.png;bgimg_hovered=" .. defaulttexturedir_esc .. "btn_download_hover.png]" .. + "style[" .. btn_name .. ";bgimg=" .. tpath .. + "btn_download.png;bgimg_hovered=" .. tpath .. "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, @@ -117,16 +119,18 @@ local function buttonbar_formspec(self) btn_inc_pos.x, btn_inc_pos.y, btn_size.x, btn_size.y, self.name, text_inc) else + local tpath = defaulttexturedir_esc .. "gui" .. DIR_DELIM_esc + formspec = formspec .. - "style[btnbar_dec_" .. self.name .. ";bgimg=" .. defaulttexturedir_esc .. - "btn_up.png;bgimg_hovered=" .. defaulttexturedir_esc .. "btn_up_hover.png]" .. + "style[btnbar_dec_" .. self.name .. ";bgimg=" .. tpath .. + "btn_up.png;bgimg_hovered=" .. tpath .. "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_esc .. - "btn_down.png;bgimg_hovered=" .. defaulttexturedir_esc .. "btn_down_hover.png]" .. + "style[btnbar_inc_" .. self.name .. ";bgimg=" .. tpath .. + "btn_down.png;bgimg_hovered=" .. tpath .. "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/tabview.lua b/builtin/fstk/tabview.lua index 8c54ea93f..9360839a2 100644 --- a/builtin/fstk/tabview.lua +++ b/builtin/fstk/tabview.lua @@ -69,13 +69,14 @@ end -------------------------------------------------------------------------------- local function make_side_pane_tab(y, tab_name, tooltip, selected) + local tpath = defaulttexturedir_esc .. "gui" .. DIR_DELIM_esc local formspec = "style[" .. tab_name .. "_tab;bgimg=" .. - defaulttexturedir_esc .. tab_name + tpath .. tab_name if selected then formspec = formspec .. "_menu_selected.png]" else formspec = formspec .. "_menu.png;bgimg_hovered=" .. - defaulttexturedir_esc .. tab_name .. "_menu_hover.png]" + tpath .. tab_name .. "_menu_hover.png]" end return formspec .. @@ -92,6 +93,7 @@ local function get_formspec(self) if self.parent == nil then local tsize = self.tablist[self.last_tab_index].tabsize or {width=self.width, height=self.height} + local tpath = defaulttexturedir_esc .. "gui" .. DIR_DELIM_esc formspec = formspec .. string.format("size[%f,%f,%s]",tsize.width + 2,tsize.height + 1, dump(self.fixed_size)) .. @@ -102,9 +104,9 @@ local function get_formspec(self) tsize.height + 1.75 .. ";" .. defaulttexturedir_esc .. "bg_common.png;false;40]" .. - "background9[12.13,1.05;0.9,2.6;" .. defaulttexturedir_esc .. "side_menu.png;false;30]" .. + "background9[12.13,1.05;0.9,2.6;" .. tpath .. "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_esc .. "side_menu_divider.png]" .. + "image[12.15,2.26;0.9,0.06;" .. tpath .. "side_menu_divider.png]" .. make_side_pane_tab(2.3, "authors", fgettext("Credits"), name == "credits") end @@ -237,13 +239,13 @@ local function button_header(self) local btn_name = self.name .. "_" .. i toadd = toadd .. "style[" .. btn_name .. ";padding=-10;bgimg=" .. defaulttexturedir_esc .. - texture + DIR_DELIM_esc .. "gui" .. DIR_DELIM_esc .. texture if i == math.abs(self.last_tab_index) then toadd = toadd .. "_selected.png;" else toadd = toadd .. ".png;bgimg_hovered=" .. defaulttexturedir_esc .. - texture .. "_hover.png;" + DIR_DELIM_esc .. "gui" .. DIR_DELIM_esc .. texture .. "_hover.png;" end toadd = toadd .. "bgimg_middle=20;content_offset=0]" .. diff --git a/builtin/mainmenu/common.lua b/builtin/mainmenu/common.lua index 4bea5fdec..7c31a3649 100644 --- a/builtin/mainmenu/common.lua +++ b/builtin/mainmenu/common.lua @@ -314,7 +314,7 @@ function is_high_dpi() end -------------------------------------------------------------------------------- function btn_style(field, color) - local button_path = defaulttexturedir_esc .. "gui" .. DIR_DELIM + local button_path = defaulttexturedir_esc .. "gui" .. DIR_DELIM_esc local btn_size = is_high_dpi() and ".x2" or "" color = (color and "_" .. color) or "" diff --git a/builtin/mainmenu/init.lua b/builtin/mainmenu/init.lua index 516b0609e..6bfc861bb 100644 --- a/builtin/mainmenu/init.lua +++ b/builtin/mainmenu/init.lua @@ -27,6 +27,7 @@ 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) +DIR_DELIM_esc = core.formspec_escape(DIR_DELIM) -- for use in formspecs only dofile(basepath .. "common" .. DIR_DELIM .. "filterlist.lua") dofile(basepath .. "fstk" .. DIR_DELIM .. "buttonbar.lua") diff --git a/textures/base/pack/btn_play.png b/textures/base/pack/btn_play.png deleted file mode 100644 index c59fde69f..000000000 Binary files a/textures/base/pack/btn_play.png and /dev/null differ diff --git a/textures/base/pack/btn_play_hover.png b/textures/base/pack/btn_play_hover.png deleted file mode 100644 index e87bf5862..000000000 Binary files a/textures/base/pack/btn_play_hover.png and /dev/null differ diff --git a/textures/base/pack/authors_menu.png b/textures/base/pack/gui/authors_menu.png similarity index 100% rename from textures/base/pack/authors_menu.png rename to textures/base/pack/gui/authors_menu.png diff --git a/textures/base/pack/authors_menu_hover.png b/textures/base/pack/gui/authors_menu_hover.png similarity index 100% rename from textures/base/pack/authors_menu_hover.png rename to textures/base/pack/gui/authors_menu_hover.png diff --git a/textures/base/pack/authors_menu_selected.png b/textures/base/pack/gui/authors_menu_selected.png similarity index 100% rename from textures/base/pack/authors_menu_selected.png rename to textures/base/pack/gui/authors_menu_selected.png diff --git a/textures/base/pack/btn_down.png b/textures/base/pack/gui/btn_down.png similarity index 100% rename from textures/base/pack/btn_down.png rename to textures/base/pack/gui/btn_down.png diff --git a/textures/base/pack/btn_down_hover.png b/textures/base/pack/gui/btn_down_hover.png similarity index 100% rename from textures/base/pack/btn_down_hover.png rename to textures/base/pack/gui/btn_down_hover.png diff --git a/textures/base/pack/btn_download.png b/textures/base/pack/gui/btn_download.png similarity index 100% rename from textures/base/pack/btn_download.png rename to textures/base/pack/gui/btn_download.png diff --git a/textures/base/pack/btn_download_hover.png b/textures/base/pack/gui/btn_download_hover.png similarity index 100% rename from textures/base/pack/btn_download_hover.png rename to textures/base/pack/gui/btn_download_hover.png diff --git a/textures/base/pack/btn_up.png b/textures/base/pack/gui/btn_up.png similarity index 100% rename from textures/base/pack/btn_up.png rename to textures/base/pack/gui/btn_up.png diff --git a/textures/base/pack/btn_up_hover.png b/textures/base/pack/gui/btn_up_hover.png similarity index 100% rename from textures/base/pack/btn_up_hover.png rename to textures/base/pack/gui/btn_up_hover.png diff --git a/textures/base/pack/settings_menu.png b/textures/base/pack/gui/settings_menu.png similarity index 100% rename from textures/base/pack/settings_menu.png rename to textures/base/pack/gui/settings_menu.png diff --git a/textures/base/pack/settings_menu_hover.png b/textures/base/pack/gui/settings_menu_hover.png similarity index 100% rename from textures/base/pack/settings_menu_hover.png rename to textures/base/pack/gui/settings_menu_hover.png diff --git a/textures/base/pack/settings_menu_selected.png b/textures/base/pack/gui/settings_menu_selected.png similarity index 100% rename from textures/base/pack/settings_menu_selected.png rename to textures/base/pack/gui/settings_menu_selected.png diff --git a/textures/base/pack/side_menu.png b/textures/base/pack/gui/side_menu.png similarity index 100% rename from textures/base/pack/side_menu.png rename to textures/base/pack/gui/side_menu.png diff --git a/textures/base/pack/side_menu_divider.png b/textures/base/pack/gui/side_menu_divider.png similarity index 100% rename from textures/base/pack/side_menu_divider.png rename to textures/base/pack/gui/side_menu_divider.png diff --git a/textures/base/pack/side_menu_left.png b/textures/base/pack/gui/side_menu_left.png similarity index 100% rename from textures/base/pack/side_menu_left.png rename to textures/base/pack/gui/side_menu_left.png diff --git a/textures/base/pack/upper_buttons_left.png b/textures/base/pack/gui/upper_buttons_left.png similarity index 100% rename from textures/base/pack/upper_buttons_left.png rename to textures/base/pack/gui/upper_buttons_left.png diff --git a/textures/base/pack/upper_buttons_left_hover.png b/textures/base/pack/gui/upper_buttons_left_hover.png similarity index 100% rename from textures/base/pack/upper_buttons_left_hover.png rename to textures/base/pack/gui/upper_buttons_left_hover.png diff --git a/textures/base/pack/upper_buttons_left_selected.png b/textures/base/pack/gui/upper_buttons_left_selected.png similarity index 100% rename from textures/base/pack/upper_buttons_left_selected.png rename to textures/base/pack/gui/upper_buttons_left_selected.png diff --git a/textures/base/pack/upper_buttons_middle.png b/textures/base/pack/gui/upper_buttons_middle.png similarity index 100% rename from textures/base/pack/upper_buttons_middle.png rename to textures/base/pack/gui/upper_buttons_middle.png diff --git a/textures/base/pack/upper_buttons_middle_hover.png b/textures/base/pack/gui/upper_buttons_middle_hover.png similarity index 100% rename from textures/base/pack/upper_buttons_middle_hover.png rename to textures/base/pack/gui/upper_buttons_middle_hover.png diff --git a/textures/base/pack/upper_buttons_middle_selected.png b/textures/base/pack/gui/upper_buttons_middle_selected.png similarity index 100% rename from textures/base/pack/upper_buttons_middle_selected.png rename to textures/base/pack/gui/upper_buttons_middle_selected.png diff --git a/textures/base/pack/upper_buttons_right.png b/textures/base/pack/gui/upper_buttons_right.png similarity index 100% rename from textures/base/pack/upper_buttons_right.png rename to textures/base/pack/gui/upper_buttons_right.png diff --git a/textures/base/pack/upper_buttons_right_hover.png b/textures/base/pack/gui/upper_buttons_right_hover.png similarity index 100% rename from textures/base/pack/upper_buttons_right_hover.png rename to textures/base/pack/gui/upper_buttons_right_hover.png diff --git a/textures/base/pack/upper_buttons_right_selected.png b/textures/base/pack/gui/upper_buttons_right_selected.png similarity index 100% rename from textures/base/pack/upper_buttons_right_selected.png rename to textures/base/pack/gui/upper_buttons_right_selected.png diff --git a/textures/base/pack/select_btn.png b/textures/base/pack/select_btn.png deleted file mode 100644 index eb7a8e998..000000000 Binary files a/textures/base/pack/select_btn.png and /dev/null differ