]> git.tdb.fi Git - libs/gltk.git/blob - source/style.cpp
Reorder class members
[libs/gltk.git] / source / style.cpp
1 /* $Id$
2
3 This file is part of libmspgltk
4 Copyright © 2007  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #include "resources.h"
9 #include "style.h"
10
11 using namespace std;
12
13 namespace Msp {
14 namespace GLtk {
15
16 Style::Style():
17         font(0)
18 { }
19
20
21 Style::Loader::Loader(Style &s, Resources &r):
22         style(s),
23         res(r)
24 {
25         add("font",       &Style::font);
26         add("font_color", &Loader::font_color);
27         add("part",       &Loader::part);
28 }
29
30 void Style::Loader::font_color(float r, float g, float b)
31 {
32         style.font_color=GL::Color(r, g, b);
33 }
34
35 void Style::Loader::part(const string &n)
36 {
37         Part p(n);
38         load_sub(p, res);
39         style.parts.push_back(p);
40 }
41
42 } // namespace GLtk
43 } // namespace Msp