X-Git-Url: http://git.tdb.fi/?p=libs%2Fgltk.git;a=blobdiff_plain;f=source%2Fstyle.cpp;h=0d6e424e2163b048d65c3c76af46b7792cb87acc;hp=6c116570fe24677fbb9002eb3061d2e3f7f0c9c2;hb=ed9873ba7ee862ad76937f579fe371c1a27d5715;hpb=2f1c7d6861c801e24a003ee5f6132032e04c9bbe diff --git a/source/style.cpp b/source/style.cpp index 6c11657..0d6e424 100644 --- a/source/style.cpp +++ b/source/style.cpp @@ -13,8 +13,8 @@ using namespace std; namespace Msp { namespace GLtk { -Style::Style(): - font(0) +Style::Style(Resources &r): + font(&r.get_default_font()) { } @@ -25,6 +25,7 @@ Style::Loader::Loader(Style &s, Resources &r): add("font", &Style::font); add("font_color", &Loader::font_color); add("part", &Loader::part); + add("special", &Loader::special); } void Style::Loader::font_color(float r, float g, float b) @@ -32,7 +33,14 @@ void Style::Loader::font_color(float r, float g, float b) style.font_color=GL::Color(r, g, b); } -void Style::Loader::part(const string &n) +void Style::Loader::part() +{ + Part p((string())); + load_sub(p, res); + style.parts.push_back(p); +} + +void Style::Loader::special(const string &n) { Part p(n); load_sub(p, res);