+void Appearance::merge_from(const Appearance &other)
+{
+ if(other.font_size)
+ font_size = other.font_size;
+ if(other.border_color.defined)
+ border_color = other.border_color;
+ if(other.background_color.defined)
+ background_color = other.background_color;
+ if(other.text_color.defined)
+ text_color = other.text_color;
+ if(other.sound_type)
+ {
+ sound_type = other.sound_type;
+ sound_volume = other.sound_volume;
+ }
+}
+
+void Appearance::add_lines(FilterStatement &st) const
+{
+ if(font_size)
+ st.add_line(format("SetFontSize %d", font_size));
+
+ if(background_color.defined)
+ 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 %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 %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));
+}
+
+
+Appearance::Loader::Loader(Appearance &a, const Theme *t):