st.add_line(format("SetFontSize %d", font_size));
if(background_color.defined)
- st.add_line(format("SetBackgroundColor %d %d %d", background_color.r, background_color.g, background_color.b));
+ st.add_line(format("SetBackgroundColor %d %d %d %d", background_color.r, background_color.g, background_color.b, background_color.a));
if(border_color.defined)
- st.add_line(format("SetBorderColor %d %d %d", border_color.r, border_color.g, border_color.b));
+ st.add_line(format("SetBorderColor %d %d %d %d", border_color.r, border_color.g, border_color.b, border_color.a));
if(text_color.defined)
- st.add_line(format("SetTextColor %d %d %d", text_color.r, text_color.g, text_color.b));
+ st.add_line(format("SetTextColor %d %d %d %d", text_color.r, text_color.g, text_color.b, text_color.a));
if(sound_type)
st.add_line(format("PlayAlertSound %d %d", sound_type, sound_volume));
{
add("alert_sound", &Appearance::sound_type, &Appearance::sound_volume);
add("background_color", &Loader::background_color);
+ add("background_color", &Loader::background_color_alpha);
add("background_color", &Loader::background_color_named);
add("border_color", &Loader::border_color);
+ add("border_color", &Loader::border_color_alpha);
add("border_color", &Loader::border_color_named);
add("font_size", &Loader::font_size);
+ add("inherit", &Loader::inherit);
add("text_color", &Loader::text_color);
+ add("text_color", &Loader::text_color_alpha);
add("text_color", &Loader::text_color_named);
}
obj.background_color = Color(r, g, b);
}
+void Appearance::Loader::background_color_alpha(unsigned r, unsigned g, unsigned b, unsigned a)
+{
+ obj.background_color = Color(r, g, b, a);
+}
+
void Appearance::Loader::background_color_named(const string &name)
{
if(!theme)
obj.border_color = Color(r, g, b);
}
+void Appearance::Loader::border_color_alpha(unsigned r, unsigned g, unsigned b, unsigned a)
+{
+ obj.border_color = Color(r, g, b, a);
+}
+
void Appearance::Loader::border_color_named(const string &name)
{
if(!theme)
obj.font_size = base_size*s+0.5f;
}
+void Appearance::Loader::inherit(const string &name)
+{
+ if(!theme)
+ throw logic_error("No theme");
+ obj = theme->get_appearance(name);
+}
+
void Appearance::Loader::text_color(unsigned r, unsigned g, unsigned b)
{
obj.text_color = Color(r, g, b);
}
+void Appearance::Loader::text_color_alpha(unsigned r, unsigned g, unsigned b, unsigned a)
+{
+ obj.text_color = Color(r, g, b, a);
+}
+
void Appearance::Loader::text_color_named(const string &name)
{
if(!theme)