From 96a5f00dbf511a5b5e6bc08901ccbb76387ec46b Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Thu, 14 Feb 2013 12:13:32 +0100 Subject: [PATCH] CHANGED: Somehow lost this code part during development. --HG-- branch : gsoc2012-gui-editor --- code/nel/src/gui/ctrl_base_button.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/code/nel/src/gui/ctrl_base_button.cpp b/code/nel/src/gui/ctrl_base_button.cpp index 4fa7b6e5b..f6f3146c1 100644 --- a/code/nel/src/gui/ctrl_base_button.cpp +++ b/code/nel/src/gui/ctrl_base_button.cpp @@ -463,6 +463,27 @@ namespace NLGUI { type = (const char*) prop; } + + if (type.empty() || type == "toggle_button") + { + _Type = ToggleButton; + } + else if (type == "push_button") + { + _Type = PushButton; + } + else if (type == "radio_button") + { + _Type = RadioButton; + + initRBRef(); + if (_Pushed) + *_RBRef = this; + } + else + { + nlinfo(("cannot parse button type for button " + getId()).c_str()); + } prop= (char*) xmlGetProp (cur, (xmlChar*)"pushed"); _Pushed = false;