X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstyle.cpp;fp=source%2Fstyle.cpp;h=da772dc8d21051148ff1aa22f372e3a6590812cc;hb=5e8285302c1d04b631682a82d56c5afc46d20ad5;hp=44ad4144931daf223fb96e8bca478a35a4b8063a;hpb=51fd0d0fe7ad8a617de8f71985e0c4cb60fec3a9;p=libs%2Fgltk.git diff --git a/source/style.cpp b/source/style.cpp index 44ad414..da772dc 100644 --- a/source/style.cpp +++ b/source/style.cpp @@ -29,13 +29,12 @@ const Part *Style::get_part(const string &name) const Style::Loader::Loader(Style &s, Resources &r): - style(s), - res(r) + DataFile::CollectionObjectLoader(s, &r) { - if(!style.font) + if(!obj.font) { - style.font = &r.get_default_font(); - style.font_size = style.font->get_native_size(); + obj.font = &get_collection().get_default_font(); + obj.font_size = obj.font->get_native_size(); } add("font", &Loader::font); @@ -49,13 +48,13 @@ Style::Loader::Loader(Style &s, Resources &r): void Style::Loader::font(const string &n) { - style.font = &res.get(n); - style.font_size = style.font->get_native_size(); + obj.font = &get_collection().get(n); + obj.font_size = obj.font->get_native_size(); } void Style::Loader::font_color(float r, float g, float b) { - style.font_color = GL::Color(r, g, b); + obj.font_color = GL::Color(r, g, b); } void Style::Loader::part() @@ -66,8 +65,8 @@ void Style::Loader::part() void Style::Loader::part(const string &n) { Part p(n); - load_sub(p, res); - style.parts.push_back(p); + load_sub(p, get_collection()); + obj.parts.push_back(p); } } // namespace GLtk