diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-09-07 01:28:18 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-13 22:40:53 +0100 |
commit | 3032acedd104dccd6755d942671e25d2a7ba358f (patch) | |
tree | 100506217fa00ce53fa7640cfbee1db80428363d /src/menu/drawable_control.cpp | |
parent | 7fd722e8e93fcfae3ba2454f806eaface6a6f220 (diff) | |
download | usdx-3032acedd104dccd6755d942671e25d2a7ba358f.tar.gz usdx-3032acedd104dccd6755d942671e25d2a7ba358f.tar.xz usdx-3032acedd104dccd6755d942671e25d2a7ba358f.zip |
base/config: add debug.boxes config option
if debug.boxes is true in configuration file, a red border is drawn
around all controls
Diffstat (limited to '')
-rw-r--r-- | src/menu/drawable_control.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/menu/drawable_control.cpp b/src/menu/drawable_control.cpp index 298abdfe..864855f8 100644 --- a/src/menu/drawable_control.cpp +++ b/src/menu/drawable_control.cpp @@ -27,6 +27,8 @@ #include "drawable_control.hpp" #include "container.hpp" #include "clipping_helper.hpp" +#include "static_rectangle.hpp" +#include "application.hpp" #include "modelview_matrix_cache.hpp" namespace usdx @@ -105,6 +107,14 @@ namespace usdx Drawable::repaint(); } } + + if (Application::get_config()->get_debug_boxes()) + { + boost::shared_lock<boost::shared_mutex> lock(size_mutex); + StaticRectangle s(RgbColor(255, 0, 0), size); + s.set_stroke_width(2.0f); + s.repaint(); + } } void DrawableControl::set_position(const Point<int>& position) |