X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstyle.cpp;h=0d6e424e2163b048d65c3c76af46b7792cb87acc;hb=a87d05583cb7dffaf0e0f5eb9f9b2fc0bcf656e1;hp=b4ee82d10eff5d1e454ebf767430d0edd941ed17;hpb=d7ae291415a21cc886fe318070b41ac8d3e57a30;p=libs%2Fgltk.git diff --git a/source/style.cpp b/source/style.cpp index b4ee82d..0d6e424 100644 --- a/source/style.cpp +++ b/source/style.cpp @@ -1,3 +1,10 @@ +/* $Id$ + +This file is part of libmspgltk +Copyright © 2007 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + #include "resources.h" #include "style.h" @@ -6,8 +13,8 @@ using namespace std; namespace Msp { namespace GLtk { -Style::Style(): - font(0) +Style::Style(Resources &r): + font(&r.get_default_font()) { } @@ -18,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) @@ -25,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);