From 1b3e4e173624bb2523d4386aeef6987709d9b022 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Tue, 29 Aug 2017 19:25:16 +0200 Subject: Formspec: Add options to set background color and opacity (fullscreen mode + default mode) (#5493) * Formspec: Add options to set background color and opacity (fullscreen mode) * Enhance previous comment: Set formspec background when regenerate UI. * This permit to do the calcul only at regen and override it with bgcolor tag * Add a setting for default background color into formspec, separated from fullscreen * Add a little performance gain on formspecs using a const ref instead of copying formspec string --- src/defaultsettings.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/defaultsettings.cpp') diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 502223fcd..2a3003f76 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -187,6 +187,10 @@ void set_default_settings(Settings *settings) settings->setDefault("console_height", "1.0"); settings->setDefault("console_color", "(0,0,0)"); settings->setDefault("console_alpha", "200"); + settings->setDefault("formspec_fullscreen_bg_color", "(0,0,0)"); + settings->setDefault("formspec_fullscreen_bg_opacity", "140"); + settings->setDefault("formspec_default_bg_color", "(0,0,0)"); + settings->setDefault("formspec_default_bg_opacity", "140"); settings->setDefault("selectionbox_color", "(0,0,0)"); settings->setDefault("selectionbox_width", "2"); settings->setDefault("node_highlighting", "box"); -- cgit v1.2.3