add "high contrast" theme

minor theme handling fixes
master
Vanessa Dannenberg 2021-03-10 21:15:33 -05:00
parent 4edb2404f1
commit 4b1032e528
24 changed files with 62 additions and 13 deletions

View File

@ -0,0 +1,32 @@
if dreambuilder_theme.name ~= "dbtheme_high_contrast" then return end
print("[Dreambuilder] Activated \"high_contrast\" theme")
dreambuilder_theme.high_contrast = {
["form_bgcolor"] = "#404040FF",
["btn_color"] = "#101010FF",
["editor_text_color"] = "#FFFFFF",
["editor_bg_color"] = "#000000FF",
["listcolor_slot_bg_normal"] = "#FFFFFF80",
["listcolor_slot_bg_hover"] = "#FFFFFFFF",
["listcolor_slot_border"] = "#000000",
["tooltip_bgcolor"] = "#FFFFFF",
["tooltip_fontcolor"] = "#000",
["window_darken"] = "true",
["editor_border"] = "true",
["image_button_borders"] = "true"
}
for k,v in pairs(dreambuilder_theme.high_contrast) do
dreambuilder_theme[k] = v
end
minetest.register_on_joinplayer(function(player)
default.gui_bg = dreambuilder_theme.get_default_gui_bg(dreambuilder_theme)
default.gui_survival_form = dreambuilder_theme.get_default_gui_survival_form(dreambuilder_theme)
dreambuilder_theme.set_formspec_prepend(player, dreambuilder_theme)
end)

View File

@ -0,0 +1,3 @@
name = dreambuilder_theme_high_contrast
description = "High contrast" theme for Dreambuilder
depends = dreambuilder_theme_settings

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 985 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

View File

@ -1,18 +1,32 @@
dreambuilder_theme.name = "dbtheme_light"
if dreambuilder_theme.name ~= "dbtheme_light" then return end
dreambuilder_theme.form_bgcolor = "#F0F0F0FF"
dreambuilder_theme.btn_color = "#B0B0B0FF"
print("[Dreambuilder] Activated \"light\" theme")
dreambuilder_theme.editor_text_color = "#000000FF"
dreambuilder_theme.editor_bg_color = "#F0F0F0FF"
dreambuilder_theme.light = {
["form_bgcolor"] = "#F0F0F0FF",
["btn_color"] = "#B0B0B0FF",
dreambuilder_theme.listcolor_slot_bg_normal = "#FFFFFF30"
dreambuilder_theme.listcolor_slot_bg_hover = "#FFFFFF80"
dreambuilder_theme.listcolor_slot_border = "#606060"
["editor_text_color"] = "#000000FF",
["editor_bg_color"] = "#F0F0F0FF",
dreambuilder_theme.tooltip_bgcolor = "#A0A0A0"
dreambuilder_theme.tooltip_fontcolor = "#FFF"
["listcolor_slot_bg_normal"] = "#FFFFFF30",
["listcolor_slot_bg_hover"] = "#FFFFFF80",
["listcolor_slot_border"] = "#606060",
dreambuilder_theme.window_darken = "false"
dreambuilder_theme.editor_border = "false"
dreambuilder_theme.image_button_borders = "false"
["tooltip_bgcolor"] = "#A0A0A0",
["tooltip_fontcolor"] = "#FFF",
["window_darken"] = "false",
["editor_border"] = "false",
["image_button_borders"] = "false"
}
for k,v in pairs(dreambuilder_theme.light) do
dreambuilder_theme[k] = v
end
minetest.register_on_joinplayer(function(player)
default.gui_bg = dreambuilder_theme.get_default_gui_bg(dreambuilder_theme)
default.gui_survival_form = dreambuilder_theme.get_default_gui_survival_form(dreambuilder_theme)
dreambuilder_theme.set_formspec_prepend(player, dreambuilder_theme)
end)