From: Mikko Rasa Date: Wed, 21 Nov 2012 15:57:44 +0000 (+0200) Subject: Adapt to Collection API changes X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e5f9004b672b038e43cf2b20c3fc9327f2b55ffd;p=libs%2Fgltk.git Adapt to Collection API changes --- diff --git a/source/graphic.cpp b/source/graphic.cpp index 7b8128c..005d30f 100644 --- a/source/graphic.cpp +++ b/source/graphic.cpp @@ -88,7 +88,7 @@ Graphic::Loader::Loader(Graphic &g, Resources &r): void Graphic::Loader::texture(const string &n) { - graph.texture = res.get(n); + graph.texture = &res.get(n); graph.slice = Geometry(0, 0, graph.texture->get_width(), graph.texture->get_height()); } diff --git a/source/part.cpp b/source/part.cpp index 0ba03a3..1273979 100644 --- a/source/part.cpp +++ b/source/part.cpp @@ -59,7 +59,7 @@ Part::Loader::~Loader() void Part::Loader::graphic(State s, const string &n) { - Graphic *grph = get_collection().get(n); + Graphic *grph = &get_collection().get(n); for(int i=0; i("graphic"); - add_keyword("texture"); - - add_creator(&Resources::create_font); - add_creator(&Resources::create_texture); + add_type().keyword("graphic"); + add_type().keyword("texture").creator(&Resources::create_texture); + add_type().creator(&Resources::create_font); } void Resources::set_path(const FS::Path &p) @@ -75,7 +73,7 @@ Resources::Loader::Loader(Resources &r): void Resources::Loader::default_font(const string &name) { - res.default_font = res.get(name); + res.default_font = &res.get(name); } void Resources::Loader::font(const string &name) diff --git a/source/widget.cpp b/source/widget.cpp index 1cb42e5..e929940 100644 --- a/source/widget.cpp +++ b/source/widget.cpp @@ -97,7 +97,7 @@ void Widget::update_style() sname += style_name; } - style = root->get_resources().get