X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fstyle.cpp;h=b4ee82d10eff5d1e454ebf767430d0edd941ed17;hb=d7ae291415a21cc886fe318070b41ac8d3e57a30;hp=3f276ed409add4799212373abbfd2c45202b0deb;hpb=131ac8ff2c06f94d40f4bf98d4a6ec0d113cdffc;p=libs%2Fgltk.git diff --git a/source/style.cpp b/source/style.cpp index 3f276ed..b4ee82d 100644 --- a/source/style.cpp +++ b/source/style.cpp @@ -6,36 +6,29 @@ using namespace std; namespace Msp { namespace GLtk { -Style::Style(const Resources &r, const string &w, const string &n): - res(r), - widget(w), - name(n), - font(&res.get_default_font()) +Style::Style(): + font(0) { } -Style::Loader::Loader(Style &s): - style(s) +Style::Loader::Loader(Style &s, Resources &r): + style(s), + res(r) { - add("font", &Loader::font); + add("font", &Style::font); add("font_color", &Loader::font_color); - add("part", &Loader::part); -} - -void Style::Loader::font(const string &f) -{ - style.font=&style.res.get_font(f); + add("part", &Loader::part); } void Style::Loader::font_color(float r, float g, float b) { - style.font_color=Color(r, g, b); + style.font_color=GL::Color(r, g, b); } void Style::Loader::part(const string &n) { - Part p(style.res, n); - load_sub(p); + Part p(n); + load_sub(p, res); style.parts.push_back(p); }