]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/entry.cpp
Avoid putting tooltip label in layout
[libs/gltk.git] / source / entry.cpp
index ca185bea0168c4e40b1accf63055136443ced6e2..52a7b429d269e0013e71c44d7d918a9a8dca55b5 100644 (file)
@@ -110,7 +110,8 @@ void Entry::rebuild_special(const Part &part, CachedPart &cache)
                text.build(part, geom, first_row, cache);
        else if(part.get_name()=="cursor")
        {
-               if(!text_part || !part.get_graphic(state))
+               const Graphic *graphic = part.get_graphic(state);
+               if(!text_part || !graphic)
                {
                        cache.texture = 0;
                        return;
@@ -127,19 +128,19 @@ void Entry::rebuild_special(const Part &part, CachedPart &cache)
 
                Geometry rgeom = text.coords_to_geometry(*text_part, geom, first_row, row, col);
 
-               cache.texture = part.get_graphic(state)->get_texture();
+               cache.texture = graphic->get_texture();
                cache.clear_mesh();
 
                GL::MeshBuilder bld(*cache.mesh);
                bld.matrix() *= GL::Matrix::translation(rgeom.x, rgeom.y, 0);
-               part.get_graphic(state)->build(part.get_geometry().w, part.get_geometry().h, bld);
+               graphic->build(part.get_geometry().w, part.get_geometry().h, bld);
        }
 }
 
-void Entry::render_special(const Part &part) const
+void Entry::render_special(const Part &part, GL::Renderer &renderer) const
 {
        if(part.get_name()=="slider" && multiline)
-               slider->render();
+               slider->render(renderer);
 }
 
 void Entry::key_press(unsigned key, unsigned)