Prechádzať zdrojové kódy

Merge pull request #1091 from rgngl/enabledProperyControl

Read enabled property for controls from the form files.
Sean Paul Taylor 12 rokov pred
rodič
commit
63be7abc7f
1 zmenil súbory, kde vykonal 5 pridanie a 0 odobranie
  1. 5 0
      gameplay/src/Control.cpp

+ 5 - 0
gameplay/src/Control.cpp

@@ -90,6 +90,11 @@ void Control::initialize(Theme::Style* style, Properties* properties)
     if (id)
     if (id)
         _id = id;
         _id = id;
 
 
+    if (properties->exists("enabled"))
+    {
+        setEnabled(properties->getBool("enabled"));
+    }
+
     // Potentially override themed properties for all states.
     // Potentially override themed properties for all states.
     overrideThemedProperties(properties, STATE_ALL);
     overrideThemedProperties(properties, STATE_ALL);