diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-03-22 22:52:59 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-13 22:40:51 +0100 |
commit | fb7542a5e7d390a20eefc946cc5054dc79d74180 (patch) | |
tree | 164c6640dfbb0be0b260cd6fb709477e6d753f58 /src/menu/container.cpp | |
parent | b44ac46e4e54f228fd9c25c042da2efd2ab45b64 (diff) | |
download | usdx-fb7542a5e7d390a20eefc946cc5054dc79d74180.tar.gz usdx-fb7542a5e7d390a20eefc946cc5054dc79d74180.tar.xz usdx-fb7542a5e7d390a20eefc946cc5054dc79d74180.zip |
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
Diffstat (limited to '')
-rw-r--r-- | src/menu/container.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/menu/container.cpp b/src/menu/container.cpp index 795d57ab..ce73c1c2 100644 --- a/src/menu/container.cpp +++ b/src/menu/container.cpp @@ -33,13 +33,13 @@ namespace usdx log4cpp::Category::getInstance("usdx.menu.container"); Container::Container(Container* owner) - : DrawableControl(owner), frame(NULL) + : DrawableControl(owner), frame(NULL), window_coords(0, 0) { set_clipping_required(true); } Container::Container(Container* owner, const ContainerHelper& add) - : DrawableControl(owner, add), frame(NULL) + : DrawableControl(owner, add), frame(NULL), window_coords(0, 0) { set_clipping_required(true); } @@ -86,4 +86,9 @@ namespace usdx { frame = NULL; } + + const Point<int>& Container::get_window_coords(void) const + { + return window_coords; + } }; |