+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;
+ }
+ if(other.show_icon)
+ {
+ show_icon = true;
+ icon_shape = other.icon_shape;
+ icon_color = other.icon_color;
+ icon_size = other.icon_size;
+ }
+ if(other.show_beam)
+ {
+ show_beam = true;
+ beam_color = other.beam_color;
+ }
+}
+
+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(show_icon)
+ st.add_line(format("MinimapIcon %d %s %s", icon_size, icon_color, icon_shape));
+
+ if(sound_type)
+ {
+ st.add_line(format("PlayAlertSound %d %d", sound_type, sound_volume));
+ st.add_line("DisableDropSound");
+ }
+
+ if(show_beam)
+ st.add_line(format("PlayEffect %s", beam_color));
+}
+
+
+Appearance::Loader::Loader(Appearance &a, const Theme *t):