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/base/config.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 'src/base/config.cpp')
-rw-r--r-- | src/base/config.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/base/config.cpp b/src/base/config.cpp index 630ac3b6..7a5807af 100644 --- a/src/base/config.cpp +++ b/src/base/config.cpp @@ -31,7 +31,8 @@ namespace usdx log4cpp::Category::getInstance("usdx.base.config"); Config::Config() - : graphics_fullscreen(false), graphics_resolution(800,600) + : graphics_fullscreen(false), graphics_resolution(800,600), + debug_boxes(false) { try { // TODO: handling different paths @@ -39,6 +40,7 @@ namespace usdx graphics_fullscreen = pt.get("graphics.fullscreen", graphics_fullscreen); graphics_resolution = pt.get("graphics.resolution", graphics_resolution); + debug_boxes = pt.get("debug.boxes", debug_boxes); } catch(...) { log << log4cpp::Priority::ERROR << "Loading of configuration failed."; @@ -82,4 +84,15 @@ namespace usdx { return graphics_resolution; } + + void Config::set_debug_boxes(bool value) + { + debug_boxes = value; + pt.put("debug.boxes", value); + } + + bool Config::get_debug_boxes(void) const + { + return debug_boxes; + } }; |