Distributed under the LGPL
*/
+#include <msp/gl/blend.h>
#include <msp/input/keys.h>
#include <msp/time/units.h>
#include <msp/time/utils.h>
namespace GLtk {
Root::Root(const Resources &r, Graphics::Window &w):
- Widget(r),
- Panel(r),
+ resources(r),
window(w),
lbl_tooltip(0),
tooltip_target(0)
{
if(!lbl_tooltip)
{
- lbl_tooltip = new Label(res);
+ lbl_tooltip = new Label;
add(*lbl_tooltip);
lbl_tooltip->set_style("tooltip");
}
}
}
+void Root::render() const
+{
+ GL::MatrixStack::projection() = GL::Matrix::ortho_bottomleft(geom.w, geom.h);
+ GL::MatrixStack::modelview() = GL::Matrix();
+ GL::Bind bind_blend(GL::Blend::alpha());
+
+ Widget::render();
+}
+
void Root::button_press_event(int x, int y, unsigned btn, unsigned mod)
{
if(visible)