Browse Source

Exposed UIElement::GetDragButtonCombo and UIElement::GetDragButtonCount to Lua script, and adjusted their signatures.

hdunderscore 11 years ago
parent
commit
bb3475b797
2 changed files with 4 additions and 2 deletions
  1. 2 0
      Source/Engine/LuaScript/pkgs/UI/UIElement.pkg
  2. 2 2
      Source/Engine/UI/UIElement.h

+ 2 - 0
Source/Engine/LuaScript/pkgs/UI/UIElement.pkg

@@ -191,6 +191,8 @@ class UIElement : public Animatable
     int GetLayoutSpacing() const;
     const IntRect& GetLayoutBorder() const;
     unsigned GetNumChildren(bool recursive = false) const;
+    int GetDragButtonCombo() const;
+    unsigned GetDragButtonCount() const;
 
     UIElement* GetChild(const String name, bool recursive = false) const;
     UIElement* GetChild(unsigned index) const;

+ 2 - 2
Source/Engine/UI/UIElement.h

@@ -438,9 +438,9 @@ public:
     /// Return all user variables.
     const VariantMap& GetVars() const { return vars_; }
     /// Return the drag button combo if this element is being dragged.
-    const int GetDragButtonCombo() { return dragButtonCombo_; }
+    int GetDragButtonCombo() const { return dragButtonCombo_; }
     /// Return the number of buttons dragging this element.
-    const unsigned GetDragButtonCount() { return dragButtonCount_; }
+    unsigned GetDragButtonCount() const { return dragButtonCount_; }
 
     /// Convert screen coordinates to element coordinates.
     IntVector2 ScreenToElement(const IntVector2& screenPosition);