14 const GL::Font &Style::get_font() const
17 throw logic_error("!font");
21 const Part *Style::get_part(const string &name) const
23 for(PartSeq::const_iterator i=parts.begin(); i!=parts.end(); ++i)
24 if(i->get_name()==name)
31 Style::Loader::Loader(Style &s, Resources &r):
37 style.font = &r.get_default_font();
38 style.font_size = style.font->get_native_size();
41 add("font", &Style::font);
42 add("font_color", &Loader::font_color);
43 add("part", static_cast<void (Loader::*)()>(&Loader::part));
44 add("part", static_cast<void (Loader::*)(const std::string &)>(&Loader::part));
46 add("special", static_cast<void (Loader::*)(const std::string &)>(&Loader::part));
49 void Style::Loader::font_color(float r, float g, float b)
51 style.font_color = GL::Color(r, g, b);
54 void Style::Loader::part()
59 void Style::Loader::part(const string &n)
63 style.parts.push_back(p);