X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstyle.cpp;fp=source%2Fstyle.cpp;h=44ad4144931daf223fb96e8bca478a35a4b8063a;hb=51fd0d0fe7ad8a617de8f71985e0c4cb60fec3a9;hp=001b36937e03f4ab03261043d3414ae9ce49060e;hpb=d9d787503ae41842309f74a2eabc5b848abe1f22;p=libs%2Fgltk.git diff --git a/source/style.cpp b/source/style.cpp index 001b369..44ad414 100644 --- a/source/style.cpp +++ b/source/style.cpp @@ -38,14 +38,21 @@ Style::Loader::Loader(Style &s, Resources &r): style.font_size = style.font->get_native_size(); } - add("font", &Style::font); + add("font", &Loader::font); add("font_color", &Loader::font_color); + add("font_size", &Style::font_size); add("part", static_cast(&Loader::part)); add("part", static_cast(&Loader::part)); // Deprecated alias add("special", static_cast(&Loader::part)); } +void Style::Loader::font(const string &n) +{ + style.font = &res.get(n); + style.font_size = style.font->get_native_size(); +} + void Style::Loader::font_color(float r, float g, float b) { style.font_color = GL::Color(r, g, b);