From fb7542a5e7d390a20eefc946cc5054dc79d74180 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 22 Mar 2012 22:52:59 +0100 Subject: menu/container: clipping requires window coordinates glScissor only work with window coordinates. to calculate that a control has to know it position on the window and therefor the parent container have to track the position in the window --- src/menu/container.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/menu/container.hpp') diff --git a/src/menu/container.hpp b/src/menu/container.hpp index 9b30b117..147a0d92 100644 --- a/src/menu/container.hpp +++ b/src/menu/container.hpp @@ -31,6 +31,7 @@ #include #include "drawable_control.hpp" +#include "utils/point.hpp" namespace usdx { @@ -48,6 +49,7 @@ namespace usdx Container(Container*, const ContainerHelper&); virtual void draw(void); + Point window_coords; public: Container(Container*); @@ -58,6 +60,8 @@ namespace usdx virtual void setFrame(Frame*); virtual void removeFrame(void); + + const Point& get_window_coords(void) const; }; }; -- cgit v1.2.3