]> git.tdb.fi Git - libs/gltk.git/commitdiff
Adapt to DataFile changes
authorMikko Rasa <tdb@tdb.fi>
Fri, 2 Nov 2007 20:22:42 +0000 (20:22 +0000)
committerMikko Rasa <tdb@tdb.fi>
Fri, 2 Nov 2007 20:22:42 +0000 (20:22 +0000)
source/graphic.cpp
source/part.cpp
source/resources.cpp
source/widget.cpp

index 3579610bf7a640696e4f97bbf928f828b252168f..611cdb4c790c4a4e16ff879260f72972cc37bacc 100644 (file)
@@ -74,7 +74,7 @@ Graphic::Loader::Loader(Graphic &g, Resources &r):
 
 void Graphic::Loader::texture(const string &n)
 {
-       graph.texture=&res.get<GL::Texture2D>(n);
+       graph.texture=res.get<GL::Texture2D>(n);
        graph.slice=Geometry(0, 0, graph.texture->get_width(), graph.texture->get_height());
 }
 
index 1d965385e1372d2b3da5e765fac3e26351d4dc8c..d65fc2efd00e60686151ac1b6185b5e19dd9f3ed 100644 (file)
@@ -61,7 +61,7 @@ Part::Loader::~Loader()
 
 void Part::Loader::graphic(State s, const string &n)
 {
-       part.graphic[s]=&res.get<Graphic>(n);
+       part.graphic[s]=res.get<Graphic>(n);
 }
 
 void Part::Loader::align(int x, int y)
index f146bbc9a281b6f19423005dd6d45a3b5d5550ed..3b0f4f9154648b88d7254cb6f575854de341193b 100644 (file)
@@ -43,7 +43,7 @@ GL::Font *Resources::create_font(const string &name)
 GL::Texture2D *Resources::create_texture(const string &name)
 {
        RefPtr<GL::Texture2D> tex=new GL::Texture2D;
-       tex->image((path/(name+".png")).str());
+       tex->load_image((path/(name+".png")).str());
        tex->set_min_filter(GL::LINEAR);
        return tex.release();
 }
@@ -59,7 +59,7 @@ Resources::Loader::Loader(Resources &r):
 
 void Resources::Loader::default_font(const string &name)
 {
-       res.default_font=&res.get<GL::Font>(name);
+       res.default_font=res.get<GL::Font>(name);
 }
 
 void Resources::Loader::font(const string &name)
index f03ed39652f5d56f416f28707674a9a8da5d3f54..8674a138ab7b6cf240ff7510524c346e3265a77a 100644 (file)
@@ -58,7 +58,7 @@ void Widget::update_style()
                sname+='-';
                sname+=style_name;
        }
-       style=&res.get<Style>(sname);
+       style=res.get<Style>(sname);
 }
 
 void Widget::render_part(const Part &part) const