]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/resources.cpp
Change Style so it doesn't need a special loading function
[libs/gltk.git] / source / resources.cpp
index b7586e886ee41df0eb711230c1ebe4bfcba8402c..3e0f851d701e3b961a38b564a1280507861f0d77 100644 (file)
@@ -12,6 +12,7 @@ Resources::Resources():
        add_type<Graphic>().keyword("graphic");
        add_type<GL::Texture2D>().keyword("texture");
        add_type<GL::Font>().keyword("font");
+       add_type<Style>().keyword("style");
 }
 
 const GL::Font &Resources::get_default_font() const
@@ -29,7 +30,6 @@ Resources::Loader::Loader(Resources &r):
 {
        add("default_font", &Loader::default_font);
        add("font", &Loader::font);
-       add("style", &Loader::style);
 }
 
 void Resources::Loader::default_font(const string &name)
@@ -47,13 +47,5 @@ void Resources::Loader::font(const string &name)
        fnt.release();
 }
 
-void Resources::Loader::style(const string &name)
-{
-       RefPtr<Style> stl = new Style(res);
-       load_sub(*stl, res);
-       res.add(name, stl.get());
-       stl.release();
-}
-
 } // namespace GLtk
 } // namespace Msp