diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-10-26 18:38:30 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-18 19:34:20 +0100 |
commit | 77d65c98a8330a00d9cad8c10177660ebc685f9c (patch) | |
tree | d89322c411b0aba8b72a21b511592748432445e7 /src/menu/clipping_helper.cpp | |
parent | 21892f777ee38a93428e6a3804868eab73fc683d (diff) | |
download | usdx-77d65c98a8330a00d9cad8c10177660ebc685f9c.tar.gz usdx-77d65c98a8330a00d9cad8c10177660ebc685f9c.tar.xz usdx-77d65c98a8330a00d9cad8c10177660ebc685f9c.zip |
menu: fix calculate window coordinates
Diffstat (limited to 'src/menu/clipping_helper.cpp')
-rw-r--r-- | src/menu/clipping_helper.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/menu/clipping_helper.cpp b/src/menu/clipping_helper.cpp index 425e9dec..1a92d3f1 100644 --- a/src/menu/clipping_helper.cpp +++ b/src/menu/clipping_helper.cpp @@ -45,7 +45,11 @@ namespace usdx // calculate window coordinates of rectangle if (parent) { int offset = parent->get_size().get_height() - rect.get_bottom(); - new_scissor_box.set_top(parent->get_window_coords().get_y() + offset); + new_scissor_box.set_top(parent->get_window_coords().get_y() + + offset); + + new_scissor_box.set_left(parent->get_window_coords().get_x() + + rect.get_left()); } // calculate intersection of old clipping and requested clipping |