set_text(t);
}
-void Button::autosize_special(const Part &part, Geometry &ageom)
+void Button::autosize_special(const Part &part, Geometry &ageom) const
{
if(part.get_name()=="text")
text.autosize(part, ageom);
GL::MeshBuilder bld(part_cache.create_mesh(part, *icon));
bld.color(1.0f, 1.0f, 1.0f);
- bld.begin(GL::QUADS);
+ bld.begin(GL::TRIANGLE_STRIP);
+ bld.texcoord(0, 1);
+ bld.vertex(rgeom.x, rgeom.y+rgeom.h);
bld.texcoord(0, 0);
bld.vertex(rgeom.x, rgeom.y);
- bld.texcoord(1, 0);
- bld.vertex(rgeom.x+rgeom.w, rgeom.y);
bld.texcoord(1, 1);
bld.vertex(rgeom.x+rgeom.w, rgeom.y+rgeom.h);
- bld.texcoord(0, 1);
- bld.vertex(rgeom.x, rgeom.y+rgeom.h);
+ bld.texcoord(1, 0);
+ bld.vertex(rgeom.x+rgeom.w, rgeom.y);
bld.end();
}
}