rename theme-related variables
This commit is contained in:
parent
fd2a59df2b
commit
3d8aec86a7
@ -5,15 +5,15 @@ disable_fire = true
|
||||
enable_mesh_cache = false
|
||||
moreblocks.stairsplus_in_creative_inventory = false
|
||||
|
||||
dreambuilder_form_bgcolor = #F0F0F0FF
|
||||
dreambuilder_btn_color = #B0B0B0FF
|
||||
dreambuilder_editor_text_color = #000000FF
|
||||
dreambuilder_editor_bg_color = #F0F0F0FF
|
||||
dreambuilder_listcolor_slot_bg_normal = #FFFFFF30
|
||||
dreambuilder_listcolor_slot_bg_hover = #B0B0B0
|
||||
dreambuilder_listcolor_slot_border = #606060
|
||||
dreambuilder_tooltip_bgcolor = #A0A0A0
|
||||
dreambuilder_tooltip_fontcolor = #FFF
|
||||
dreambuilder_window_darken = false
|
||||
dreambuilder_editor_border = false
|
||||
dreambuilder_image_button_borders = false
|
||||
dreambuilder_theme_form_bgcolor = #F0F0F0FF
|
||||
dreambuilder_theme_btn_color = #B0B0B0FF
|
||||
dreambuilder_theme_editor_text_color = #000000FF
|
||||
dreambuilder_theme_editor_bg_color = #F0F0F0FF
|
||||
dreambuilder_theme_listcolor_slot_bg_normal = #FFFFFF30
|
||||
dreambuilder_theme_listcolor_slot_bg_hover = #B0B0B0
|
||||
dreambuilder_theme_listcolor_slot_border = #606060
|
||||
dreambuilder_theme_tooltip_bgcolor = #A0A0A0
|
||||
dreambuilder_theme_tooltip_fontcolor = #FFF
|
||||
dreambuilder_theme_window_darken = false
|
||||
dreambuilder_theme_editor_border = false
|
||||
dreambuilder_theme_image_button_borders = false
|
||||
|
@ -16,19 +16,19 @@ default.get_translator = S
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
-- Set formspec prepend
|
||||
local formspec =
|
||||
"listcolors["..dreambuilder.listcolor_slot_bg_normal..
|
||||
";"..dreambuilder.listcolor_slot_bg_hover..
|
||||
";"..dreambuilder.listcolor_slot_border..
|
||||
";"..dreambuilder.tooltip_bgcolor..
|
||||
";"..dreambuilder.tooltip_fontcolor.."]"..
|
||||
"style_type[button;bgcolor="..dreambuilder.form_bgcolor.."]"..
|
||||
"style_type[button_exit;bgcolor="..dreambuilder.form_bgcolor.."]"..
|
||||
"style_type[image_button;bgcolor="..dreambuilder.form_bgcolor..
|
||||
";border="..dreambuilder.image_button_borders.."]"..
|
||||
"style_type[image_button_exit;bgcolor="..dreambuilder.form_bgcolor..
|
||||
";border="..dreambuilder.image_button_borders.."]"..
|
||||
"style_type[item_image_button;bgcolor="..dreambuilder.form_bgcolor..
|
||||
";border="..dreambuilder.image_button_borders.."]"
|
||||
"listcolors["..dreambuilder_theme.listcolor_slot_bg_normal..
|
||||
";"..dreambuilder_theme.listcolor_slot_bg_hover..
|
||||
";"..dreambuilder_theme.listcolor_slot_border..
|
||||
";"..dreambuilder_theme.tooltip_bgcolor..
|
||||
";"..dreambuilder_theme.tooltip_fontcolor.."]"..
|
||||
"style_type[button;bgcolor="..dreambuilder_theme.form_bgcolor.."]"..
|
||||
"style_type[button_exit;bgcolor="..dreambuilder_theme.form_bgcolor.."]"..
|
||||
"style_type[image_button;bgcolor="..dreambuilder_theme.form_bgcolor..
|
||||
";border="..dreambuilder_theme.image_button_borders.."]"..
|
||||
"style_type[image_button_exit;bgcolor="..dreambuilder_theme.form_bgcolor..
|
||||
";border="..dreambuilder_theme.image_button_borders.."]"..
|
||||
"style_type[item_image_button;bgcolor="..dreambuilder_theme.form_bgcolor..
|
||||
";border="..dreambuilder_theme.image_button_borders.."]"
|
||||
local name = player:get_player_name()
|
||||
local info = minetest.get_player_information(name)
|
||||
if info.formspec_version > 1 then
|
||||
@ -51,7 +51,7 @@ function default.get_hotbar_bg(x,y)
|
||||
return out
|
||||
end
|
||||
|
||||
default.gui_bg = "bgcolor["..dreambuilder.form_bgcolor..";"..dreambuilder.window_darken.."]"
|
||||
default.gui_bg = "bgcolor["..dreambuilder_theme.form_bgcolor..";"..dreambuilder_theme.window_darken.."]"
|
||||
|
||||
default.gui_survival_form = "size[8,8.5]"..
|
||||
default.gui_bg..
|
||||
|
@ -210,22 +210,22 @@ rm -rf $workdir/mods/worldedit_brush
|
||||
# Create the standard in-game lightly-shaded theme, expand on it, make it user-configurable
|
||||
|
||||
cat > /tmp/listcolors << 'EOF'
|
||||
"listcolors["..dreambuilder.listcolor_slot_bg_normal..
|
||||
";"..dreambuilder.listcolor_slot_bg_hover..
|
||||
";"..dreambuilder.listcolor_slot_border..
|
||||
";"..dreambuilder.tooltip_bgcolor..
|
||||
";"..dreambuilder.tooltip_fontcolor.."]"..
|
||||
"listcolors["..dreambuilder_theme.listcolor_slot_bg_normal..
|
||||
";"..dreambuilder_theme.listcolor_slot_bg_hover..
|
||||
";"..dreambuilder_theme.listcolor_slot_border..
|
||||
";"..dreambuilder_theme.tooltip_bgcolor..
|
||||
";"..dreambuilder_theme.tooltip_fontcolor.."]"..
|
||||
EOF
|
||||
|
||||
cat > /tmp/herefileA << 'EOF'
|
||||
"style_type[button;bgcolor="..dreambuilder.form_bgcolor.."]"..
|
||||
"style_type[button_exit;bgcolor="..dreambuilder.form_bgcolor.."]"..
|
||||
"style_type[image_button;bgcolor="..dreambuilder.form_bgcolor..
|
||||
";border="..dreambuilder.image_button_borders.."]"..
|
||||
"style_type[image_button_exit;bgcolor="..dreambuilder.form_bgcolor..
|
||||
";border="..dreambuilder.image_button_borders.."]"..
|
||||
"style_type[item_image_button;bgcolor="..dreambuilder.form_bgcolor..
|
||||
";border="..dreambuilder.image_button_borders.."]"
|
||||
"style_type[button;bgcolor="..dreambuilder_theme.form_bgcolor.."]"..
|
||||
"style_type[button_exit;bgcolor="..dreambuilder_theme.form_bgcolor.."]"..
|
||||
"style_type[image_button;bgcolor="..dreambuilder_theme.form_bgcolor..
|
||||
";border="..dreambuilder_theme.image_button_borders.."]"..
|
||||
"style_type[image_button_exit;bgcolor="..dreambuilder_theme.form_bgcolor..
|
||||
";border="..dreambuilder_theme.image_button_borders.."]"..
|
||||
"style_type[item_image_button;bgcolor="..dreambuilder_theme.form_bgcolor..
|
||||
";border="..dreambuilder_theme.image_button_borders.."]"
|
||||
EOF
|
||||
|
||||
mv $workdir"/mods/dreambuilder_extras/minetest.conf" $workdir
|
||||
@ -243,7 +243,7 @@ sed -i '/Set formspec prepend/ {
|
||||
}' $workdir"/mods/default/init.lua"
|
||||
|
||||
sed -i '/default.gui_survival_form/ {
|
||||
i default.gui_bg = "bgcolor["..dreambuilder.form_bgcolor..";"..dreambuilder.window_darken.."]"\n
|
||||
i default.gui_bg = "bgcolor["..dreambuilder_theme.form_bgcolor..";"..dreambuilder_theme.window_darken.."]"\n
|
||||
a \\t\t\tdefault.gui_bg..
|
||||
}' $workdir"/mods/default/init.lua"
|
||||
|
||||
@ -252,19 +252,19 @@ echo "depends = dreambuilder_gui_theming" >> $workdir"/mods/default/mod.conf"
|
||||
|
||||
|
||||
sed -i 's/"style_type\[.*\]"/"style_type[label,textarea;font=mono]" \
|
||||
\t\t.."style_type[textarea;textcolor="..dreambuilder.form_bgcolor..";border="..dreambuilder.editor_border.."]"/' \
|
||||
\t\t.."style_type[textarea;textcolor="..dreambuilder_theme.form_bgcolor..";border="..dreambuilder_theme.editor_border.."]"/' \
|
||||
$workdir"/mods/mesecons_luacontroller/init.lua"
|
||||
|
||||
sed -i "0,/depends =/s//depends = dreambuilder_gui_theming, /" $workdir"/mods/mesecons/mod.conf"
|
||||
|
||||
sed -i 's/"size\[8,9\]" \.\./"size[8,9]" .. \
|
||||
\t\t"image[-0.39,-0.4;10.7,11.4;default_chest_inv_bg.png]".. \
|
||||
\t\t"listcolors[#00000000;#00000000;#00000000;"..dreambuilder.tooltip_bgcolor..";"..dreambuilder.tooltip_fontcolor.."]"../' \
|
||||
\t\t"listcolors[#00000000;#00000000;#00000000;"..dreambuilder_theme.tooltip_bgcolor..";"..dreambuilder_theme.tooltip_fontcolor.."]"../' \
|
||||
$workdir"/mods/pipeworks/compat-chests.lua"
|
||||
|
||||
sed -i 's/"size\[8,8.5\]"\.\./"size[8,8.5]".. \
|
||||
\t\t"image[-0.39,-0.4;10.7,10.9;default_furnace_inv_bg.png]".. \
|
||||
\t\t"listcolors[#00000000;#00000000;#00000000;"..dreambuilder.tooltip_bgcolor..";"..dreambuilder.tooltip_fontcolor.."]"../' \
|
||||
\t\t"listcolors[#00000000;#00000000;#00000000;"..dreambuilder_theme.tooltip_bgcolor..";"..dreambuilder_theme.tooltip_fontcolor.."]"../' \
|
||||
$workdir"/mods/pipeworks/compat-furnaces.lua"
|
||||
|
||||
sed -i "0, /depends = /s//depends = dreambuilder_gui_theming, /" $workdir"/mods/pipeworks/mod.conf"
|
||||
@ -272,7 +272,7 @@ sed -i "0, /depends = /s//depends = dreambuilder_gui_theming, /" $workdir"/mods/
|
||||
|
||||
sed -i 's/"size\[8,7;\]" ../"size[8,7]" .. \
|
||||
\t"image[-0.39,-0.4;10.7,9.1;vessels_inv_bg.png]".. \
|
||||
\t"listcolors[#00000000;#00000000;#00000000;"..dreambuilder.tooltip_bgcolor..";"..dreambuilder.tooltip_fontcolor.."]"../' \
|
||||
\t"listcolors[#00000000;#00000000;#00000000;"..dreambuilder_theme.tooltip_bgcolor..";"..dreambuilder_theme.tooltip_fontcolor.."]"../' \
|
||||
$workdir"/mods/vessels/init.lua"
|
||||
|
||||
sed -i "0, /depends = /s//depends = dreambuilder_gui_theming, /" $workdir"/mods/vessels/mod.conf"
|
||||
@ -296,7 +296,7 @@ sed -i 's/"field\[.*")/ \
|
||||
|
||||
|
||||
sed -i '/local n = 4/ {
|
||||
i \\tformspec[4]="style_type[image_button;bgcolor="..dreambuilder.form_bgcolor.."]"
|
||||
i \\tformspec[4]="style_type[image_button;bgcolor="..dreambuilder_theme.form_bgcolor.."]"
|
||||
i \\tlocal n = 5
|
||||
d
|
||||
}' $workdir"/mods/unified_inventory/internal.lua"
|
||||
|
@ -1,22 +1,26 @@
|
||||
-- Dreambuilder theming mod
|
||||
-- really all this does is preload the global config and supply some textures :P
|
||||
-- colors can be changed with your local minetest.conf
|
||||
-- really all this does is preload the global config
|
||||
-- and supply some stock textures :P
|
||||
--
|
||||
-- Colors can be changed with your local minetest.conf, or you can skip that
|
||||
-- and instead add a whole theme mod to override the colors and images
|
||||
-- supplied by this component.
|
||||
|
||||
dreambuilder = {}
|
||||
dreambuilder_theme = {}
|
||||
|
||||
dreambuilder.form_bgcolor = minetest.settings:get("dreambuilder_form_bgcolor")
|
||||
dreambuilder_theme.form_bgcolor = minetest.settings:get("dreambuilder_theme_form_bgcolor")
|
||||
|
||||
dreambuilder.btn_color = minetest.settings:get("dreambuilder_btn_color")
|
||||
dreambuilder.editor_text_color = minetest.settings:get("dreambuilder_editor_text_color")
|
||||
dreambuilder.editor_bg_color = minetest.settings:get("dreambuilder_editor_bg_color")
|
||||
dreambuilder.listcolor_slot_bg_normal = minetest.settings:get("dreambuilder_listcolor_slot_bg_normal")
|
||||
dreambuilder.listcolor_slot_bg_hover = minetest.settings:get("dreambuilder_listcolor_slot_bg_hover")
|
||||
dreambuilder.listcolor_slot_border = minetest.settings:get("dreambuilder_listcolor_slot_border")
|
||||
dreambuilder.tooltip_bgcolor = minetest.settings:get("dreambuilder_tooltip_bgcolor")
|
||||
dreambuilder.tooltip_fontcolor = minetest.settings:get("dreambuilder_tooltip_fontcolor")
|
||||
dreambuilder_theme.btn_color = minetest.settings:get("dreambuilder_theme_btn_color")
|
||||
dreambuilder_theme.editor_text_color = minetest.settings:get("dreambuilder_theme_editor_text_color")
|
||||
dreambuilder_theme.editor_bg_color = minetest.settings:get("dreambuilder_theme_editor_bg_color")
|
||||
dreambuilder_theme.listcolor_slot_bg_normal = minetest.settings:get("dreambuilder_theme_listcolor_slot_bg_normal")
|
||||
dreambuilder_theme.listcolor_slot_bg_hover = minetest.settings:get("dreambuilder_theme_listcolor_slot_bg_hover")
|
||||
dreambuilder_theme.listcolor_slot_border = minetest.settings:get("dreambuilder_theme_listcolor_slot_border")
|
||||
dreambuilder_theme.tooltip_bgcolor = minetest.settings:get("dreambuilder_theme_tooltip_bgcolor")
|
||||
dreambuilder_theme.tooltip_fontcolor = minetest.settings:get("dreambuilder_theme_tooltip_fontcolor")
|
||||
|
||||
-- where these three are used, strings are needed, not actual bools.
|
||||
|
||||
dreambuilder.window_darken = minetest.settings:get_bool("dreambuilder_window_darken") and "true" or "false"
|
||||
dreambuilder.editor_border = minetest.settings:get_bool("dreambuilder_editor_border") and "true" or "false"
|
||||
dreambuilder.image_button_borders = minetest.settings:get_bool("dreambuilder_image_button_borders") and "true" or "false"
|
||||
dreambuilder_theme.window_darken = minetest.settings:get_bool("dreambuilder_theme_window_darken") and "true" or "false"
|
||||
dreambuilder_theme.editor_border = minetest.settings:get_bool("dreambuilder_theme_editor_border") and "true" or "false"
|
||||
dreambuilder_theme.image_button_borders = minetest.settings:get_bool("dreambuilder_theme_image_button_borders") and "true" or "false"
|
||||
|
@ -665,7 +665,7 @@ local function reset_formspec(meta, code, errmsg)
|
||||
errmsg = minetest.formspec_escape(tostring(errmsg or ""))
|
||||
meta:set_string("formspec", "size[12,10]"
|
||||
.."style_type[label,textarea;font=mono]"
|
||||
.."style_type[textarea;textcolor="..dreambuilder.form_bgcolor..";border="..dreambuilder.editor_border.."]"
|
||||
.."style_type[textarea;textcolor="..dreambuilder_theme.form_bgcolor..";border="..dreambuilder_theme.editor_border.."]"
|
||||
.."background[-0.2,-0.25;12.4,10.75;jeija_luac_background.png]"
|
||||
.."label[0.1,8.3;"..errmsg.."]"
|
||||
.."textarea[0.2,0.2;12.2,9.5;code;;"..code.."]"
|
||||
|
@ -16,7 +16,7 @@ local function get_chest_formspec(pos)
|
||||
local formspec =
|
||||
"size[8,9]" ..
|
||||
"image[-0.39,-0.4;10.7,11.4;default_chest_inv_bg.png]"..
|
||||
"listcolors[#00000000;#00000000;#00000000;"..dreambuilder.tooltip_bgcolor..";"..dreambuilder.tooltip_fontcolor.."]"..
|
||||
"listcolors[#00000000;#00000000;#00000000;"..dreambuilder_theme.tooltip_bgcolor..";"..dreambuilder_theme.tooltip_fontcolor.."]"..
|
||||
default.gui_bg ..
|
||||
default.gui_bg_img ..
|
||||
default.gui_slots ..
|
||||
|
@ -13,7 +13,7 @@ local function active_formspec(fuel_percent, item_percent, pos, meta)
|
||||
local formspec =
|
||||
"size[8,8.5]"..
|
||||
"image[-0.39,-0.4;10.7,10.9;default_furnace_inv_bg.png]"..
|
||||
"listcolors[#00000000;#00000000;#00000000;"..dreambuilder.tooltip_bgcolor..";"..dreambuilder.tooltip_fontcolor.."]"..
|
||||
"listcolors[#00000000;#00000000;#00000000;"..dreambuilder_theme.tooltip_bgcolor..";"..dreambuilder_theme.tooltip_fontcolor.."]"..
|
||||
default.gui_bg..
|
||||
default.gui_bg_img..
|
||||
default.gui_slots..
|
||||
@ -48,7 +48,7 @@ end
|
||||
local function inactive_formspec(pos, meta)
|
||||
local formspec = "size[8,8.5]"..
|
||||
"image[-0.39,-0.4;10.7,10.9;default_furnace_inv_bg.png]"..
|
||||
"listcolors[#00000000;#00000000;#00000000;"..dreambuilder.tooltip_bgcolor..";"..dreambuilder.tooltip_fontcolor.."]"..
|
||||
"listcolors[#00000000;#00000000;#00000000;"..dreambuilder_theme.tooltip_bgcolor..";"..dreambuilder_theme.tooltip_fontcolor.."]"..
|
||||
default.gui_bg..
|
||||
default.gui_bg_img..
|
||||
default.gui_slots..
|
||||
|
@ -67,7 +67,7 @@ function unified_inventory.get_formspec(player, page)
|
||||
pagedef.formspec_prepend and "" or "no_prepend[]",
|
||||
unified_inventory.standard_background -- Background
|
||||
}
|
||||
formspec[4]="style_type[image_button;bgcolor="..dreambuilder.form_bgcolor.."]"
|
||||
formspec[4]="style_type[image_button;bgcolor="..dreambuilder_theme.form_bgcolor.."]"
|
||||
local n = 5
|
||||
|
||||
if draw_lite_mode then
|
||||
|
@ -10,7 +10,7 @@ local S = minetest.get_translator("vessels")
|
||||
local vessels_shelf_formspec =
|
||||
"size[8,7]" ..
|
||||
"image[-0.39,-0.4;10.7,9.1;vessels_inv_bg.png]"..
|
||||
"listcolors[#00000000;#00000000;#00000000;"..dreambuilder.tooltip_bgcolor..";"..dreambuilder.tooltip_fontcolor.."]"..
|
||||
"listcolors[#00000000;#00000000;#00000000;"..dreambuilder_theme.tooltip_bgcolor..";"..dreambuilder_theme.tooltip_fontcolor.."]"..
|
||||
"list[context;vessels;0,0.3;8,2;]" ..
|
||||
"list[current_player;main;0,2.85;8,1;]" ..
|
||||
"list[current_player;main;0,4.08;8,3;8]" ..
|
||||
|
@ -81,47 +81,47 @@ enable_weather (Enable weather) bool true
|
||||
# Formspecs will use this color for the background if for some reason the
|
||||
# standard background image either doesn't show on a particular form, or if a
|
||||
#form uses one with transparent parts.
|
||||
dreambuilder_form_bgcolor (Dreambuilder theme, fallback form background color) string #F0F0F0FF
|
||||
dreambuilder_theme_form_bgcolor (Dreambuilder theme, fallback form background color) string `#F0F0F0FF
|
||||
|
||||
# Plain text buttons will be this color
|
||||
dreambuilder_btn_color (Dreambuilder theme, text button color) string #B0B0B0FF
|
||||
dreambuilder_theme_btn_color (Dreambuilder theme, text button color) string #B0B0B0FF
|
||||
|
||||
# Mods that use an editable "textarea" widget will have this for the font
|
||||
# color on top of whatever text drop shadow Minetest is configured to show.
|
||||
dreambuilder_editor_text_color (Dreambuilder theme, textarea font color) string #000000FF
|
||||
dreambuilder_theme_editor_text_color (Dreambuilder theme, textarea font color) string #000000FF
|
||||
|
||||
# Mods that use an editable "textarea" widget but lack a background image will
|
||||
# use this for the background color.
|
||||
dreambuilder_editor_bg_color (Dreambuilder theme, textarea background color) string #F0F0F0FF
|
||||
dreambuilder_theme_editor_bg_color (Dreambuilder theme, textarea background color) string #F0F0F0FF
|
||||
|
||||
# On forms that have inventory slots but which don't use background image,
|
||||
# this color will be used for the slots.
|
||||
dreambuilder_listcolor_slot_bg_normal (Dreambuilder theme, inventory slot main color) string #FFFFFF30
|
||||
dreambuilder_theme_listcolor_slot_bg_normal (Dreambuilder theme, inventory slot main color) string #FFFFFF30
|
||||
|
||||
# On forms that have inventory slots but which don't use background image,
|
||||
# this color will be used when hovering the mouse over an inventory slot.
|
||||
dreambuilder_listcolor_slot_bg_hover (Dreambuilder theme, inventory slot mouseover color) string #B0B0B0
|
||||
dreambuilder_theme_listcolor_slot_bg_hover (Dreambuilder theme, inventory slot mouseover color) string #B0B0B0
|
||||
|
||||
# On forms that have inventory slots but which don't use background image,
|
||||
# this color will be used for the slots' borders.
|
||||
dreambuilder_listcolor_slot_border (Dreambuilder theme, inventory slot border color) string #606060
|
||||
dreambuilder_theme_listcolor_slot_border (Dreambuilder theme, inventory slot border color) string #606060
|
||||
|
||||
# Where possible, tooltips will use this background color.
|
||||
dreambuilder_tooltip_bgcolor (Dreambuilder theme, tooltip background color) string #A0A0A0
|
||||
dreambuilder_theme_tooltip_bgcolor (Dreambuilder theme, tooltip background color) string #A0A0A0
|
||||
|
||||
# Where possible, tooltips' font will use this color, on top of whatever drop
|
||||
# shadow is configured for Minetest in general.
|
||||
dreambuilder_tooltip_fontcolor (Dreambuilder theme, tooltip font color) string #FFF
|
||||
dreambuilder_theme_tooltip_fontcolor (Dreambuilder theme, tooltip font color) string #FFF
|
||||
|
||||
# If this is set to true, all forms/GUI will darken the rest of the window
|
||||
# when they are shown.
|
||||
dreambuilder_window_darken (Dreambuilder theme, formspecs darken the whole window) bool false
|
||||
dreambuilder_theme_window_darken (Dreambuilder theme, formspecs darken the whole window) bool false
|
||||
|
||||
# If this is set to true, editable textarea widgets will be given a dark
|
||||
# border.
|
||||
dreambuilder_editor_border (Dreambuilder theme, textarea border) bool false
|
||||
dreambuilder_theme_editor_border (Dreambuilder theme, textarea border) bool false
|
||||
|
||||
# If this is set to true, standard image buttons will have a dark, hardcoded
|
||||
# gradient background. If false, buttons will have a relatively flat
|
||||
# background color instead.
|
||||
dreambuilder_image_button_borders (Dreambuilder theme, use dark image button background) bool false
|
||||
dreambuilder_theme_image_button_borders (Dreambuilder theme, use dark image button background) bool false
|
||||
|
Loading…
x
Reference in New Issue
Block a user