Selaa lähdekoodia

Merge pull request #1091 from rgngl/enabledProperyControl

Read enabled property for controls from the form files.
Sean Paul Taylor 12 vuotta sitten
vanhempi
sitoutus
63be7abc7f
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  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)
         _id = id;
 
+    if (properties->exists("enabled"))
+    {
+        setEnabled(properties->getBool("enabled"));
+    }
+
     // Potentially override themed properties for all states.
     overrideThemedProperties(properties, STATE_ALL);