Bläddra i källkod

Re-generated lua bindings.

Steve Grenier 12 år sedan
förälder
incheckning
4421b05569
47 ändrade filer med 4083 tillägg och 426 borttagningar
  1. 1 1
      gameplay/src/Button.cpp
  2. 3 1
      gameplay/src/Button.h
  3. 1 1
      gameplay/src/CheckBox.cpp
  4. 3 1
      gameplay/src/CheckBox.h
  5. 43 182
      gameplay/src/Container.cpp
  6. 5 4
      gameplay/src/Container.h
  7. 2 2
      gameplay/src/Control.cpp
  8. 7 1
      gameplay/src/Control.h
  9. 1 1
      gameplay/src/ControlFactory.cpp
  10. 1 216
      gameplay/src/Form.cpp
  11. 1 1
      gameplay/src/ImageControl.cpp
  12. 2 1
      gameplay/src/ImageControl.h
  13. 1 1
      gameplay/src/Joystick.cpp
  14. 1 1
      gameplay/src/Label.cpp
  15. 1 1
      gameplay/src/Label.h
  16. 1 1
      gameplay/src/RadioButton.cpp
  17. 3 1
      gameplay/src/RadioButton.h
  18. 1 1
      gameplay/src/Slider.cpp
  19. 3 1
      gameplay/src/Slider.h
  20. 1 1
      gameplay/src/TextBox.cpp
  21. 3 1
      gameplay/src/TextBox.h
  22. 308 0
      gameplay/src/lua/lua_Button.cpp
  23. 8 0
      gameplay/src/lua/lua_Button.h
  24. 308 0
      gameplay/src/lua/lua_CheckBox.cpp
  25. 8 0
      gameplay/src/lua/lua_CheckBox.h
  26. 468 0
      gameplay/src/lua/lua_Container.cpp
  27. 12 0
      gameplay/src/lua/lua_Container.h
  28. 308 0
      gameplay/src/lua/lua_Control.cpp
  29. 8 0
      gameplay/src/lua/lua_Control.h
  30. 10 0
      gameplay/src/lua/lua_ControlListenerEventType.cpp
  31. 40 0
      gameplay/src/lua/lua_Font.cpp
  32. 1 0
      gameplay/src/lua/lua_Font.h
  33. 532 0
      gameplay/src/lua/lua_Form.cpp
  34. 14 0
      gameplay/src/lua/lua_Form.h
  35. 2 2
      gameplay/src/lua/lua_Global.cpp
  36. 308 3
      gameplay/src/lua/lua_ImageControl.cpp
  37. 8 0
      gameplay/src/lua/lua_ImageControl.h
  38. 308 0
      gameplay/src/lua/lua_Joystick.cpp
  39. 8 0
      gameplay/src/lua/lua_Joystick.h
  40. 308 0
      gameplay/src/lua/lua_Label.cpp
  41. 8 0
      gameplay/src/lua/lua_Label.h
  42. 308 0
      gameplay/src/lua/lua_RadioButton.cpp
  43. 8 0
      gameplay/src/lua/lua_RadioButton.h
  44. 308 0
      gameplay/src/lua/lua_Slider.cpp
  45. 8 0
      gameplay/src/lua/lua_Slider.h
  46. 381 0
      gameplay/src/lua/lua_TextBox.cpp
  47. 10 0
      gameplay/src/lua/lua_TextBox.h

+ 1 - 1
gameplay/src/Button.cpp

@@ -24,7 +24,7 @@ Button* Button::create(const char* id, Theme::Style* style)
     return button;
 }
 
-Button* Button::create(Theme::Style* style, Properties* properties)
+Control* Button::create(Theme::Style* style, Properties* properties, Theme* theme)
 {
     Button* button = new Button();
     button->initialize(style, properties);

+ 3 - 1
gameplay/src/Button.h

@@ -35,6 +35,7 @@ class Button : public Label
 {
     friend class Container;
     friend class Gamepad;
+    friend class ControlFactory;
 
 public:
 
@@ -66,10 +67,11 @@ protected:
      *
      * @param style The style to apply to this button.
      * @param properties The properties to set on this button.
+     * @param theme The theme to set on this control if needed.
      *
      * @return The new button.
      */
-    static Button* create(Theme::Style* style, Properties* properties);
+    static Control* create(Theme::Style* style, Properties* properties, Theme* theme = NULL);
 
     /**
      * @see Control::getType

+ 1 - 1
gameplay/src/CheckBox.cpp

@@ -26,7 +26,7 @@ CheckBox* CheckBox::create(const char* id, Theme::Style* style)
     return checkBox;
 }
 
-CheckBox* CheckBox::create(Theme::Style* style, Properties* properties)
+Control* CheckBox::create(Theme::Style* style, Properties* properties, Theme* theme)
 {
     GP_ASSERT(properties);
 

+ 3 - 1
gameplay/src/CheckBox.h

@@ -35,6 +35,7 @@ namespace gameplay
 class CheckBox : public Button
 {
     friend class Container;
+    friend class ControlFactory;
 
 public:
 
@@ -112,10 +113,11 @@ protected:
      *
      * @param style The style to apply to this checkbox.
      * @param properties The properties to set on this checkbox.
+     * @param theme The theme to set on this control if needed.
      *
      * @return The new checkbox.
      */
-    static CheckBox* create(Theme::Style* style, Properties* properties);
+    static Control* create(Theme::Style* style, Properties* properties, Theme* theme = NULL);
 
     /**
      * Keyboard callback on key events.

+ 43 - 182
gameplay/src/Container.cpp

@@ -52,7 +52,7 @@ Container::Container()
       _scrollingVelocity(Vector2::zero()), _scrollingFriction(1.0f), _scrollWheelSpeed(400.0f),
       _scrollingRight(false), _scrollingDown(false),
       _scrollingMouseVertically(false), _scrollingMouseHorizontally(false),
-      _scrollBarOpacityClip(NULL), _zIndexDefault(0), _focusIndexDefault(0), _focusIndexMax(0),
+      _scrollBarOpacityClip(NULL), _zIndexDefault(0),
       _selectButtonDown(false), _lastFrameTime(0), _totalWidth(0), _totalHeight(0),
       _initializedWithScroll(false), _scrollWheelRequiresFocus(false), _allowRelayout(true)
 {
@@ -81,7 +81,7 @@ Container* Container::create(const char* id, Theme::Style* style, Layout::Type l
     return container;
 }
 
-Container* Container::create(Theme::Style* style, Properties* properties, Theme* theme)
+Control* Container::create(Theme::Style* style, Properties* properties, Theme* theme)
 {
     GP_ASSERT(properties);
 
@@ -248,13 +248,16 @@ unsigned int Container::addControl(Control* control)
 
     if (control->getFocusIndex() == -1)
     {
-        control->setFocusIndex(_focusIndexDefault++);
+        // Find the current largest focus index
+        int maxFocusIndex = 0;
+        for (size_t i = 0, count = _controls.size(); i < count; ++i)
+        {
+            if (_controls[i]->_focusIndex > maxFocusIndex)
+                maxFocusIndex = _controls[i]->_focusIndex;
+        }
+        control->setFocusIndex(maxFocusIndex + 1);
     }
 
-    int focusIndex = control->getFocusIndex();
-    if (focusIndex > _focusIndexMax)
-        _focusIndexMax = focusIndex;
-
     if (control->_parent != this)
     {
         _controls.push_back(control);
@@ -786,197 +789,55 @@ bool Container::isDirty()
     return false;
 }
 
-bool Container::moveFocus(Direction direction, Control* outsideControl)
+bool Container::moveFocus(Direction direction)
 {
-    Control* start = outsideControl;
-    if (!start)
+    switch (direction)
     {
-        if (Form::_focusControl && Form::_focusControl->_parent == this)
-            start = Form::_focusControl;
-    }
-
-    int focusIndex = 0;
-    Control* next = NULL;
-    if (start)
-    {
-        const Rectangle& startBounds = start->getAbsoluteBounds();
-        Vector2 vStart, vNext;
-        float distance = FLT_MAX;
-
-        switch (direction)
-        {
-        case UP:
-            vStart.set(startBounds.x + startBounds.width * 0.5f,
-                        startBounds.y);
-            break;
-        case DOWN:
-            vStart.set(startBounds.x + startBounds.width * 0.5f,
-                        startBounds.bottom());
-            break;
-        case LEFT:
-            vStart.set(startBounds.x,
-                        startBounds.y + startBounds.height * 0.5f);
-            break;
-        case RIGHT:
-            vStart.set(startBounds.right(),
-                        startBounds.y + startBounds.height * 0.5f);
-            break;
-        }
-
-        if (direction != NEXT && direction != PREVIOUS)
-        {
-            std::vector<Control*>::const_iterator itt;
-            for (itt = _controls.begin(); itt < _controls.end(); itt++)
-            {
-                Control* nextControl = *itt;
-
-                if (nextControl == start || nextControl->getFocusIndex() < 0 ||
-                    !nextControl->isEnabled() || !nextControl->isVisible())
-                {
-                    // Control is not focusable.
-                    continue;
-                }
-
-                const Rectangle& nextBounds = nextControl->getAbsoluteBounds();
-                switch (direction)
-                {
-                case UP:
-                    vNext.set(nextBounds.x + nextBounds.width * 0.5f,
-                              nextBounds.bottom());
-                    if (vNext.y > vStart.y) continue;
-                    break;
-                case DOWN:
-                    vNext.set(nextBounds.x + nextBounds.width * 0.5f,
-                              nextBounds.y);
-                    if (vNext.y < vStart.y) continue;
-                    break;
-                case LEFT:
-                    vNext.set(nextBounds.right(),
-                              nextBounds.y + nextBounds.height * 0.5f);
-                    if (vNext.x > vStart.x) continue;
-                    break;
-                case RIGHT:
-                    vNext.set(nextBounds.x,
-                              nextBounds.y + nextBounds.height * 0.5f);
-                    if (vNext.x < vStart.x) continue;
-                    break;
-                }
-
-                float nextDistance = vStart.distance(vNext);
-                if (abs(nextDistance) < distance)
-                {
-                    distance = nextDistance;
-                    next = nextControl;
-                }
-            }
-        }
+    case UP:
+        return moveFocus(Vector2(0, -1));
 
-        if (!next)
-        {
-            // Check for controls in the given direction in our parent container.
-            if (direction != NEXT && direction != PREVIOUS && !outsideControl && _parent && _parent->moveFocus(direction, start))
-                return true;
-            
-            // No control is in the given direction.  Move to the next control in the focus order.
-            int focusDelta;
-            switch (direction)
-            {
-            case UP:
-            case LEFT:
-                focusDelta = -1;
-                break;
-            case DOWN:
-            case RIGHT:
-            case NEXT:
-                focusDelta = 1;
-                break;
-            case PREVIOUS:
-                focusDelta = -1;
-                break;
-            }
+    case DOWN:
+        return moveFocus(Vector2(0, 1));
 
-            // Find the index to search for.
-            if (outsideControl)
-            {
-                focusIndex = outsideControl->_parent->getFocusIndex() + focusDelta;
-            }
-            else
-            {
-                focusIndex = start->getFocusIndex() + focusDelta;
-            }
+    case LEFT:
+        return moveFocus(Vector2(-1, 0));
 
-            if (focusIndex > _focusIndexMax)
-            {
-                if (direction == NEXT && !outsideControl && _parent && _parent->moveFocus(direction, start))
-                    return true;
+    case RIGHT:
+        return moveFocus(Vector2(1, 0));
+    }
 
-                focusIndex = 0;
-            }
-            else if (focusIndex < 0)
-            {
-                if (direction == PREVIOUS && !outsideControl && _parent && _parent->moveFocus(direction, start))
-                    return true;
+    // Get the current control that has focus within this container
+    Control* current = NULL;
+    if (Form::_focusControl && Form::_focusControl->_parent == this)
+        current = Form::_focusControl;
 
-                focusIndex = _focusIndexMax;
-            }
-        }
+    if (current)
+    {
+        // Find the next control in this container in the specified direction
+        int focusDir = direction == PREVIOUS ? -1 : 1;
     }
-
-    if (!next)
+    else
     {
-        std::vector<Control*>::const_iterator itt;
-        for (itt = _controls.begin(); itt < _controls.end(); itt++)
+        // No controls within this container have focus, so set focus to the first or last focus control
+        Control* next = NULL;
+        for (size_t i = 0, count = _controls.size(); i < count; ++i)
         {
-            Control* nextControl = *itt;
-            if (nextControl->getFocusIndex() == focusIndex &&
-                nextControl->isEnabled() && nextControl->isVisible())
+            Control* ctrl = _controls[i];
+            if (ctrl->canFocus())
             {
-                next = nextControl;
-                break;
+                if (!next || (direction == NEXT && ctrl->_focusIndex < next->_focusIndex) || (direction == PREVIOUS && ctrl->_focusIndex > next->_focusIndex))
+                    next = ctrl;
             }
         }
+        //if (next && next->setFocus())
     }
 
-    // If we haven't found next by now, then there are no focusable controls in this container.
-    if (next)
-    {
-        // If this control is a container, try to move focus to the first control within it
-        if (next->isContainer())
-        {
-            if ((direction == NEXT && ((Container*)next)->moveFocus(direction)) || ((Container*)next)->moveFocus(direction, start))
-                return true;
-        }
-
-        if (next->canFocus())
-            Form::setFocusControl(next);
-
-        // If the next control is not fully visible, scroll the container so that it is.
-        const Rectangle& bounds = next->getBounds();
-        if (bounds.x < _scrollPosition.x)
-        {
-            // Control is to the left of the scrolled viewport.
-            _scrollPosition.x = -bounds.x;
-        }
-        else if (bounds.x + bounds.width > _scrollPosition.x + _viewportBounds.width)
-        {
-            // Control is off to the right.
-            _scrollPosition.x = -(bounds.x + bounds.width - _viewportBounds.width);
-        }
-
-        if (bounds.y < _viewportBounds.y - _scrollPosition.y)
-        {
-            // Control is above the viewport.
-            _scrollPosition.y = -bounds.y;
-        }
-        else if (bounds.y + bounds.height > _viewportBounds.height - _scrollPosition.y)
-        {
-            // Control is below the viewport.
-            _scrollPosition.y = -(bounds.y + bounds.height - _viewportBounds.height);
-        }
-
-        return true;
-    }
+    return false;
+}
 
+bool Container::moveFocus(const Vector2& direction)
+{
+    // TODO
     return false;
 }
 

+ 5 - 4
gameplay/src/Container.h

@@ -52,6 +52,7 @@ class Container : public Control
 {
     friend class Form;
     friend class Control;
+    friend class ControlFactory;
 
 public:
 
@@ -321,7 +322,7 @@ protected:
      *
      * @return The new container.
      */
-    static Container* create(Theme::Style* style, Properties* properties, Theme* theme);
+    static Control* create(Theme::Style* style, Properties* properties, Theme* theme = NULL);
 
     /**
      * Initialize properties common to all Containers from a Properties object.
@@ -579,7 +580,9 @@ private:
 
     // Returns true on success; false if there are no controls to focus on,
     // in which case scrolling can be initiated.
-    bool moveFocus(Direction direction, Control* outsideControl = NULL);
+    bool moveFocus(Direction direction);
+
+    bool moveFocus(const Vector2& direction);
 
     // Starts scrolling at the given horizontal and vertical speeds.
     void startScrolling(float x, float y, bool resetTime = true);
@@ -591,8 +594,6 @@ private:
 
     AnimationClip* _scrollBarOpacityClip;
     int _zIndexDefault;
-    int _focusIndexDefault;
-    int _focusIndexMax;
     bool _selectButtonDown;
     double _lastFrameTime;
 

+ 2 - 2
gameplay/src/Control.cpp

@@ -1361,10 +1361,10 @@ bool Control::isChild(Control* control) const
     return false;
 }
 
-Form* Control::getForm() const
+Form* Control::getTopLevelForm() const
 {
     if (_parent)
-        return _parent->getForm();
+        return _parent->getTopLevelForm();
 
     if (isContainer())
     {

+ 7 - 1
gameplay/src/Control.h

@@ -911,6 +911,12 @@ public:
     /**
      * Set this control's focus index.
      *
+     * Focus indexes control the order in which input focus changes between controls
+     * when using the focus change controls such as the TAB key.
+     *
+     * Valid focus indexes should be zero or greater, with a negative number indicating
+     * an unset focus index.
+     *
      * @param focusIndex The new focus index.
      */
     void setFocusIndex(int focusIndex);
@@ -950,7 +956,7 @@ public:
      *
      * @return this control's form.
      */
-    Form* getForm() const;
+    Form* getTopLevelForm() const;
 
     /**
      * Adds a listener to be notified of specific events affecting

+ 1 - 1
gameplay/src/ControlFactory.cpp

@@ -58,7 +58,7 @@ void ControlFactory::unregisterCustomControl(const char* controlName)
 Control *ControlFactory::createControl(const char* controlName, Theme::Style* style, Properties* properties, Theme* theme)
 {
 	if (_registeredControls.find(controlName) == _registeredControls.end())
-		return NULL;	
+		return NULL;
 
 	return (*_registeredControls[controlName])(style, properties, theme);
 }

+ 1 - 216
gameplay/src/Form.cpp

@@ -431,7 +431,7 @@ void Form::updateInternal(float elapsedTime)
 
 bool Form::screenToForm(Control* ctrl, int* x, int* y)
 {
-    Form* form = ctrl->getForm();
+    Form* form = ctrl->getTopLevelForm();
     if (form)
     {
         if (form->_node)
@@ -811,226 +811,11 @@ bool Form::pointerEventInternal(bool mouse, int evt, int x, int y, int param)
 bool Form::touchEventInternal(Touch::TouchEvent evt, int x, int y, unsigned int contactIndex)
 {
     return pointerEventInternal(false, evt, x, y, (int)contactIndex);
-
-    /*Control* ctrl = NULL;
-    int formX = x;
-    int formY = y;
-
-    // Handle focus, active and hover state changes
-    if (contactIndex == 0)
-    {
-        switch (evt)
-        {
-        case Touch::TOUCH_PRESS:
-        case Touch::TOUCH_RELEASE:
-            ctrl = handlePointerPressRelease(&formX, &formY, evt == Touch::TOUCH_PRESS);
-            break;
-
-        case Touch::TOUCH_MOVE:
-            ctrl = handlePointerMove(&formX, &formY);
-            break;
-        }
-    }
-
-    // Dispatch input events to all controls that intersect this point
-    if (ctrl == NULL)
-    {
-        formX = x;
-        formY = y;
-        ctrl = findInputControl(&formX, &formY, false);
-    }
-
-    if (ctrl)
-    {
-        // Handle container scrolling
-        Control* tmp = ctrl;
-        while (tmp)
-        {
-            if (tmp->isContainer())
-            {
-                Container* container = static_cast<Container*>(tmp);
-                if (container->_scroll != SCROLL_NONE)
-                {
-                    if (container->touchEventScroll(evt, formX - tmp->_absoluteBounds.x, formY - tmp->_absoluteBounds.y, contactIndex))
-                        return true;
-                    break; // scrollable parent container found
-                }
-            }
-            tmp = tmp->_parent;
-        }
-
-        // Handle setting focus for press events
-        switch (evt)
-        {
-        case Mouse::MOUSE_PRESS_LEFT_BUTTON:
-        case Mouse::MOUSE_PRESS_MIDDLE_BUTTON:
-        case Mouse::MOUSE_PRESS_RIGHT_BUTTON:
-            Control* focusControl = ctrl;
-            while (focusControl && !focusControl->setFocus())
-                focusControl = focusControl->_parent;
-            break;
-        }
-
-        // Dispatch the event from the bottom upwards, until a control intersecting the point consumes the event
-        while (ctrl)
-        {
-            int localX = formX - ctrl->_absoluteBounds.x;
-            int localY = formY - ctrl->_absoluteBounds.y;
-            if (ctrl->mouseEvent(evt, localX, localY, wheelDelta))
-                return true;
-
-            // Forward to touch event hanlder if unhandled by mouse handler
-            switch (evt)
-            {
-            case Mouse::MOUSE_PRESS_LEFT_BUTTON:
-                if (ctrl->touchEvent(Touch::TOUCH_PRESS, localX, localY, 0))
-                    return true;
-                break;
-            case Mouse::MOUSE_RELEASE_LEFT_BUTTON:
-                if (ctrl->touchEvent(Touch::TOUCH_RELEASE, localX, localY, 0))
-                    return true;
-                break;
-            case Mouse::MOUSE_MOVE:
-                if (ctrl->touchEvent(Touch::TOUCH_MOVE, localX, localY, 0))
-                    return true;
-                break;
-            }
-
-            // Consume all input events anyways?
-            if (ctrl->getConsumeInputEvents())
-                return true;
-
-            ctrl = ctrl->getParent();
-        }
-    }
-    else
-    {
-        // If this was a press event, remove all focus
-        switch (evt)
-        {
-        case Mouse::MOUSE_PRESS_LEFT_BUTTON:
-        case Mouse::MOUSE_PRESS_MIDDLE_BUTTON:
-        case Mouse::MOUSE_PRESS_RIGHT_BUTTON:
-            setFocusControl(NULL);
-            break;
-        }
-    }
-
-    return false;*/
 }
 
 bool Form::mouseEventInternal(Mouse::MouseEvent evt, int x, int y, int wheelDelta)
 {
     return pointerEventInternal(true, evt, x, y, wheelDelta);
-
-    /*
-    // Do not process mouse input when mouse is captured
-    if (Game::getInstance()->isMouseCaptured())
-        return false;
-
-    Control* ctrl = NULL;
-    int formX = x;
-    int formY = y;
-
-    // Handle focus, active and hover state changes
-    switch (evt)
-    {
-    case Mouse::MOUSE_PRESS_LEFT_BUTTON:
-    case Mouse::MOUSE_RELEASE_LEFT_BUTTON:
-        ctrl = handlePointerPressRelease(&formX, &formY, evt == Mouse::MOUSE_PRESS_LEFT_BUTTON);
-        break;
-
-    case Mouse::MOUSE_MOVE:
-        ctrl = handlePointerMove(&formX, &formY);
-        break;
-    }
-
-    // Dispatch input events to all controls that intersect this point
-    if (ctrl == NULL)
-    {
-        formX = x;
-        formY = y;
-        ctrl = findInputControl(&formX, &formY, false);
-    }
-
-    if (ctrl)
-    {
-        // Handle container scrolling
-        Control* tmp = ctrl;
-        while (tmp)
-        {
-            if (tmp->isContainer())
-            {
-                Container* container = static_cast<Container*>(tmp);
-                if (container->_scroll != SCROLL_NONE)
-                {
-                    if (container->mouseEventScroll(evt, formX - tmp->_absoluteBounds.x, formY - tmp->_absoluteBounds.y, wheelDelta))
-                        return true;
-                    break; // scrollable parent container found
-                }
-            }
-            tmp = tmp->_parent;
-        }
-
-        // Handle setting focus for press events
-        switch (evt)
-        {
-        case Mouse::MOUSE_PRESS_LEFT_BUTTON:
-        case Mouse::MOUSE_PRESS_MIDDLE_BUTTON:
-        case Mouse::MOUSE_PRESS_RIGHT_BUTTON:
-            Control* focusControl = ctrl;
-            while (focusControl && !focusControl->setFocus())
-                focusControl = focusControl->_parent;
-            break;
-        }
-
-        // Dispatch the event from the bottom upwards, until a control intersecting the point consumes the event
-        while (ctrl)
-        {
-            int localX = formX - ctrl->_absoluteBounds.x;
-            int localY = formY - ctrl->_absoluteBounds.y;
-            if (ctrl->mouseEvent(evt, localX, localY, wheelDelta))
-                return true;
-
-            // Forward to touch event hanlder if unhandled by mouse handler
-            switch (evt)
-            {
-            case Mouse::MOUSE_PRESS_LEFT_BUTTON:
-                if (ctrl->touchEvent(Touch::TOUCH_PRESS, localX, localY, 0))
-                    return true;
-                break;
-            case Mouse::MOUSE_RELEASE_LEFT_BUTTON:
-                if (ctrl->touchEvent(Touch::TOUCH_RELEASE, localX, localY, 0))
-                    return true;
-                break;
-            case Mouse::MOUSE_MOVE:
-                if (ctrl->touchEvent(Touch::TOUCH_MOVE, localX, localY, 0))
-                    return true;
-                break;
-            }
-
-            // Consume all input events anyways?
-            if (ctrl->getConsumeInputEvents())
-                return true;
-
-            ctrl = ctrl->getParent();
-        }
-    }
-    else
-    {
-        // If this was a press event, remove all focus
-        switch (evt)
-        {
-        case Mouse::MOUSE_PRESS_LEFT_BUTTON:
-        case Mouse::MOUSE_PRESS_MIDDLE_BUTTON:
-        case Mouse::MOUSE_PRESS_RIGHT_BUTTON:
-            setFocusControl(NULL);
-            break;
-        }
-    }
-
-    return false;
-    */
 }
 
 bool Form::keyEventInternal(Keyboard::KeyEvent evt, int key)

+ 1 - 1
gameplay/src/ImageControl.cpp

@@ -29,7 +29,7 @@ ImageControl* ImageControl::create(const char* id, Theme::Style* style)
     return imageControl;
 }
 
-ImageControl* ImageControl::create(Theme::Style* style, Properties* properties)
+Control* ImageControl::create(Theme::Style* style, Properties* properties, Theme* theme)
 {
     ImageControl* imageControl = new ImageControl();
     imageControl->initialize(style, properties);

+ 2 - 1
gameplay/src/ImageControl.h

@@ -36,6 +36,7 @@ namespace gameplay
 class ImageControl : public Control
 {
     friend class Container;
+    friend class ControlFactory;
 
 public:
 
@@ -117,7 +118,7 @@ protected:
     
     virtual ~ImageControl();
 
-    static ImageControl* create(Theme::Style* style, Properties* properties);
+    static Control* create(Theme::Style* style, Properties* properties, Theme* theme = NULL);
 
     virtual void initialize(Theme::Style* style, Properties* properties);
 

+ 1 - 1
gameplay/src/Joystick.cpp

@@ -28,7 +28,7 @@ Joystick* Joystick::create(const char* id, Theme::Style* style)
     return joystick;
 }
 
-Joystick* Joystick::create(Theme::Style* style, Properties* properties)
+Control* Joystick::create(Theme::Style* style, Properties* properties, Theme* theme)
 {
     Joystick* joystick = new Joystick();
     joystick->initialize(style, properties);

+ 1 - 1
gameplay/src/Label.cpp

@@ -27,7 +27,7 @@ Label* Label::create(const char* id, Theme::Style* style)
     return label;
 }
 
-Label* Label::create(Theme::Style* style, Properties* properties)
+Control* Label::create(Theme::Style* style, Properties* properties, Theme* theme)
 {
     Label* label = new Label();
     label->initialize(style, properties);

+ 1 - 1
gameplay/src/Label.h

@@ -94,7 +94,7 @@ protected:
      *
      * @param style The style to apply to this label.
      * @param properties The properties to set on this label.
-     * @param theme The theme to set on this control if needed
+     * @param theme The theme to set on this control if needed.
 	 * 
      * @return The new label.
      */

+ 1 - 1
gameplay/src/RadioButton.cpp

@@ -33,7 +33,7 @@ RadioButton* RadioButton::create(const char* id, Theme::Style* style)
     return radioButton;
 }
 
-RadioButton* RadioButton::create(Theme::Style* style, Properties* properties)
+Control* RadioButton::create(Theme::Style* style, Properties* properties, Theme* theme)
 {
     GP_ASSERT(properties);
 

+ 3 - 1
gameplay/src/RadioButton.h

@@ -37,6 +37,7 @@ namespace gameplay
 class RadioButton : public Button
 {
     friend class Container;
+    friend class ControlFactory;
 
 public:
 
@@ -125,10 +126,11 @@ protected:
      *
      * @param style The style to apply to this radio button.
      * @param properties The properties to set on this radio button.
+     * @param theme The theme to set on this control if needed.
      *
      * @return The new radio button.
      */
-    static RadioButton* create(Theme::Style* style, Properties* properties);
+    static Control* create(Theme::Style* style, Properties* properties, Theme* theme = NULL);
 
     /**
      * Keyboard callback on key events.

+ 1 - 1
gameplay/src/Slider.cpp

@@ -36,7 +36,7 @@ Slider* Slider::create(const char* id, Theme::Style* style)
     return slider;
 }
 
-Slider* Slider::create(Theme::Style* style, Properties* properties)
+Control* Slider::create(Theme::Style* style, Properties* properties, Theme* theme)
 {
     GP_ASSERT(properties);
 

+ 3 - 1
gameplay/src/Slider.h

@@ -33,6 +33,7 @@ namespace gameplay
 class Slider : public Label
 {
     friend class Container;
+    friend class ControlFactory;
 
 public:
 
@@ -181,10 +182,11 @@ protected:
      *
      * @param style The style to apply to this slider.
      * @param properties The properties to set on this slider.
+     * @param theme The theme to set on this control if needed.
      *
      * @return The new slider.
      */
-    static Slider* create(Theme::Style* style, Properties* properties);
+    static Control* create(Theme::Style* style, Properties* properties, Theme* theme = NULL);
 
     /**
      * Touch callback on touch events.  Controls return true if they consume the touch event.

+ 1 - 1
gameplay/src/TextBox.cpp

@@ -30,7 +30,7 @@ TextBox* TextBox::create(const char* id, Theme::Style* style)
     return textBox;
 }
 
-TextBox* TextBox::create(Theme::Style* style, Properties* properties)
+Control* TextBox::create(Theme::Style* style, Properties* properties, Theme* theme)
 {
     TextBox* textBox = new TextBox();
     textBox->initialize(style, properties);

+ 3 - 1
gameplay/src/TextBox.h

@@ -37,6 +37,7 @@ namespace gameplay
 class TextBox : public Label
 {
     friend class Container;
+    friend class ControlFactory;
 
 public:
 
@@ -143,10 +144,11 @@ protected:
      *
      * @param style The style to apply to this text box.
      * @param properties The properties to set on this text box.
+     * @param theme The theme to set on this control if needed.
      *
      * @return The new text box.
      */
-    static TextBox* create(Theme::Style* style, Properties* properties);
+    static Control* create(Theme::Style* style, Properties* properties, Theme* theme = NULL);
 
     /**
      * Touch callback on touch events.  Controls return true if they consume the touch event.

+ 308 - 0
gameplay/src/lua/lua_Button.cpp

@@ -31,6 +31,7 @@ void luaRegister_Button()
         {"addListener", lua_Button_addListener},
         {"addRef", lua_Button_addRef},
         {"addScriptCallback", lua_Button_addScriptCallback},
+        {"canFocus", lua_Button_canFocus},
         {"createAnimation", lua_Button_createAnimation},
         {"createAnimationFromBy", lua_Button_createAnimationFromBy},
         {"createAnimationFromTo", lua_Button_createAnimationFromTo},
@@ -71,14 +72,19 @@ void luaRegister_Button()
         {"getTextAlignment", lua_Button_getTextAlignment},
         {"getTextColor", lua_Button_getTextColor},
         {"getTextRightToLeft", lua_Button_getTextRightToLeft},
+        {"getTopLevelForm", lua_Button_getTopLevelForm},
         {"getWidth", lua_Button_getWidth},
         {"getX", lua_Button_getX},
         {"getY", lua_Button_getY},
         {"getZIndex", lua_Button_getZIndex},
+        {"hasFocus", lua_Button_hasFocus},
+        {"isChild", lua_Button_isChild},
         {"isContainer", lua_Button_isContainer},
         {"isEnabled", lua_Button_isEnabled},
+        {"isEnabledInHierarchy", lua_Button_isEnabledInHierarchy},
         {"isHeightPercentage", lua_Button_isHeightPercentage},
         {"isVisible", lua_Button_isVisible},
+        {"isVisibleInHierarchy", lua_Button_isVisibleInHierarchy},
         {"isWidthPercentage", lua_Button_isWidthPercentage},
         {"isXPercentage", lua_Button_isXPercentage},
         {"isYPercentage", lua_Button_isYPercentage},
@@ -91,10 +97,12 @@ void luaRegister_Button()
         {"setAutoWidth", lua_Button_setAutoWidth},
         {"setBorder", lua_Button_setBorder},
         {"setBounds", lua_Button_setBounds},
+        {"setCanFocus", lua_Button_setCanFocus},
         {"setConsumeInputEvents", lua_Button_setConsumeInputEvents},
         {"setCursorColor", lua_Button_setCursorColor},
         {"setCursorRegion", lua_Button_setCursorRegion},
         {"setEnabled", lua_Button_setEnabled},
+        {"setFocus", lua_Button_setFocus},
         {"setFocusIndex", lua_Button_setFocusIndex},
         {"setFont", lua_Button_setFont},
         {"setFontSize", lua_Button_setFontSize},
@@ -300,6 +308,41 @@ int lua_Button_addScriptCallback(lua_State* state)
     return 0;
 }
 
+int lua_Button_canFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Button* instance = getInstance(state);
+                bool result = instance->canFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Button_canFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Button_createAnimation(lua_State* state)
 {
     // Get the number of parameters.
@@ -2444,6 +2487,50 @@ int lua_Button_getTextRightToLeft(lua_State* state)
     return 0;
 }
 
+int lua_Button_getTopLevelForm(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Button* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getTopLevelForm();
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Form");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Button_getTopLevelForm - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Button_getWidth(lua_State* state)
 {
     // Get the number of parameters.
@@ -2584,6 +2671,86 @@ int lua_Button_getZIndex(lua_State* state)
     return 0;
 }
 
+int lua_Button_hasFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Button* instance = getInstance(state);
+                bool result = instance->hasFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Button_hasFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_Button_isChild(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
+                    lua_error(state);
+                }
+
+                Button* instance = getInstance(state);
+                bool result = instance->isChild(param1);
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Button_isChild - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Button_isContainer(lua_State* state)
 {
     // Get the number of parameters.
@@ -2654,6 +2821,41 @@ int lua_Button_isEnabled(lua_State* state)
     return 0;
 }
 
+int lua_Button_isEnabledInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Button* instance = getInstance(state);
+                bool result = instance->isEnabledInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Button_isEnabledInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Button_isHeightPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -2724,6 +2926,41 @@ int lua_Button_isVisible(lua_State* state)
     return 0;
 }
 
+int lua_Button_isVisibleInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Button* instance = getInstance(state);
+                bool result = instance->isVisibleInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Button_isVisibleInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Button_isWidthPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -3289,6 +3526,42 @@ int lua_Button_setBounds(lua_State* state)
     return 0;
 }
 
+int lua_Button_setCanFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
+
+                Button* instance = getInstance(state);
+                instance->setCanFocus(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Button_setCanFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Button_setConsumeInputEvents(lua_State* state)
 {
     // Get the number of parameters.
@@ -3453,6 +3726,41 @@ int lua_Button_setEnabled(lua_State* state)
     return 0;
 }
 
+int lua_Button_setFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Button* instance = getInstance(state);
+                bool result = instance->setFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Button_setFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Button_setFocusIndex(lua_State* state)
 {
     // Get the number of parameters.

+ 8 - 0
gameplay/src/lua/lua_Button.h

@@ -9,6 +9,7 @@ int lua_Button__gc(lua_State* state);
 int lua_Button_addListener(lua_State* state);
 int lua_Button_addRef(lua_State* state);
 int lua_Button_addScriptCallback(lua_State* state);
+int lua_Button_canFocus(lua_State* state);
 int lua_Button_createAnimation(lua_State* state);
 int lua_Button_createAnimationFromBy(lua_State* state);
 int lua_Button_createAnimationFromTo(lua_State* state);
@@ -49,14 +50,19 @@ int lua_Button_getText(lua_State* state);
 int lua_Button_getTextAlignment(lua_State* state);
 int lua_Button_getTextColor(lua_State* state);
 int lua_Button_getTextRightToLeft(lua_State* state);
+int lua_Button_getTopLevelForm(lua_State* state);
 int lua_Button_getWidth(lua_State* state);
 int lua_Button_getX(lua_State* state);
 int lua_Button_getY(lua_State* state);
 int lua_Button_getZIndex(lua_State* state);
+int lua_Button_hasFocus(lua_State* state);
+int lua_Button_isChild(lua_State* state);
 int lua_Button_isContainer(lua_State* state);
 int lua_Button_isEnabled(lua_State* state);
+int lua_Button_isEnabledInHierarchy(lua_State* state);
 int lua_Button_isHeightPercentage(lua_State* state);
 int lua_Button_isVisible(lua_State* state);
+int lua_Button_isVisibleInHierarchy(lua_State* state);
 int lua_Button_isWidthPercentage(lua_State* state);
 int lua_Button_isXPercentage(lua_State* state);
 int lua_Button_isYPercentage(lua_State* state);
@@ -69,10 +75,12 @@ int lua_Button_setAutoHeight(lua_State* state);
 int lua_Button_setAutoWidth(lua_State* state);
 int lua_Button_setBorder(lua_State* state);
 int lua_Button_setBounds(lua_State* state);
+int lua_Button_setCanFocus(lua_State* state);
 int lua_Button_setConsumeInputEvents(lua_State* state);
 int lua_Button_setCursorColor(lua_State* state);
 int lua_Button_setCursorRegion(lua_State* state);
 int lua_Button_setEnabled(lua_State* state);
+int lua_Button_setFocus(lua_State* state);
 int lua_Button_setFocusIndex(lua_State* state);
 int lua_Button_setFont(lua_State* state);
 int lua_Button_setFontSize(lua_State* state);

+ 308 - 0
gameplay/src/lua/lua_CheckBox.cpp

@@ -32,6 +32,7 @@ void luaRegister_CheckBox()
         {"addListener", lua_CheckBox_addListener},
         {"addRef", lua_CheckBox_addRef},
         {"addScriptCallback", lua_CheckBox_addScriptCallback},
+        {"canFocus", lua_CheckBox_canFocus},
         {"createAnimation", lua_CheckBox_createAnimation},
         {"createAnimationFromBy", lua_CheckBox_createAnimationFromBy},
         {"createAnimationFromTo", lua_CheckBox_createAnimationFromTo},
@@ -73,16 +74,21 @@ void luaRegister_CheckBox()
         {"getTextAlignment", lua_CheckBox_getTextAlignment},
         {"getTextColor", lua_CheckBox_getTextColor},
         {"getTextRightToLeft", lua_CheckBox_getTextRightToLeft},
+        {"getTopLevelForm", lua_CheckBox_getTopLevelForm},
         {"getType", lua_CheckBox_getType},
         {"getWidth", lua_CheckBox_getWidth},
         {"getX", lua_CheckBox_getX},
         {"getY", lua_CheckBox_getY},
         {"getZIndex", lua_CheckBox_getZIndex},
+        {"hasFocus", lua_CheckBox_hasFocus},
         {"isChecked", lua_CheckBox_isChecked},
+        {"isChild", lua_CheckBox_isChild},
         {"isContainer", lua_CheckBox_isContainer},
         {"isEnabled", lua_CheckBox_isEnabled},
+        {"isEnabledInHierarchy", lua_CheckBox_isEnabledInHierarchy},
         {"isHeightPercentage", lua_CheckBox_isHeightPercentage},
         {"isVisible", lua_CheckBox_isVisible},
+        {"isVisibleInHierarchy", lua_CheckBox_isVisibleInHierarchy},
         {"isWidthPercentage", lua_CheckBox_isWidthPercentage},
         {"isXPercentage", lua_CheckBox_isXPercentage},
         {"isYPercentage", lua_CheckBox_isYPercentage},
@@ -95,11 +101,13 @@ void luaRegister_CheckBox()
         {"setAutoWidth", lua_CheckBox_setAutoWidth},
         {"setBorder", lua_CheckBox_setBorder},
         {"setBounds", lua_CheckBox_setBounds},
+        {"setCanFocus", lua_CheckBox_setCanFocus},
         {"setChecked", lua_CheckBox_setChecked},
         {"setConsumeInputEvents", lua_CheckBox_setConsumeInputEvents},
         {"setCursorColor", lua_CheckBox_setCursorColor},
         {"setCursorRegion", lua_CheckBox_setCursorRegion},
         {"setEnabled", lua_CheckBox_setEnabled},
+        {"setFocus", lua_CheckBox_setFocus},
         {"setFocusIndex", lua_CheckBox_setFocusIndex},
         {"setFont", lua_CheckBox_setFont},
         {"setFontSize", lua_CheckBox_setFontSize},
@@ -306,6 +314,41 @@ int lua_CheckBox_addScriptCallback(lua_State* state)
     return 0;
 }
 
+int lua_CheckBox_canFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                CheckBox* instance = getInstance(state);
+                bool result = instance->canFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_CheckBox_canFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_CheckBox_createAnimation(lua_State* state)
 {
     // Get the number of parameters.
@@ -2494,6 +2537,50 @@ int lua_CheckBox_getTextRightToLeft(lua_State* state)
     return 0;
 }
 
+int lua_CheckBox_getTopLevelForm(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                CheckBox* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getTopLevelForm();
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Form");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_CheckBox_getTopLevelForm - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_CheckBox_getType(lua_State* state)
 {
     // Get the number of parameters.
@@ -2669,6 +2756,41 @@ int lua_CheckBox_getZIndex(lua_State* state)
     return 0;
 }
 
+int lua_CheckBox_hasFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                CheckBox* instance = getInstance(state);
+                bool result = instance->hasFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_CheckBox_hasFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_CheckBox_isChecked(lua_State* state)
 {
     // Get the number of parameters.
@@ -2704,6 +2826,51 @@ int lua_CheckBox_isChecked(lua_State* state)
     return 0;
 }
 
+int lua_CheckBox_isChild(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
+                    lua_error(state);
+                }
+
+                CheckBox* instance = getInstance(state);
+                bool result = instance->isChild(param1);
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_CheckBox_isChild - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_CheckBox_isContainer(lua_State* state)
 {
     // Get the number of parameters.
@@ -2774,6 +2941,41 @@ int lua_CheckBox_isEnabled(lua_State* state)
     return 0;
 }
 
+int lua_CheckBox_isEnabledInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                CheckBox* instance = getInstance(state);
+                bool result = instance->isEnabledInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_CheckBox_isEnabledInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_CheckBox_isHeightPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -2844,6 +3046,41 @@ int lua_CheckBox_isVisible(lua_State* state)
     return 0;
 }
 
+int lua_CheckBox_isVisibleInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                CheckBox* instance = getInstance(state);
+                bool result = instance->isVisibleInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_CheckBox_isVisibleInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_CheckBox_isWidthPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -3409,6 +3646,42 @@ int lua_CheckBox_setBounds(lua_State* state)
     return 0;
 }
 
+int lua_CheckBox_setCanFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
+
+                CheckBox* instance = getInstance(state);
+                instance->setCanFocus(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_CheckBox_setCanFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_CheckBox_setChecked(lua_State* state)
 {
     // Get the number of parameters.
@@ -3609,6 +3882,41 @@ int lua_CheckBox_setEnabled(lua_State* state)
     return 0;
 }
 
+int lua_CheckBox_setFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                CheckBox* instance = getInstance(state);
+                bool result = instance->setFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_CheckBox_setFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_CheckBox_setFocusIndex(lua_State* state)
 {
     // Get the number of parameters.

+ 8 - 0
gameplay/src/lua/lua_CheckBox.h

@@ -9,6 +9,7 @@ int lua_CheckBox__gc(lua_State* state);
 int lua_CheckBox_addListener(lua_State* state);
 int lua_CheckBox_addRef(lua_State* state);
 int lua_CheckBox_addScriptCallback(lua_State* state);
+int lua_CheckBox_canFocus(lua_State* state);
 int lua_CheckBox_createAnimation(lua_State* state);
 int lua_CheckBox_createAnimationFromBy(lua_State* state);
 int lua_CheckBox_createAnimationFromTo(lua_State* state);
@@ -50,16 +51,21 @@ int lua_CheckBox_getText(lua_State* state);
 int lua_CheckBox_getTextAlignment(lua_State* state);
 int lua_CheckBox_getTextColor(lua_State* state);
 int lua_CheckBox_getTextRightToLeft(lua_State* state);
+int lua_CheckBox_getTopLevelForm(lua_State* state);
 int lua_CheckBox_getType(lua_State* state);
 int lua_CheckBox_getWidth(lua_State* state);
 int lua_CheckBox_getX(lua_State* state);
 int lua_CheckBox_getY(lua_State* state);
 int lua_CheckBox_getZIndex(lua_State* state);
+int lua_CheckBox_hasFocus(lua_State* state);
 int lua_CheckBox_isChecked(lua_State* state);
+int lua_CheckBox_isChild(lua_State* state);
 int lua_CheckBox_isContainer(lua_State* state);
 int lua_CheckBox_isEnabled(lua_State* state);
+int lua_CheckBox_isEnabledInHierarchy(lua_State* state);
 int lua_CheckBox_isHeightPercentage(lua_State* state);
 int lua_CheckBox_isVisible(lua_State* state);
+int lua_CheckBox_isVisibleInHierarchy(lua_State* state);
 int lua_CheckBox_isWidthPercentage(lua_State* state);
 int lua_CheckBox_isXPercentage(lua_State* state);
 int lua_CheckBox_isYPercentage(lua_State* state);
@@ -72,11 +78,13 @@ int lua_CheckBox_setAutoHeight(lua_State* state);
 int lua_CheckBox_setAutoWidth(lua_State* state);
 int lua_CheckBox_setBorder(lua_State* state);
 int lua_CheckBox_setBounds(lua_State* state);
+int lua_CheckBox_setCanFocus(lua_State* state);
 int lua_CheckBox_setChecked(lua_State* state);
 int lua_CheckBox_setConsumeInputEvents(lua_State* state);
 int lua_CheckBox_setCursorColor(lua_State* state);
 int lua_CheckBox_setCursorRegion(lua_State* state);
 int lua_CheckBox_setEnabled(lua_State* state);
+int lua_CheckBox_setFocus(lua_State* state);
 int lua_CheckBox_setFocusIndex(lua_State* state);
 int lua_CheckBox_setFont(lua_State* state);
 int lua_CheckBox_setFontSize(lua_State* state);

+ 468 - 0
gameplay/src/lua/lua_Container.cpp

@@ -44,11 +44,13 @@ void luaRegister_Container()
         {"addListener", lua_Container_addListener},
         {"addRef", lua_Container_addRef},
         {"addScriptCallback", lua_Container_addScriptCallback},
+        {"canFocus", lua_Container_canFocus},
         {"createAnimation", lua_Container_createAnimation},
         {"createAnimationFromBy", lua_Container_createAnimationFromBy},
         {"createAnimationFromTo", lua_Container_createAnimationFromTo},
         {"destroyAnimation", lua_Container_destroyAnimation},
         {"getAbsoluteBounds", lua_Container_getAbsoluteBounds},
+        {"getActiveControl", lua_Container_getActiveControl},
         {"getAlignment", lua_Container_getAlignment},
         {"getAnimation", lua_Container_getAnimation},
         {"getAnimationPropertyComponentCount", lua_Container_getAnimationPropertyComponentCount},
@@ -61,6 +63,7 @@ void luaRegister_Container()
         {"getClipBounds", lua_Container_getClipBounds},
         {"getConsumeInputEvents", lua_Container_getConsumeInputEvents},
         {"getControl", lua_Container_getControl},
+        {"getControlCount", lua_Container_getControlCount},
         {"getCursorColor", lua_Container_getCursorColor},
         {"getCursorRegion", lua_Container_getCursorRegion},
         {"getCursorUVs", lua_Container_getCursorUVs},
@@ -90,18 +93,24 @@ void luaRegister_Container()
         {"getTextAlignment", lua_Container_getTextAlignment},
         {"getTextColor", lua_Container_getTextColor},
         {"getTextRightToLeft", lua_Container_getTextRightToLeft},
+        {"getTopLevelForm", lua_Container_getTopLevelForm},
         {"getType", lua_Container_getType},
         {"getWidth", lua_Container_getWidth},
         {"getX", lua_Container_getX},
         {"getY", lua_Container_getY},
         {"getZIndex", lua_Container_getZIndex},
+        {"hasFocus", lua_Container_hasFocus},
         {"insertControl", lua_Container_insertControl},
+        {"isChild", lua_Container_isChild},
         {"isContainer", lua_Container_isContainer},
         {"isEnabled", lua_Container_isEnabled},
+        {"isEnabledInHierarchy", lua_Container_isEnabledInHierarchy},
+        {"isForm", lua_Container_isForm},
         {"isHeightPercentage", lua_Container_isHeightPercentage},
         {"isScrollBarsAutoHide", lua_Container_isScrollBarsAutoHide},
         {"isScrolling", lua_Container_isScrolling},
         {"isVisible", lua_Container_isVisible},
+        {"isVisibleInHierarchy", lua_Container_isVisibleInHierarchy},
         {"isWidthPercentage", lua_Container_isWidthPercentage},
         {"isXPercentage", lua_Container_isXPercentage},
         {"isYPercentage", lua_Container_isYPercentage},
@@ -109,16 +118,19 @@ void luaRegister_Container()
         {"removeControl", lua_Container_removeControl},
         {"removeListener", lua_Container_removeListener},
         {"removeScriptCallback", lua_Container_removeScriptCallback},
+        {"setActiveControl", lua_Container_setActiveControl},
         {"setAlignment", lua_Container_setAlignment},
         {"setAnimationPropertyValue", lua_Container_setAnimationPropertyValue},
         {"setAutoHeight", lua_Container_setAutoHeight},
         {"setAutoWidth", lua_Container_setAutoWidth},
         {"setBorder", lua_Container_setBorder},
         {"setBounds", lua_Container_setBounds},
+        {"setCanFocus", lua_Container_setCanFocus},
         {"setConsumeInputEvents", lua_Container_setConsumeInputEvents},
         {"setCursorColor", lua_Container_setCursorColor},
         {"setCursorRegion", lua_Container_setCursorRegion},
         {"setEnabled", lua_Container_setEnabled},
+        {"setFocus", lua_Container_setFocus},
         {"setFocusIndex", lua_Container_setFocusIndex},
         {"setFont", lua_Container_setFont},
         {"setFontSize", lua_Container_setFontSize},
@@ -375,6 +387,41 @@ int lua_Container_addScriptCallback(lua_State* state)
     return 0;
 }
 
+int lua_Container_canFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Container* instance = getInstance(state);
+                bool result = instance->canFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Container_canFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Container_createAnimation(lua_State* state)
 {
     // Get the number of parameters.
@@ -808,6 +855,50 @@ int lua_Container_getAbsoluteBounds(lua_State* state)
     return 0;
 }
 
+int lua_Container_getActiveControl(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Container* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getActiveControl();
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Control");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Container_getActiveControl - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Container_getAlignment(lua_State* state)
 {
     // Get the number of parameters.
@@ -1391,6 +1482,41 @@ int lua_Container_getControl(lua_State* state)
     return 0;
 }
 
+int lua_Container_getControlCount(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Container* instance = getInstance(state);
+                unsigned int result = instance->getControlCount();
+
+                // Push the return value onto the stack.
+                lua_pushunsigned(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Container_getControlCount - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Container_getCursorColor(lua_State* state)
 {
     // Get the number of parameters.
@@ -2790,6 +2916,50 @@ int lua_Container_getTextRightToLeft(lua_State* state)
     return 0;
 }
 
+int lua_Container_getTopLevelForm(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Container* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getTopLevelForm();
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Form");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Container_getTopLevelForm - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Container_getType(lua_State* state)
 {
     // Get the number of parameters.
@@ -2965,6 +3135,41 @@ int lua_Container_getZIndex(lua_State* state)
     return 0;
 }
 
+int lua_Container_hasFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Container* instance = getInstance(state);
+                bool result = instance->hasFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Container_hasFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Container_insertControl(lua_State* state)
 {
     // Get the number of parameters.
@@ -3011,6 +3216,51 @@ int lua_Container_insertControl(lua_State* state)
     return 0;
 }
 
+int lua_Container_isChild(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
+                    lua_error(state);
+                }
+
+                Container* instance = getInstance(state);
+                bool result = instance->isChild(param1);
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Container_isChild - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Container_isContainer(lua_State* state)
 {
     // Get the number of parameters.
@@ -3081,6 +3331,76 @@ int lua_Container_isEnabled(lua_State* state)
     return 0;
 }
 
+int lua_Container_isEnabledInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Container* instance = getInstance(state);
+                bool result = instance->isEnabledInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Container_isEnabledInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_Container_isForm(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Container* instance = getInstance(state);
+                bool result = instance->isForm();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Container_isForm - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Container_isHeightPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -3221,6 +3541,41 @@ int lua_Container_isVisible(lua_State* state)
     return 0;
 }
 
+int lua_Container_isVisibleInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Container* instance = getInstance(state);
+                bool result = instance->isVisibleInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Container_isVisibleInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Container_isWidthPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -3512,6 +3867,48 @@ int lua_Container_removeScriptCallback(lua_State* state)
     return 0;
 }
 
+int lua_Container_setActiveControl(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
+                    lua_error(state);
+                }
+
+                Container* instance = getInstance(state);
+                instance->setActiveControl(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Container_setActiveControl - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Container_setAlignment(lua_State* state)
 {
     // Get the number of parameters.
@@ -3858,6 +4255,42 @@ int lua_Container_setBounds(lua_State* state)
     return 0;
 }
 
+int lua_Container_setCanFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
+
+                Container* instance = getInstance(state);
+                instance->setCanFocus(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Container_setCanFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Container_setConsumeInputEvents(lua_State* state)
 {
     // Get the number of parameters.
@@ -4022,6 +4455,41 @@ int lua_Container_setEnabled(lua_State* state)
     return 0;
 }
 
+int lua_Container_setFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Container* instance = getInstance(state);
+                bool result = instance->setFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Container_setFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Container_setFocusIndex(lua_State* state)
 {
     // Get the number of parameters.

+ 12 - 0
gameplay/src/lua/lua_Container.h

@@ -10,11 +10,13 @@ int lua_Container_addControl(lua_State* state);
 int lua_Container_addListener(lua_State* state);
 int lua_Container_addRef(lua_State* state);
 int lua_Container_addScriptCallback(lua_State* state);
+int lua_Container_canFocus(lua_State* state);
 int lua_Container_createAnimation(lua_State* state);
 int lua_Container_createAnimationFromBy(lua_State* state);
 int lua_Container_createAnimationFromTo(lua_State* state);
 int lua_Container_destroyAnimation(lua_State* state);
 int lua_Container_getAbsoluteBounds(lua_State* state);
+int lua_Container_getActiveControl(lua_State* state);
 int lua_Container_getAlignment(lua_State* state);
 int lua_Container_getAnimation(lua_State* state);
 int lua_Container_getAnimationPropertyComponentCount(lua_State* state);
@@ -27,6 +29,7 @@ int lua_Container_getClip(lua_State* state);
 int lua_Container_getClipBounds(lua_State* state);
 int lua_Container_getConsumeInputEvents(lua_State* state);
 int lua_Container_getControl(lua_State* state);
+int lua_Container_getControlCount(lua_State* state);
 int lua_Container_getCursorColor(lua_State* state);
 int lua_Container_getCursorRegion(lua_State* state);
 int lua_Container_getCursorUVs(lua_State* state);
@@ -56,18 +59,24 @@ int lua_Container_getStyle(lua_State* state);
 int lua_Container_getTextAlignment(lua_State* state);
 int lua_Container_getTextColor(lua_State* state);
 int lua_Container_getTextRightToLeft(lua_State* state);
+int lua_Container_getTopLevelForm(lua_State* state);
 int lua_Container_getType(lua_State* state);
 int lua_Container_getWidth(lua_State* state);
 int lua_Container_getX(lua_State* state);
 int lua_Container_getY(lua_State* state);
 int lua_Container_getZIndex(lua_State* state);
+int lua_Container_hasFocus(lua_State* state);
 int lua_Container_insertControl(lua_State* state);
+int lua_Container_isChild(lua_State* state);
 int lua_Container_isContainer(lua_State* state);
 int lua_Container_isEnabled(lua_State* state);
+int lua_Container_isEnabledInHierarchy(lua_State* state);
+int lua_Container_isForm(lua_State* state);
 int lua_Container_isHeightPercentage(lua_State* state);
 int lua_Container_isScrollBarsAutoHide(lua_State* state);
 int lua_Container_isScrolling(lua_State* state);
 int lua_Container_isVisible(lua_State* state);
+int lua_Container_isVisibleInHierarchy(lua_State* state);
 int lua_Container_isWidthPercentage(lua_State* state);
 int lua_Container_isXPercentage(lua_State* state);
 int lua_Container_isYPercentage(lua_State* state);
@@ -75,16 +84,19 @@ int lua_Container_release(lua_State* state);
 int lua_Container_removeControl(lua_State* state);
 int lua_Container_removeListener(lua_State* state);
 int lua_Container_removeScriptCallback(lua_State* state);
+int lua_Container_setActiveControl(lua_State* state);
 int lua_Container_setAlignment(lua_State* state);
 int lua_Container_setAnimationPropertyValue(lua_State* state);
 int lua_Container_setAutoHeight(lua_State* state);
 int lua_Container_setAutoWidth(lua_State* state);
 int lua_Container_setBorder(lua_State* state);
 int lua_Container_setBounds(lua_State* state);
+int lua_Container_setCanFocus(lua_State* state);
 int lua_Container_setConsumeInputEvents(lua_State* state);
 int lua_Container_setCursorColor(lua_State* state);
 int lua_Container_setCursorRegion(lua_State* state);
 int lua_Container_setEnabled(lua_State* state);
+int lua_Container_setFocus(lua_State* state);
 int lua_Container_setFocusIndex(lua_State* state);
 int lua_Container_setFont(lua_State* state);
 int lua_Container_setFontSize(lua_State* state);

+ 308 - 0
gameplay/src/lua/lua_Control.cpp

@@ -28,6 +28,7 @@ void luaRegister_Control()
         {"addListener", lua_Control_addListener},
         {"addRef", lua_Control_addRef},
         {"addScriptCallback", lua_Control_addScriptCallback},
+        {"canFocus", lua_Control_canFocus},
         {"createAnimation", lua_Control_createAnimation},
         {"createAnimationFromBy", lua_Control_createAnimationFromBy},
         {"createAnimationFromTo", lua_Control_createAnimationFromTo},
@@ -67,15 +68,20 @@ void luaRegister_Control()
         {"getTextAlignment", lua_Control_getTextAlignment},
         {"getTextColor", lua_Control_getTextColor},
         {"getTextRightToLeft", lua_Control_getTextRightToLeft},
+        {"getTopLevelForm", lua_Control_getTopLevelForm},
         {"getType", lua_Control_getType},
         {"getWidth", lua_Control_getWidth},
         {"getX", lua_Control_getX},
         {"getY", lua_Control_getY},
         {"getZIndex", lua_Control_getZIndex},
+        {"hasFocus", lua_Control_hasFocus},
+        {"isChild", lua_Control_isChild},
         {"isContainer", lua_Control_isContainer},
         {"isEnabled", lua_Control_isEnabled},
+        {"isEnabledInHierarchy", lua_Control_isEnabledInHierarchy},
         {"isHeightPercentage", lua_Control_isHeightPercentage},
         {"isVisible", lua_Control_isVisible},
+        {"isVisibleInHierarchy", lua_Control_isVisibleInHierarchy},
         {"isWidthPercentage", lua_Control_isWidthPercentage},
         {"isXPercentage", lua_Control_isXPercentage},
         {"isYPercentage", lua_Control_isYPercentage},
@@ -88,10 +94,12 @@ void luaRegister_Control()
         {"setAutoWidth", lua_Control_setAutoWidth},
         {"setBorder", lua_Control_setBorder},
         {"setBounds", lua_Control_setBounds},
+        {"setCanFocus", lua_Control_setCanFocus},
         {"setConsumeInputEvents", lua_Control_setConsumeInputEvents},
         {"setCursorColor", lua_Control_setCursorColor},
         {"setCursorRegion", lua_Control_setCursorRegion},
         {"setEnabled", lua_Control_setEnabled},
+        {"setFocus", lua_Control_setFocus},
         {"setFocusIndex", lua_Control_setFocusIndex},
         {"setFont", lua_Control_setFont},
         {"setFontSize", lua_Control_setFontSize},
@@ -295,6 +303,41 @@ int lua_Control_addScriptCallback(lua_State* state)
     return 0;
 }
 
+int lua_Control_canFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Control* instance = getInstance(state);
+                bool result = instance->canFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Control_canFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Control_createAnimation(lua_State* state)
 {
     // Get the number of parameters.
@@ -2404,6 +2447,50 @@ int lua_Control_getTextRightToLeft(lua_State* state)
     return 0;
 }
 
+int lua_Control_getTopLevelForm(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Control* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getTopLevelForm();
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Form");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Control_getTopLevelForm - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Control_getType(lua_State* state)
 {
     // Get the number of parameters.
@@ -2579,6 +2666,86 @@ int lua_Control_getZIndex(lua_State* state)
     return 0;
 }
 
+int lua_Control_hasFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Control* instance = getInstance(state);
+                bool result = instance->hasFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Control_hasFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_Control_isChild(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
+                    lua_error(state);
+                }
+
+                Control* instance = getInstance(state);
+                bool result = instance->isChild(param1);
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Control_isChild - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Control_isContainer(lua_State* state)
 {
     // Get the number of parameters.
@@ -2649,6 +2816,41 @@ int lua_Control_isEnabled(lua_State* state)
     return 0;
 }
 
+int lua_Control_isEnabledInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Control* instance = getInstance(state);
+                bool result = instance->isEnabledInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Control_isEnabledInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Control_isHeightPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -2719,6 +2921,41 @@ int lua_Control_isVisible(lua_State* state)
     return 0;
 }
 
+int lua_Control_isVisibleInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Control* instance = getInstance(state);
+                bool result = instance->isVisibleInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Control_isVisibleInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Control_isWidthPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -3284,6 +3521,42 @@ int lua_Control_setBounds(lua_State* state)
     return 0;
 }
 
+int lua_Control_setCanFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
+
+                Control* instance = getInstance(state);
+                instance->setCanFocus(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Control_setCanFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Control_setConsumeInputEvents(lua_State* state)
 {
     // Get the number of parameters.
@@ -3448,6 +3721,41 @@ int lua_Control_setEnabled(lua_State* state)
     return 0;
 }
 
+int lua_Control_setFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Control* instance = getInstance(state);
+                bool result = instance->setFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Control_setFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Control_setFocusIndex(lua_State* state)
 {
     // Get the number of parameters.

+ 8 - 0
gameplay/src/lua/lua_Control.h

@@ -9,6 +9,7 @@ int lua_Control__gc(lua_State* state);
 int lua_Control_addListener(lua_State* state);
 int lua_Control_addRef(lua_State* state);
 int lua_Control_addScriptCallback(lua_State* state);
+int lua_Control_canFocus(lua_State* state);
 int lua_Control_createAnimation(lua_State* state);
 int lua_Control_createAnimationFromBy(lua_State* state);
 int lua_Control_createAnimationFromTo(lua_State* state);
@@ -48,15 +49,20 @@ int lua_Control_getStyle(lua_State* state);
 int lua_Control_getTextAlignment(lua_State* state);
 int lua_Control_getTextColor(lua_State* state);
 int lua_Control_getTextRightToLeft(lua_State* state);
+int lua_Control_getTopLevelForm(lua_State* state);
 int lua_Control_getType(lua_State* state);
 int lua_Control_getWidth(lua_State* state);
 int lua_Control_getX(lua_State* state);
 int lua_Control_getY(lua_State* state);
 int lua_Control_getZIndex(lua_State* state);
+int lua_Control_hasFocus(lua_State* state);
+int lua_Control_isChild(lua_State* state);
 int lua_Control_isContainer(lua_State* state);
 int lua_Control_isEnabled(lua_State* state);
+int lua_Control_isEnabledInHierarchy(lua_State* state);
 int lua_Control_isHeightPercentage(lua_State* state);
 int lua_Control_isVisible(lua_State* state);
+int lua_Control_isVisibleInHierarchy(lua_State* state);
 int lua_Control_isWidthPercentage(lua_State* state);
 int lua_Control_isXPercentage(lua_State* state);
 int lua_Control_isYPercentage(lua_State* state);
@@ -69,10 +75,12 @@ int lua_Control_setAutoHeight(lua_State* state);
 int lua_Control_setAutoWidth(lua_State* state);
 int lua_Control_setBorder(lua_State* state);
 int lua_Control_setBounds(lua_State* state);
+int lua_Control_setCanFocus(lua_State* state);
 int lua_Control_setConsumeInputEvents(lua_State* state);
 int lua_Control_setCursorColor(lua_State* state);
 int lua_Control_setCursorRegion(lua_State* state);
 int lua_Control_setEnabled(lua_State* state);
+int lua_Control_setFocus(lua_State* state);
 int lua_Control_setFocusIndex(lua_State* state);
 int lua_Control_setFont(lua_State* state);
 int lua_Control_setFontSize(lua_State* state);

+ 10 - 0
gameplay/src/lua/lua_ControlListenerEventType.cpp

@@ -15,6 +15,8 @@ static const char* luaEnumString_ControlListenerEventType_MIDDLE_CLICK = "MIDDLE
 static const char* luaEnumString_ControlListenerEventType_RIGHT_CLICK = "RIGHT_CLICK";
 static const char* luaEnumString_ControlListenerEventType_ENTER = "ENTER";
 static const char* luaEnumString_ControlListenerEventType_LEAVE = "LEAVE";
+static const char* luaEnumString_ControlListenerEventType_FOCUS_GAINED = "FOCUS_GAINED";
+static const char* luaEnumString_ControlListenerEventType_FOCUS_LOST = "FOCUS_LOST";
 
 Control::Listener::EventType lua_enumFromString_ControlListenerEventType(const char* s)
 {
@@ -36,6 +38,10 @@ Control::Listener::EventType lua_enumFromString_ControlListenerEventType(const c
         return Control::Listener::ENTER;
     if (strcmp(s, luaEnumString_ControlListenerEventType_LEAVE) == 0)
         return Control::Listener::LEAVE;
+    if (strcmp(s, luaEnumString_ControlListenerEventType_FOCUS_GAINED) == 0)
+        return Control::Listener::FOCUS_GAINED;
+    if (strcmp(s, luaEnumString_ControlListenerEventType_FOCUS_LOST) == 0)
+        return Control::Listener::FOCUS_LOST;
     return Control::Listener::PRESS;
 }
 
@@ -59,6 +65,10 @@ const char* lua_stringFromEnum_ControlListenerEventType(Control::Listener::Event
         return luaEnumString_ControlListenerEventType_ENTER;
     if (e == Control::Listener::LEAVE)
         return luaEnumString_ControlListenerEventType_LEAVE;
+    if (e == Control::Listener::FOCUS_GAINED)
+        return luaEnumString_ControlListenerEventType_FOCUS_GAINED;
+    if (e == Control::Listener::FOCUS_LOST)
+        return luaEnumString_ControlListenerEventType_FOCUS_LOST;
     return enumStringEmpty;
 }
 

+ 40 - 0
gameplay/src/lua/lua_Font.cpp

@@ -28,6 +28,7 @@ void luaRegister_Font()
         {"getRefCount", lua_Font_getRefCount},
         {"getSize", lua_Font_getSize},
         {"getSpriteBatch", lua_Font_getSpriteBatch},
+        {"isCharacterSupported", lua_Font_isCharacterSupported},
         {"measureText", lua_Font_measureText},
         {"release", lua_Font_release},
         {"setCharacterSpacing", lua_Font_setCharacterSpacing},
@@ -1762,6 +1763,45 @@ int lua_Font_getSpriteBatch(lua_State* state)
     return 0;
 }
 
+int lua_Font_isCharacterSupported(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                int param1 = (int)luaL_checkint(state, 2);
+
+                Font* instance = getInstance(state);
+                bool result = instance->isCharacterSupported(param1);
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Font_isCharacterSupported - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Font_measureText(lua_State* state)
 {
     // Get the number of parameters.

+ 1 - 0
gameplay/src/lua/lua_Font.h

@@ -17,6 +17,7 @@ int lua_Font_getLocationAtIndex(lua_State* state);
 int lua_Font_getRefCount(lua_State* state);
 int lua_Font_getSize(lua_State* state);
 int lua_Font_getSpriteBatch(lua_State* state);
+int lua_Font_isCharacterSupported(lua_State* state);
 int lua_Font_measureText(lua_State* state);
 int lua_Font_release(lua_State* state);
 int lua_Font_setCharacterSpacing(lua_State* state);

+ 532 - 0
gameplay/src/lua/lua_Form.cpp

@@ -46,12 +46,14 @@ void luaRegister_Form()
         {"addListener", lua_Form_addListener},
         {"addRef", lua_Form_addRef},
         {"addScriptCallback", lua_Form_addScriptCallback},
+        {"canFocus", lua_Form_canFocus},
         {"createAnimation", lua_Form_createAnimation},
         {"createAnimationFromBy", lua_Form_createAnimationFromBy},
         {"createAnimationFromTo", lua_Form_createAnimationFromTo},
         {"destroyAnimation", lua_Form_destroyAnimation},
         {"draw", lua_Form_draw},
         {"getAbsoluteBounds", lua_Form_getAbsoluteBounds},
+        {"getActiveControl", lua_Form_getActiveControl},
         {"getAlignment", lua_Form_getAlignment},
         {"getAnimation", lua_Form_getAnimation},
         {"getAnimationPropertyComponentCount", lua_Form_getAnimationPropertyComponentCount},
@@ -64,6 +66,7 @@ void luaRegister_Form()
         {"getClipBounds", lua_Form_getClipBounds},
         {"getConsumeInputEvents", lua_Form_getConsumeInputEvents},
         {"getControl", lua_Form_getControl},
+        {"getControlCount", lua_Form_getControlCount},
         {"getCursorColor", lua_Form_getCursorColor},
         {"getCursorRegion", lua_Form_getCursorRegion},
         {"getCursorUVs", lua_Form_getCursorUVs},
@@ -94,18 +97,24 @@ void luaRegister_Form()
         {"getTextColor", lua_Form_getTextColor},
         {"getTextRightToLeft", lua_Form_getTextRightToLeft},
         {"getTheme", lua_Form_getTheme},
+        {"getTopLevelForm", lua_Form_getTopLevelForm},
         {"getType", lua_Form_getType},
         {"getWidth", lua_Form_getWidth},
         {"getX", lua_Form_getX},
         {"getY", lua_Form_getY},
         {"getZIndex", lua_Form_getZIndex},
+        {"hasFocus", lua_Form_hasFocus},
         {"insertControl", lua_Form_insertControl},
+        {"isChild", lua_Form_isChild},
         {"isContainer", lua_Form_isContainer},
         {"isEnabled", lua_Form_isEnabled},
+        {"isEnabledInHierarchy", lua_Form_isEnabledInHierarchy},
+        {"isForm", lua_Form_isForm},
         {"isHeightPercentage", lua_Form_isHeightPercentage},
         {"isScrollBarsAutoHide", lua_Form_isScrollBarsAutoHide},
         {"isScrolling", lua_Form_isScrolling},
         {"isVisible", lua_Form_isVisible},
+        {"isVisibleInHierarchy", lua_Form_isVisibleInHierarchy},
         {"isWidthPercentage", lua_Form_isWidthPercentage},
         {"isXPercentage", lua_Form_isXPercentage},
         {"isYPercentage", lua_Form_isYPercentage},
@@ -113,16 +122,19 @@ void luaRegister_Form()
         {"removeControl", lua_Form_removeControl},
         {"removeListener", lua_Form_removeListener},
         {"removeScriptCallback", lua_Form_removeScriptCallback},
+        {"setActiveControl", lua_Form_setActiveControl},
         {"setAlignment", lua_Form_setAlignment},
         {"setAnimationPropertyValue", lua_Form_setAnimationPropertyValue},
         {"setAutoHeight", lua_Form_setAutoHeight},
         {"setAutoWidth", lua_Form_setAutoWidth},
         {"setBorder", lua_Form_setBorder},
         {"setBounds", lua_Form_setBounds},
+        {"setCanFocus", lua_Form_setCanFocus},
         {"setConsumeInputEvents", lua_Form_setConsumeInputEvents},
         {"setCursorColor", lua_Form_setCursorColor},
         {"setCursorRegion", lua_Form_setCursorRegion},
         {"setEnabled", lua_Form_setEnabled},
+        {"setFocus", lua_Form_setFocus},
         {"setFocusIndex", lua_Form_setFocusIndex},
         {"setFont", lua_Form_setFont},
         {"setFontSize", lua_Form_setFontSize},
@@ -165,8 +177,10 @@ void luaRegister_Form()
         {"ANIMATE_SIZE", lua_Form_static_ANIMATE_SIZE},
         {"ANIMATE_SIZE_HEIGHT", lua_Form_static_ANIMATE_SIZE_HEIGHT},
         {"ANIMATE_SIZE_WIDTH", lua_Form_static_ANIMATE_SIZE_WIDTH},
+        {"clearFocus", lua_Form_static_clearFocus},
         {"create", lua_Form_static_create},
         {"getActiveControl", lua_Form_static_getActiveControl},
+        {"getFocusControl", lua_Form_static_getFocusControl},
         {"getForm", lua_Form_static_getForm},
         {NULL, NULL}
     };
@@ -383,6 +397,41 @@ int lua_Form_addScriptCallback(lua_State* state)
     return 0;
 }
 
+int lua_Form_canFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Form* instance = getInstance(state);
+                bool result = instance->canFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Form_canFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Form_createAnimation(lua_State* state)
 {
     // Get the number of parameters.
@@ -851,6 +900,50 @@ int lua_Form_getAbsoluteBounds(lua_State* state)
     return 0;
 }
 
+int lua_Form_getActiveControl(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Form* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getActiveControl();
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Control");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Form_getActiveControl - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Form_getAlignment(lua_State* state)
 {
     // Get the number of parameters.
@@ -1434,6 +1527,41 @@ int lua_Form_getControl(lua_State* state)
     return 0;
 }
 
+int lua_Form_getControlCount(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Form* instance = getInstance(state);
+                unsigned int result = instance->getControlCount();
+
+                // Push the return value onto the stack.
+                lua_pushunsigned(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Form_getControlCount - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Form_getCursorColor(lua_State* state)
 {
     // Get the number of parameters.
@@ -2877,6 +3005,50 @@ int lua_Form_getTheme(lua_State* state)
     return 0;
 }
 
+int lua_Form_getTopLevelForm(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Form* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getTopLevelForm();
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Form");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Form_getTopLevelForm - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Form_getType(lua_State* state)
 {
     // Get the number of parameters.
@@ -3052,6 +3224,41 @@ int lua_Form_getZIndex(lua_State* state)
     return 0;
 }
 
+int lua_Form_hasFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Form* instance = getInstance(state);
+                bool result = instance->hasFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Form_hasFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Form_insertControl(lua_State* state)
 {
     // Get the number of parameters.
@@ -3098,6 +3305,51 @@ int lua_Form_insertControl(lua_State* state)
     return 0;
 }
 
+int lua_Form_isChild(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
+                    lua_error(state);
+                }
+
+                Form* instance = getInstance(state);
+                bool result = instance->isChild(param1);
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Form_isChild - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Form_isContainer(lua_State* state)
 {
     // Get the number of parameters.
@@ -3168,6 +3420,76 @@ int lua_Form_isEnabled(lua_State* state)
     return 0;
 }
 
+int lua_Form_isEnabledInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Form* instance = getInstance(state);
+                bool result = instance->isEnabledInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Form_isEnabledInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_Form_isForm(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Form* instance = getInstance(state);
+                bool result = instance->isForm();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Form_isForm - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Form_isHeightPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -3308,6 +3630,41 @@ int lua_Form_isVisible(lua_State* state)
     return 0;
 }
 
+int lua_Form_isVisibleInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Form* instance = getInstance(state);
+                bool result = instance->isVisibleInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Form_isVisibleInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Form_isWidthPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -3599,6 +3956,48 @@ int lua_Form_removeScriptCallback(lua_State* state)
     return 0;
 }
 
+int lua_Form_setActiveControl(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
+                    lua_error(state);
+                }
+
+                Form* instance = getInstance(state);
+                instance->setActiveControl(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Form_setActiveControl - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Form_setAlignment(lua_State* state)
 {
     // Get the number of parameters.
@@ -3945,6 +4344,42 @@ int lua_Form_setBounds(lua_State* state)
     return 0;
 }
 
+int lua_Form_setCanFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
+
+                Form* instance = getInstance(state);
+                instance->setCanFocus(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Form_setCanFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Form_setConsumeInputEvents(lua_State* state)
 {
     // Get the number of parameters.
@@ -4109,6 +4544,41 @@ int lua_Form_setEnabled(lua_State* state)
     return 0;
 }
 
+int lua_Form_setFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Form* instance = getInstance(state);
+                bool result = instance->setFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Form_setFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Form_setFocusIndex(lua_State* state)
 {
     // Get the number of parameters.
@@ -5735,6 +6205,31 @@ int lua_Form_static_ANIMATE_SIZE_WIDTH(lua_State* state)
     return 1;
 }
 
+int lua_Form_static_clearFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 0:
+        {
+            Form::clearFocus();
+            
+            return 0;
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 0).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Form_static_create(lua_State* state)
 {
     // Get the number of parameters.
@@ -5901,6 +6396,43 @@ int lua_Form_static_getActiveControl(lua_State* state)
     return 0;
 }
 
+int lua_Form_static_getFocusControl(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 0:
+        {
+            void* returnPtr = (void*)Form::getFocusControl();
+            if (returnPtr)
+            {
+                gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                object->instance = returnPtr;
+                object->owns = false;
+                luaL_getmetatable(state, "Control");
+                lua_setmetatable(state, -2);
+            }
+            else
+            {
+                lua_pushnil(state);
+            }
+
+            return 1;
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 0).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Form_static_getForm(lua_State* state)
 {
     // Get the number of parameters.

+ 14 - 0
gameplay/src/lua/lua_Form.h

@@ -10,12 +10,14 @@ int lua_Form_addControl(lua_State* state);
 int lua_Form_addListener(lua_State* state);
 int lua_Form_addRef(lua_State* state);
 int lua_Form_addScriptCallback(lua_State* state);
+int lua_Form_canFocus(lua_State* state);
 int lua_Form_createAnimation(lua_State* state);
 int lua_Form_createAnimationFromBy(lua_State* state);
 int lua_Form_createAnimationFromTo(lua_State* state);
 int lua_Form_destroyAnimation(lua_State* state);
 int lua_Form_draw(lua_State* state);
 int lua_Form_getAbsoluteBounds(lua_State* state);
+int lua_Form_getActiveControl(lua_State* state);
 int lua_Form_getAlignment(lua_State* state);
 int lua_Form_getAnimation(lua_State* state);
 int lua_Form_getAnimationPropertyComponentCount(lua_State* state);
@@ -28,6 +30,7 @@ int lua_Form_getClip(lua_State* state);
 int lua_Form_getClipBounds(lua_State* state);
 int lua_Form_getConsumeInputEvents(lua_State* state);
 int lua_Form_getControl(lua_State* state);
+int lua_Form_getControlCount(lua_State* state);
 int lua_Form_getCursorColor(lua_State* state);
 int lua_Form_getCursorRegion(lua_State* state);
 int lua_Form_getCursorUVs(lua_State* state);
@@ -58,18 +61,24 @@ int lua_Form_getTextAlignment(lua_State* state);
 int lua_Form_getTextColor(lua_State* state);
 int lua_Form_getTextRightToLeft(lua_State* state);
 int lua_Form_getTheme(lua_State* state);
+int lua_Form_getTopLevelForm(lua_State* state);
 int lua_Form_getType(lua_State* state);
 int lua_Form_getWidth(lua_State* state);
 int lua_Form_getX(lua_State* state);
 int lua_Form_getY(lua_State* state);
 int lua_Form_getZIndex(lua_State* state);
+int lua_Form_hasFocus(lua_State* state);
 int lua_Form_insertControl(lua_State* state);
+int lua_Form_isChild(lua_State* state);
 int lua_Form_isContainer(lua_State* state);
 int lua_Form_isEnabled(lua_State* state);
+int lua_Form_isEnabledInHierarchy(lua_State* state);
+int lua_Form_isForm(lua_State* state);
 int lua_Form_isHeightPercentage(lua_State* state);
 int lua_Form_isScrollBarsAutoHide(lua_State* state);
 int lua_Form_isScrolling(lua_State* state);
 int lua_Form_isVisible(lua_State* state);
+int lua_Form_isVisibleInHierarchy(lua_State* state);
 int lua_Form_isWidthPercentage(lua_State* state);
 int lua_Form_isXPercentage(lua_State* state);
 int lua_Form_isYPercentage(lua_State* state);
@@ -77,16 +86,19 @@ int lua_Form_release(lua_State* state);
 int lua_Form_removeControl(lua_State* state);
 int lua_Form_removeListener(lua_State* state);
 int lua_Form_removeScriptCallback(lua_State* state);
+int lua_Form_setActiveControl(lua_State* state);
 int lua_Form_setAlignment(lua_State* state);
 int lua_Form_setAnimationPropertyValue(lua_State* state);
 int lua_Form_setAutoHeight(lua_State* state);
 int lua_Form_setAutoWidth(lua_State* state);
 int lua_Form_setBorder(lua_State* state);
 int lua_Form_setBounds(lua_State* state);
+int lua_Form_setCanFocus(lua_State* state);
 int lua_Form_setConsumeInputEvents(lua_State* state);
 int lua_Form_setCursorColor(lua_State* state);
 int lua_Form_setCursorRegion(lua_State* state);
 int lua_Form_setEnabled(lua_State* state);
+int lua_Form_setFocus(lua_State* state);
 int lua_Form_setFocusIndex(lua_State* state);
 int lua_Form_setFont(lua_State* state);
 int lua_Form_setFontSize(lua_State* state);
@@ -124,8 +136,10 @@ int lua_Form_static_ANIMATE_SCROLLBAR_OPACITY(lua_State* state);
 int lua_Form_static_ANIMATE_SIZE(lua_State* state);
 int lua_Form_static_ANIMATE_SIZE_HEIGHT(lua_State* state);
 int lua_Form_static_ANIMATE_SIZE_WIDTH(lua_State* state);
+int lua_Form_static_clearFocus(lua_State* state);
 int lua_Form_static_create(lua_State* state);
 int lua_Form_static_getActiveControl(lua_State* state);
+int lua_Form_static_getFocusControl(lua_State* state);
 int lua_Form_static_getForm(lua_State* state);
 int lua_Form_update(lua_State* state);
 

+ 2 - 2
gameplay/src/lua/lua_Global.cpp

@@ -22,7 +22,6 @@ void luaRegister_lua_Global()
     gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "TextBox");
     gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Transform");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Button", "CheckBox");
-    gameplay::ScriptUtil::setGlobalHierarchyPair("Button", "ImageControl");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Button", "RadioButton");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Camera::Listener", "TerrainPatch");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Container", "Form");
@@ -38,7 +37,6 @@ void luaRegister_lua_Global()
     gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "TextBox");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Label", "Button");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Label", "CheckBox");
-    gameplay::ScriptUtil::setGlobalHierarchyPair("Label", "ImageControl");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Label", "RadioButton");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Label", "Slider");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Label", "TextBox");
@@ -239,6 +237,8 @@ void luaRegister_lua_Global()
         gameplay::ScriptUtil::registerConstantString("RIGHT_CLICK", "RIGHT_CLICK", scopePath);
         gameplay::ScriptUtil::registerConstantString("ENTER", "ENTER", scopePath);
         gameplay::ScriptUtil::registerConstantString("LEAVE", "LEAVE", scopePath);
+        gameplay::ScriptUtil::registerConstantString("FOCUS_GAINED", "FOCUS_GAINED", scopePath);
+        gameplay::ScriptUtil::registerConstantString("FOCUS_LOST", "FOCUS_LOST", scopePath);
     }
 
     // Register enumeration Control::State.

+ 308 - 3
gameplay/src/lua/lua_ImageControl.cpp

@@ -4,13 +4,10 @@
 #include "Animation.h"
 #include "AnimationTarget.h"
 #include "Base.h"
-#include "Button.h"
 #include "Control.h"
 #include "Form.h"
 #include "Game.h"
-#include "Gamepad.h"
 #include "ImageControl.h"
-#include "Label.h"
 #include "Node.h"
 #include "Ref.h"
 #include "ScriptController.h"
@@ -32,6 +29,7 @@ void luaRegister_ImageControl()
         {"addListener", lua_ImageControl_addListener},
         {"addRef", lua_ImageControl_addRef},
         {"addScriptCallback", lua_ImageControl_addScriptCallback},
+        {"canFocus", lua_ImageControl_canFocus},
         {"createAnimation", lua_ImageControl_createAnimation},
         {"createAnimationFromBy", lua_ImageControl_createAnimationFromBy},
         {"createAnimationFromTo", lua_ImageControl_createAnimationFromTo},
@@ -73,15 +71,20 @@ void luaRegister_ImageControl()
         {"getTextAlignment", lua_ImageControl_getTextAlignment},
         {"getTextColor", lua_ImageControl_getTextColor},
         {"getTextRightToLeft", lua_ImageControl_getTextRightToLeft},
+        {"getTopLevelForm", lua_ImageControl_getTopLevelForm},
         {"getType", lua_ImageControl_getType},
         {"getWidth", lua_ImageControl_getWidth},
         {"getX", lua_ImageControl_getX},
         {"getY", lua_ImageControl_getY},
         {"getZIndex", lua_ImageControl_getZIndex},
+        {"hasFocus", lua_ImageControl_hasFocus},
+        {"isChild", lua_ImageControl_isChild},
         {"isContainer", lua_ImageControl_isContainer},
         {"isEnabled", lua_ImageControl_isEnabled},
+        {"isEnabledInHierarchy", lua_ImageControl_isEnabledInHierarchy},
         {"isHeightPercentage", lua_ImageControl_isHeightPercentage},
         {"isVisible", lua_ImageControl_isVisible},
+        {"isVisibleInHierarchy", lua_ImageControl_isVisibleInHierarchy},
         {"isWidthPercentage", lua_ImageControl_isWidthPercentage},
         {"isXPercentage", lua_ImageControl_isXPercentage},
         {"isYPercentage", lua_ImageControl_isYPercentage},
@@ -94,10 +97,12 @@ void luaRegister_ImageControl()
         {"setAutoWidth", lua_ImageControl_setAutoWidth},
         {"setBorder", lua_ImageControl_setBorder},
         {"setBounds", lua_ImageControl_setBounds},
+        {"setCanFocus", lua_ImageControl_setCanFocus},
         {"setConsumeInputEvents", lua_ImageControl_setConsumeInputEvents},
         {"setCursorColor", lua_ImageControl_setCursorColor},
         {"setCursorRegion", lua_ImageControl_setCursorRegion},
         {"setEnabled", lua_ImageControl_setEnabled},
+        {"setFocus", lua_ImageControl_setFocus},
         {"setFocusIndex", lua_ImageControl_setFocusIndex},
         {"setFont", lua_ImageControl_setFont},
         {"setFontSize", lua_ImageControl_setFontSize},
@@ -305,6 +310,41 @@ int lua_ImageControl_addScriptCallback(lua_State* state)
     return 0;
 }
 
+int lua_ImageControl_canFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                ImageControl* instance = getInstance(state);
+                bool result = instance->canFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_canFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_ImageControl_createAnimation(lua_State* state)
 {
     // Get the number of parameters.
@@ -2502,6 +2542,50 @@ int lua_ImageControl_getTextRightToLeft(lua_State* state)
     return 0;
 }
 
+int lua_ImageControl_getTopLevelForm(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                ImageControl* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getTopLevelForm();
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Form");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getTopLevelForm - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_ImageControl_getType(lua_State* state)
 {
     // Get the number of parameters.
@@ -2677,6 +2761,86 @@ int lua_ImageControl_getZIndex(lua_State* state)
     return 0;
 }
 
+int lua_ImageControl_hasFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                ImageControl* instance = getInstance(state);
+                bool result = instance->hasFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_hasFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_isChild(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
+                    lua_error(state);
+                }
+
+                ImageControl* instance = getInstance(state);
+                bool result = instance->isChild(param1);
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_isChild - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_ImageControl_isContainer(lua_State* state)
 {
     // Get the number of parameters.
@@ -2747,6 +2911,41 @@ int lua_ImageControl_isEnabled(lua_State* state)
     return 0;
 }
 
+int lua_ImageControl_isEnabledInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                ImageControl* instance = getInstance(state);
+                bool result = instance->isEnabledInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_isEnabledInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_ImageControl_isHeightPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -2817,6 +3016,41 @@ int lua_ImageControl_isVisible(lua_State* state)
     return 0;
 }
 
+int lua_ImageControl_isVisibleInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                ImageControl* instance = getInstance(state);
+                bool result = instance->isVisibleInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_isVisibleInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_ImageControl_isWidthPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -3382,6 +3616,42 @@ int lua_ImageControl_setBounds(lua_State* state)
     return 0;
 }
 
+int lua_ImageControl_setCanFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
+
+                ImageControl* instance = getInstance(state);
+                instance->setCanFocus(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setCanFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_ImageControl_setConsumeInputEvents(lua_State* state)
 {
     // Get the number of parameters.
@@ -3546,6 +3816,41 @@ int lua_ImageControl_setEnabled(lua_State* state)
     return 0;
 }
 
+int lua_ImageControl_setFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                ImageControl* instance = getInstance(state);
+                bool result = instance->setFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_ImageControl_setFocusIndex(lua_State* state)
 {
     // Get the number of parameters.

+ 8 - 0
gameplay/src/lua/lua_ImageControl.h

@@ -9,6 +9,7 @@ int lua_ImageControl__gc(lua_State* state);
 int lua_ImageControl_addListener(lua_State* state);
 int lua_ImageControl_addRef(lua_State* state);
 int lua_ImageControl_addScriptCallback(lua_State* state);
+int lua_ImageControl_canFocus(lua_State* state);
 int lua_ImageControl_createAnimation(lua_State* state);
 int lua_ImageControl_createAnimationFromBy(lua_State* state);
 int lua_ImageControl_createAnimationFromTo(lua_State* state);
@@ -50,15 +51,20 @@ int lua_ImageControl_getStyle(lua_State* state);
 int lua_ImageControl_getTextAlignment(lua_State* state);
 int lua_ImageControl_getTextColor(lua_State* state);
 int lua_ImageControl_getTextRightToLeft(lua_State* state);
+int lua_ImageControl_getTopLevelForm(lua_State* state);
 int lua_ImageControl_getType(lua_State* state);
 int lua_ImageControl_getWidth(lua_State* state);
 int lua_ImageControl_getX(lua_State* state);
 int lua_ImageControl_getY(lua_State* state);
 int lua_ImageControl_getZIndex(lua_State* state);
+int lua_ImageControl_hasFocus(lua_State* state);
+int lua_ImageControl_isChild(lua_State* state);
 int lua_ImageControl_isContainer(lua_State* state);
 int lua_ImageControl_isEnabled(lua_State* state);
+int lua_ImageControl_isEnabledInHierarchy(lua_State* state);
 int lua_ImageControl_isHeightPercentage(lua_State* state);
 int lua_ImageControl_isVisible(lua_State* state);
+int lua_ImageControl_isVisibleInHierarchy(lua_State* state);
 int lua_ImageControl_isWidthPercentage(lua_State* state);
 int lua_ImageControl_isXPercentage(lua_State* state);
 int lua_ImageControl_isYPercentage(lua_State* state);
@@ -71,10 +77,12 @@ int lua_ImageControl_setAutoHeight(lua_State* state);
 int lua_ImageControl_setAutoWidth(lua_State* state);
 int lua_ImageControl_setBorder(lua_State* state);
 int lua_ImageControl_setBounds(lua_State* state);
+int lua_ImageControl_setCanFocus(lua_State* state);
 int lua_ImageControl_setConsumeInputEvents(lua_State* state);
 int lua_ImageControl_setCursorColor(lua_State* state);
 int lua_ImageControl_setCursorRegion(lua_State* state);
 int lua_ImageControl_setEnabled(lua_State* state);
+int lua_ImageControl_setFocus(lua_State* state);
 int lua_ImageControl_setFocusIndex(lua_State* state);
 int lua_ImageControl_setFont(lua_State* state);
 int lua_ImageControl_setFontSize(lua_State* state);

+ 308 - 0
gameplay/src/lua/lua_Joystick.cpp

@@ -29,6 +29,7 @@ void luaRegister_Joystick()
         {"addListener", lua_Joystick_addListener},
         {"addRef", lua_Joystick_addRef},
         {"addScriptCallback", lua_Joystick_addScriptCallback},
+        {"canFocus", lua_Joystick_canFocus},
         {"createAnimation", lua_Joystick_createAnimation},
         {"createAnimationFromBy", lua_Joystick_createAnimationFromBy},
         {"createAnimationFromTo", lua_Joystick_createAnimationFromTo},
@@ -71,17 +72,22 @@ void luaRegister_Joystick()
         {"getTextAlignment", lua_Joystick_getTextAlignment},
         {"getTextColor", lua_Joystick_getTextColor},
         {"getTextRightToLeft", lua_Joystick_getTextRightToLeft},
+        {"getTopLevelForm", lua_Joystick_getTopLevelForm},
         {"getType", lua_Joystick_getType},
         {"getValue", lua_Joystick_getValue},
         {"getWidth", lua_Joystick_getWidth},
         {"getX", lua_Joystick_getX},
         {"getY", lua_Joystick_getY},
         {"getZIndex", lua_Joystick_getZIndex},
+        {"hasFocus", lua_Joystick_hasFocus},
+        {"isChild", lua_Joystick_isChild},
         {"isContainer", lua_Joystick_isContainer},
         {"isEnabled", lua_Joystick_isEnabled},
+        {"isEnabledInHierarchy", lua_Joystick_isEnabledInHierarchy},
         {"isHeightPercentage", lua_Joystick_isHeightPercentage},
         {"isRelative", lua_Joystick_isRelative},
         {"isVisible", lua_Joystick_isVisible},
+        {"isVisibleInHierarchy", lua_Joystick_isVisibleInHierarchy},
         {"isWidthPercentage", lua_Joystick_isWidthPercentage},
         {"isXPercentage", lua_Joystick_isXPercentage},
         {"isYPercentage", lua_Joystick_isYPercentage},
@@ -94,10 +100,12 @@ void luaRegister_Joystick()
         {"setAutoWidth", lua_Joystick_setAutoWidth},
         {"setBorder", lua_Joystick_setBorder},
         {"setBounds", lua_Joystick_setBounds},
+        {"setCanFocus", lua_Joystick_setCanFocus},
         {"setConsumeInputEvents", lua_Joystick_setConsumeInputEvents},
         {"setCursorColor", lua_Joystick_setCursorColor},
         {"setCursorRegion", lua_Joystick_setCursorRegion},
         {"setEnabled", lua_Joystick_setEnabled},
+        {"setFocus", lua_Joystick_setFocus},
         {"setFocusIndex", lua_Joystick_setFocusIndex},
         {"setFont", lua_Joystick_setFont},
         {"setFontSize", lua_Joystick_setFontSize},
@@ -305,6 +313,41 @@ int lua_Joystick_addScriptCallback(lua_State* state)
     return 0;
 }
 
+int lua_Joystick_canFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Joystick* instance = getInstance(state);
+                bool result = instance->canFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Joystick_canFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Joystick_createAnimation(lua_State* state)
 {
     // Get the number of parameters.
@@ -2537,6 +2580,50 @@ int lua_Joystick_getTextRightToLeft(lua_State* state)
     return 0;
 }
 
+int lua_Joystick_getTopLevelForm(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Joystick* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getTopLevelForm();
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Form");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Joystick_getTopLevelForm - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Joystick_getType(lua_State* state)
 {
     // Get the number of parameters.
@@ -2756,6 +2843,86 @@ int lua_Joystick_getZIndex(lua_State* state)
     return 0;
 }
 
+int lua_Joystick_hasFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Joystick* instance = getInstance(state);
+                bool result = instance->hasFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Joystick_hasFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_Joystick_isChild(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
+                    lua_error(state);
+                }
+
+                Joystick* instance = getInstance(state);
+                bool result = instance->isChild(param1);
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Joystick_isChild - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Joystick_isContainer(lua_State* state)
 {
     // Get the number of parameters.
@@ -2826,6 +2993,41 @@ int lua_Joystick_isEnabled(lua_State* state)
     return 0;
 }
 
+int lua_Joystick_isEnabledInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Joystick* instance = getInstance(state);
+                bool result = instance->isEnabledInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Joystick_isEnabledInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Joystick_isHeightPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -2931,6 +3133,41 @@ int lua_Joystick_isVisible(lua_State* state)
     return 0;
 }
 
+int lua_Joystick_isVisibleInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Joystick* instance = getInstance(state);
+                bool result = instance->isVisibleInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Joystick_isVisibleInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Joystick_isWidthPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -3496,6 +3733,42 @@ int lua_Joystick_setBounds(lua_State* state)
     return 0;
 }
 
+int lua_Joystick_setCanFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
+
+                Joystick* instance = getInstance(state);
+                instance->setCanFocus(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Joystick_setCanFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Joystick_setConsumeInputEvents(lua_State* state)
 {
     // Get the number of parameters.
@@ -3660,6 +3933,41 @@ int lua_Joystick_setEnabled(lua_State* state)
     return 0;
 }
 
+int lua_Joystick_setFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Joystick* instance = getInstance(state);
+                bool result = instance->setFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Joystick_setFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Joystick_setFocusIndex(lua_State* state)
 {
     // Get the number of parameters.

+ 8 - 0
gameplay/src/lua/lua_Joystick.h

@@ -9,6 +9,7 @@ int lua_Joystick__gc(lua_State* state);
 int lua_Joystick_addListener(lua_State* state);
 int lua_Joystick_addRef(lua_State* state);
 int lua_Joystick_addScriptCallback(lua_State* state);
+int lua_Joystick_canFocus(lua_State* state);
 int lua_Joystick_createAnimation(lua_State* state);
 int lua_Joystick_createAnimationFromBy(lua_State* state);
 int lua_Joystick_createAnimationFromTo(lua_State* state);
@@ -51,17 +52,22 @@ int lua_Joystick_getStyle(lua_State* state);
 int lua_Joystick_getTextAlignment(lua_State* state);
 int lua_Joystick_getTextColor(lua_State* state);
 int lua_Joystick_getTextRightToLeft(lua_State* state);
+int lua_Joystick_getTopLevelForm(lua_State* state);
 int lua_Joystick_getType(lua_State* state);
 int lua_Joystick_getValue(lua_State* state);
 int lua_Joystick_getWidth(lua_State* state);
 int lua_Joystick_getX(lua_State* state);
 int lua_Joystick_getY(lua_State* state);
 int lua_Joystick_getZIndex(lua_State* state);
+int lua_Joystick_hasFocus(lua_State* state);
+int lua_Joystick_isChild(lua_State* state);
 int lua_Joystick_isContainer(lua_State* state);
 int lua_Joystick_isEnabled(lua_State* state);
+int lua_Joystick_isEnabledInHierarchy(lua_State* state);
 int lua_Joystick_isHeightPercentage(lua_State* state);
 int lua_Joystick_isRelative(lua_State* state);
 int lua_Joystick_isVisible(lua_State* state);
+int lua_Joystick_isVisibleInHierarchy(lua_State* state);
 int lua_Joystick_isWidthPercentage(lua_State* state);
 int lua_Joystick_isXPercentage(lua_State* state);
 int lua_Joystick_isYPercentage(lua_State* state);
@@ -74,10 +80,12 @@ int lua_Joystick_setAutoHeight(lua_State* state);
 int lua_Joystick_setAutoWidth(lua_State* state);
 int lua_Joystick_setBorder(lua_State* state);
 int lua_Joystick_setBounds(lua_State* state);
+int lua_Joystick_setCanFocus(lua_State* state);
 int lua_Joystick_setConsumeInputEvents(lua_State* state);
 int lua_Joystick_setCursorColor(lua_State* state);
 int lua_Joystick_setCursorRegion(lua_State* state);
 int lua_Joystick_setEnabled(lua_State* state);
+int lua_Joystick_setFocus(lua_State* state);
 int lua_Joystick_setFocusIndex(lua_State* state);
 int lua_Joystick_setFont(lua_State* state);
 int lua_Joystick_setFontSize(lua_State* state);

+ 308 - 0
gameplay/src/lua/lua_Label.cpp

@@ -29,6 +29,7 @@ void luaRegister_Label()
         {"addListener", lua_Label_addListener},
         {"addRef", lua_Label_addRef},
         {"addScriptCallback", lua_Label_addScriptCallback},
+        {"canFocus", lua_Label_canFocus},
         {"createAnimation", lua_Label_createAnimation},
         {"createAnimationFromBy", lua_Label_createAnimationFromBy},
         {"createAnimationFromTo", lua_Label_createAnimationFromTo},
@@ -69,15 +70,20 @@ void luaRegister_Label()
         {"getTextAlignment", lua_Label_getTextAlignment},
         {"getTextColor", lua_Label_getTextColor},
         {"getTextRightToLeft", lua_Label_getTextRightToLeft},
+        {"getTopLevelForm", lua_Label_getTopLevelForm},
         {"getType", lua_Label_getType},
         {"getWidth", lua_Label_getWidth},
         {"getX", lua_Label_getX},
         {"getY", lua_Label_getY},
         {"getZIndex", lua_Label_getZIndex},
+        {"hasFocus", lua_Label_hasFocus},
+        {"isChild", lua_Label_isChild},
         {"isContainer", lua_Label_isContainer},
         {"isEnabled", lua_Label_isEnabled},
+        {"isEnabledInHierarchy", lua_Label_isEnabledInHierarchy},
         {"isHeightPercentage", lua_Label_isHeightPercentage},
         {"isVisible", lua_Label_isVisible},
+        {"isVisibleInHierarchy", lua_Label_isVisibleInHierarchy},
         {"isWidthPercentage", lua_Label_isWidthPercentage},
         {"isXPercentage", lua_Label_isXPercentage},
         {"isYPercentage", lua_Label_isYPercentage},
@@ -90,10 +96,12 @@ void luaRegister_Label()
         {"setAutoWidth", lua_Label_setAutoWidth},
         {"setBorder", lua_Label_setBorder},
         {"setBounds", lua_Label_setBounds},
+        {"setCanFocus", lua_Label_setCanFocus},
         {"setConsumeInputEvents", lua_Label_setConsumeInputEvents},
         {"setCursorColor", lua_Label_setCursorColor},
         {"setCursorRegion", lua_Label_setCursorRegion},
         {"setEnabled", lua_Label_setEnabled},
+        {"setFocus", lua_Label_setFocus},
         {"setFocusIndex", lua_Label_setFocusIndex},
         {"setFont", lua_Label_setFont},
         {"setFontSize", lua_Label_setFontSize},
@@ -299,6 +307,41 @@ int lua_Label_addScriptCallback(lua_State* state)
     return 0;
 }
 
+int lua_Label_canFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Label* instance = getInstance(state);
+                bool result = instance->canFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Label_canFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Label_createAnimation(lua_State* state)
 {
     // Get the number of parameters.
@@ -2443,6 +2486,50 @@ int lua_Label_getTextRightToLeft(lua_State* state)
     return 0;
 }
 
+int lua_Label_getTopLevelForm(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Label* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getTopLevelForm();
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Form");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Label_getTopLevelForm - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Label_getType(lua_State* state)
 {
     // Get the number of parameters.
@@ -2618,6 +2705,86 @@ int lua_Label_getZIndex(lua_State* state)
     return 0;
 }
 
+int lua_Label_hasFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Label* instance = getInstance(state);
+                bool result = instance->hasFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Label_hasFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_Label_isChild(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
+                    lua_error(state);
+                }
+
+                Label* instance = getInstance(state);
+                bool result = instance->isChild(param1);
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Label_isChild - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Label_isContainer(lua_State* state)
 {
     // Get the number of parameters.
@@ -2688,6 +2855,41 @@ int lua_Label_isEnabled(lua_State* state)
     return 0;
 }
 
+int lua_Label_isEnabledInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Label* instance = getInstance(state);
+                bool result = instance->isEnabledInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Label_isEnabledInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Label_isHeightPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -2758,6 +2960,41 @@ int lua_Label_isVisible(lua_State* state)
     return 0;
 }
 
+int lua_Label_isVisibleInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Label* instance = getInstance(state);
+                bool result = instance->isVisibleInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Label_isVisibleInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Label_isWidthPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -3323,6 +3560,42 @@ int lua_Label_setBounds(lua_State* state)
     return 0;
 }
 
+int lua_Label_setCanFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
+
+                Label* instance = getInstance(state);
+                instance->setCanFocus(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Label_setCanFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Label_setConsumeInputEvents(lua_State* state)
 {
     // Get the number of parameters.
@@ -3487,6 +3760,41 @@ int lua_Label_setEnabled(lua_State* state)
     return 0;
 }
 
+int lua_Label_setFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Label* instance = getInstance(state);
+                bool result = instance->setFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Label_setFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Label_setFocusIndex(lua_State* state)
 {
     // Get the number of parameters.

+ 8 - 0
gameplay/src/lua/lua_Label.h

@@ -9,6 +9,7 @@ int lua_Label__gc(lua_State* state);
 int lua_Label_addListener(lua_State* state);
 int lua_Label_addRef(lua_State* state);
 int lua_Label_addScriptCallback(lua_State* state);
+int lua_Label_canFocus(lua_State* state);
 int lua_Label_createAnimation(lua_State* state);
 int lua_Label_createAnimationFromBy(lua_State* state);
 int lua_Label_createAnimationFromTo(lua_State* state);
@@ -49,15 +50,20 @@ int lua_Label_getText(lua_State* state);
 int lua_Label_getTextAlignment(lua_State* state);
 int lua_Label_getTextColor(lua_State* state);
 int lua_Label_getTextRightToLeft(lua_State* state);
+int lua_Label_getTopLevelForm(lua_State* state);
 int lua_Label_getType(lua_State* state);
 int lua_Label_getWidth(lua_State* state);
 int lua_Label_getX(lua_State* state);
 int lua_Label_getY(lua_State* state);
 int lua_Label_getZIndex(lua_State* state);
+int lua_Label_hasFocus(lua_State* state);
+int lua_Label_isChild(lua_State* state);
 int lua_Label_isContainer(lua_State* state);
 int lua_Label_isEnabled(lua_State* state);
+int lua_Label_isEnabledInHierarchy(lua_State* state);
 int lua_Label_isHeightPercentage(lua_State* state);
 int lua_Label_isVisible(lua_State* state);
+int lua_Label_isVisibleInHierarchy(lua_State* state);
 int lua_Label_isWidthPercentage(lua_State* state);
 int lua_Label_isXPercentage(lua_State* state);
 int lua_Label_isYPercentage(lua_State* state);
@@ -70,10 +76,12 @@ int lua_Label_setAutoHeight(lua_State* state);
 int lua_Label_setAutoWidth(lua_State* state);
 int lua_Label_setBorder(lua_State* state);
 int lua_Label_setBounds(lua_State* state);
+int lua_Label_setCanFocus(lua_State* state);
 int lua_Label_setConsumeInputEvents(lua_State* state);
 int lua_Label_setCursorColor(lua_State* state);
 int lua_Label_setCursorRegion(lua_State* state);
 int lua_Label_setEnabled(lua_State* state);
+int lua_Label_setFocus(lua_State* state);
 int lua_Label_setFocusIndex(lua_State* state);
 int lua_Label_setFont(lua_State* state);
 int lua_Label_setFontSize(lua_State* state);

+ 308 - 0
gameplay/src/lua/lua_RadioButton.cpp

@@ -32,6 +32,7 @@ void luaRegister_RadioButton()
         {"addListener", lua_RadioButton_addListener},
         {"addRef", lua_RadioButton_addRef},
         {"addScriptCallback", lua_RadioButton_addScriptCallback},
+        {"canFocus", lua_RadioButton_canFocus},
         {"createAnimation", lua_RadioButton_createAnimation},
         {"createAnimationFromBy", lua_RadioButton_createAnimationFromBy},
         {"createAnimationFromTo", lua_RadioButton_createAnimationFromTo},
@@ -74,16 +75,21 @@ void luaRegister_RadioButton()
         {"getTextAlignment", lua_RadioButton_getTextAlignment},
         {"getTextColor", lua_RadioButton_getTextColor},
         {"getTextRightToLeft", lua_RadioButton_getTextRightToLeft},
+        {"getTopLevelForm", lua_RadioButton_getTopLevelForm},
         {"getType", lua_RadioButton_getType},
         {"getWidth", lua_RadioButton_getWidth},
         {"getX", lua_RadioButton_getX},
         {"getY", lua_RadioButton_getY},
         {"getZIndex", lua_RadioButton_getZIndex},
+        {"hasFocus", lua_RadioButton_hasFocus},
+        {"isChild", lua_RadioButton_isChild},
         {"isContainer", lua_RadioButton_isContainer},
         {"isEnabled", lua_RadioButton_isEnabled},
+        {"isEnabledInHierarchy", lua_RadioButton_isEnabledInHierarchy},
         {"isHeightPercentage", lua_RadioButton_isHeightPercentage},
         {"isSelected", lua_RadioButton_isSelected},
         {"isVisible", lua_RadioButton_isVisible},
+        {"isVisibleInHierarchy", lua_RadioButton_isVisibleInHierarchy},
         {"isWidthPercentage", lua_RadioButton_isWidthPercentage},
         {"isXPercentage", lua_RadioButton_isXPercentage},
         {"isYPercentage", lua_RadioButton_isYPercentage},
@@ -96,10 +102,12 @@ void luaRegister_RadioButton()
         {"setAutoWidth", lua_RadioButton_setAutoWidth},
         {"setBorder", lua_RadioButton_setBorder},
         {"setBounds", lua_RadioButton_setBounds},
+        {"setCanFocus", lua_RadioButton_setCanFocus},
         {"setConsumeInputEvents", lua_RadioButton_setConsumeInputEvents},
         {"setCursorColor", lua_RadioButton_setCursorColor},
         {"setCursorRegion", lua_RadioButton_setCursorRegion},
         {"setEnabled", lua_RadioButton_setEnabled},
+        {"setFocus", lua_RadioButton_setFocus},
         {"setFocusIndex", lua_RadioButton_setFocusIndex},
         {"setFont", lua_RadioButton_setFont},
         {"setFontSize", lua_RadioButton_setFontSize},
@@ -308,6 +316,41 @@ int lua_RadioButton_addScriptCallback(lua_State* state)
     return 0;
 }
 
+int lua_RadioButton_canFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                RadioButton* instance = getInstance(state);
+                bool result = instance->canFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_RadioButton_canFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_RadioButton_createAnimation(lua_State* state)
 {
     // Get the number of parameters.
@@ -2531,6 +2574,50 @@ int lua_RadioButton_getTextRightToLeft(lua_State* state)
     return 0;
 }
 
+int lua_RadioButton_getTopLevelForm(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                RadioButton* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getTopLevelForm();
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Form");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_RadioButton_getTopLevelForm - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_RadioButton_getType(lua_State* state)
 {
     // Get the number of parameters.
@@ -2706,6 +2793,86 @@ int lua_RadioButton_getZIndex(lua_State* state)
     return 0;
 }
 
+int lua_RadioButton_hasFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                RadioButton* instance = getInstance(state);
+                bool result = instance->hasFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_RadioButton_hasFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_RadioButton_isChild(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
+                    lua_error(state);
+                }
+
+                RadioButton* instance = getInstance(state);
+                bool result = instance->isChild(param1);
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_RadioButton_isChild - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_RadioButton_isContainer(lua_State* state)
 {
     // Get the number of parameters.
@@ -2776,6 +2943,41 @@ int lua_RadioButton_isEnabled(lua_State* state)
     return 0;
 }
 
+int lua_RadioButton_isEnabledInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                RadioButton* instance = getInstance(state);
+                bool result = instance->isEnabledInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_RadioButton_isEnabledInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_RadioButton_isHeightPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -2881,6 +3083,41 @@ int lua_RadioButton_isVisible(lua_State* state)
     return 0;
 }
 
+int lua_RadioButton_isVisibleInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                RadioButton* instance = getInstance(state);
+                bool result = instance->isVisibleInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_RadioButton_isVisibleInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_RadioButton_isWidthPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -3446,6 +3683,42 @@ int lua_RadioButton_setBounds(lua_State* state)
     return 0;
 }
 
+int lua_RadioButton_setCanFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
+
+                RadioButton* instance = getInstance(state);
+                instance->setCanFocus(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_RadioButton_setCanFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_RadioButton_setConsumeInputEvents(lua_State* state)
 {
     // Get the number of parameters.
@@ -3610,6 +3883,41 @@ int lua_RadioButton_setEnabled(lua_State* state)
     return 0;
 }
 
+int lua_RadioButton_setFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                RadioButton* instance = getInstance(state);
+                bool result = instance->setFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_RadioButton_setFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_RadioButton_setFocusIndex(lua_State* state)
 {
     // Get the number of parameters.

+ 8 - 0
gameplay/src/lua/lua_RadioButton.h

@@ -9,6 +9,7 @@ int lua_RadioButton__gc(lua_State* state);
 int lua_RadioButton_addListener(lua_State* state);
 int lua_RadioButton_addRef(lua_State* state);
 int lua_RadioButton_addScriptCallback(lua_State* state);
+int lua_RadioButton_canFocus(lua_State* state);
 int lua_RadioButton_createAnimation(lua_State* state);
 int lua_RadioButton_createAnimationFromBy(lua_State* state);
 int lua_RadioButton_createAnimationFromTo(lua_State* state);
@@ -51,16 +52,21 @@ int lua_RadioButton_getText(lua_State* state);
 int lua_RadioButton_getTextAlignment(lua_State* state);
 int lua_RadioButton_getTextColor(lua_State* state);
 int lua_RadioButton_getTextRightToLeft(lua_State* state);
+int lua_RadioButton_getTopLevelForm(lua_State* state);
 int lua_RadioButton_getType(lua_State* state);
 int lua_RadioButton_getWidth(lua_State* state);
 int lua_RadioButton_getX(lua_State* state);
 int lua_RadioButton_getY(lua_State* state);
 int lua_RadioButton_getZIndex(lua_State* state);
+int lua_RadioButton_hasFocus(lua_State* state);
+int lua_RadioButton_isChild(lua_State* state);
 int lua_RadioButton_isContainer(lua_State* state);
 int lua_RadioButton_isEnabled(lua_State* state);
+int lua_RadioButton_isEnabledInHierarchy(lua_State* state);
 int lua_RadioButton_isHeightPercentage(lua_State* state);
 int lua_RadioButton_isSelected(lua_State* state);
 int lua_RadioButton_isVisible(lua_State* state);
+int lua_RadioButton_isVisibleInHierarchy(lua_State* state);
 int lua_RadioButton_isWidthPercentage(lua_State* state);
 int lua_RadioButton_isXPercentage(lua_State* state);
 int lua_RadioButton_isYPercentage(lua_State* state);
@@ -73,10 +79,12 @@ int lua_RadioButton_setAutoHeight(lua_State* state);
 int lua_RadioButton_setAutoWidth(lua_State* state);
 int lua_RadioButton_setBorder(lua_State* state);
 int lua_RadioButton_setBounds(lua_State* state);
+int lua_RadioButton_setCanFocus(lua_State* state);
 int lua_RadioButton_setConsumeInputEvents(lua_State* state);
 int lua_RadioButton_setCursorColor(lua_State* state);
 int lua_RadioButton_setCursorRegion(lua_State* state);
 int lua_RadioButton_setEnabled(lua_State* state);
+int lua_RadioButton_setFocus(lua_State* state);
 int lua_RadioButton_setFocusIndex(lua_State* state);
 int lua_RadioButton_setFont(lua_State* state);
 int lua_RadioButton_setFontSize(lua_State* state);

+ 308 - 0
gameplay/src/lua/lua_Slider.cpp

@@ -30,6 +30,7 @@ void luaRegister_Slider()
         {"addListener", lua_Slider_addListener},
         {"addRef", lua_Slider_addRef},
         {"addScriptCallback", lua_Slider_addScriptCallback},
+        {"canFocus", lua_Slider_canFocus},
         {"createAnimation", lua_Slider_createAnimation},
         {"createAnimationFromBy", lua_Slider_createAnimationFromBy},
         {"createAnimationFromTo", lua_Slider_createAnimationFromTo},
@@ -73,6 +74,7 @@ void luaRegister_Slider()
         {"getTextAlignment", lua_Slider_getTextAlignment},
         {"getTextColor", lua_Slider_getTextColor},
         {"getTextRightToLeft", lua_Slider_getTextRightToLeft},
+        {"getTopLevelForm", lua_Slider_getTopLevelForm},
         {"getType", lua_Slider_getType},
         {"getValue", lua_Slider_getValue},
         {"getValueTextAlignment", lua_Slider_getValueTextAlignment},
@@ -81,11 +83,15 @@ void luaRegister_Slider()
         {"getX", lua_Slider_getX},
         {"getY", lua_Slider_getY},
         {"getZIndex", lua_Slider_getZIndex},
+        {"hasFocus", lua_Slider_hasFocus},
+        {"isChild", lua_Slider_isChild},
         {"isContainer", lua_Slider_isContainer},
         {"isEnabled", lua_Slider_isEnabled},
+        {"isEnabledInHierarchy", lua_Slider_isEnabledInHierarchy},
         {"isHeightPercentage", lua_Slider_isHeightPercentage},
         {"isValueTextVisible", lua_Slider_isValueTextVisible},
         {"isVisible", lua_Slider_isVisible},
+        {"isVisibleInHierarchy", lua_Slider_isVisibleInHierarchy},
         {"isWidthPercentage", lua_Slider_isWidthPercentage},
         {"isXPercentage", lua_Slider_isXPercentage},
         {"isYPercentage", lua_Slider_isYPercentage},
@@ -98,10 +104,12 @@ void luaRegister_Slider()
         {"setAutoWidth", lua_Slider_setAutoWidth},
         {"setBorder", lua_Slider_setBorder},
         {"setBounds", lua_Slider_setBounds},
+        {"setCanFocus", lua_Slider_setCanFocus},
         {"setConsumeInputEvents", lua_Slider_setConsumeInputEvents},
         {"setCursorColor", lua_Slider_setCursorColor},
         {"setCursorRegion", lua_Slider_setCursorRegion},
         {"setEnabled", lua_Slider_setEnabled},
+        {"setFocus", lua_Slider_setFocus},
         {"setFocusIndex", lua_Slider_setFocusIndex},
         {"setFont", lua_Slider_setFont},
         {"setFontSize", lua_Slider_setFontSize},
@@ -314,6 +322,41 @@ int lua_Slider_addScriptCallback(lua_State* state)
     return 0;
 }
 
+int lua_Slider_canFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Slider* instance = getInstance(state);
+                bool result = instance->canFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Slider_canFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Slider_createAnimation(lua_State* state)
 {
     // Get the number of parameters.
@@ -2563,6 +2606,50 @@ int lua_Slider_getTextRightToLeft(lua_State* state)
     return 0;
 }
 
+int lua_Slider_getTopLevelForm(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Slider* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getTopLevelForm();
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Form");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Slider_getTopLevelForm - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Slider_getType(lua_State* state)
 {
     // Get the number of parameters.
@@ -2843,6 +2930,86 @@ int lua_Slider_getZIndex(lua_State* state)
     return 0;
 }
 
+int lua_Slider_hasFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Slider* instance = getInstance(state);
+                bool result = instance->hasFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Slider_hasFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_Slider_isChild(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
+                    lua_error(state);
+                }
+
+                Slider* instance = getInstance(state);
+                bool result = instance->isChild(param1);
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Slider_isChild - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Slider_isContainer(lua_State* state)
 {
     // Get the number of parameters.
@@ -2913,6 +3080,41 @@ int lua_Slider_isEnabled(lua_State* state)
     return 0;
 }
 
+int lua_Slider_isEnabledInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Slider* instance = getInstance(state);
+                bool result = instance->isEnabledInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Slider_isEnabledInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Slider_isHeightPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -3018,6 +3220,41 @@ int lua_Slider_isVisible(lua_State* state)
     return 0;
 }
 
+int lua_Slider_isVisibleInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Slider* instance = getInstance(state);
+                bool result = instance->isVisibleInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Slider_isVisibleInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Slider_isWidthPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -3583,6 +3820,42 @@ int lua_Slider_setBounds(lua_State* state)
     return 0;
 }
 
+int lua_Slider_setCanFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
+
+                Slider* instance = getInstance(state);
+                instance->setCanFocus(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Slider_setCanFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Slider_setConsumeInputEvents(lua_State* state)
 {
     // Get the number of parameters.
@@ -3747,6 +4020,41 @@ int lua_Slider_setEnabled(lua_State* state)
     return 0;
 }
 
+int lua_Slider_setFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Slider* instance = getInstance(state);
+                bool result = instance->setFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Slider_setFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Slider_setFocusIndex(lua_State* state)
 {
     // Get the number of parameters.

+ 8 - 0
gameplay/src/lua/lua_Slider.h

@@ -9,6 +9,7 @@ int lua_Slider__gc(lua_State* state);
 int lua_Slider_addListener(lua_State* state);
 int lua_Slider_addRef(lua_State* state);
 int lua_Slider_addScriptCallback(lua_State* state);
+int lua_Slider_canFocus(lua_State* state);
 int lua_Slider_createAnimation(lua_State* state);
 int lua_Slider_createAnimationFromBy(lua_State* state);
 int lua_Slider_createAnimationFromTo(lua_State* state);
@@ -52,6 +53,7 @@ int lua_Slider_getText(lua_State* state);
 int lua_Slider_getTextAlignment(lua_State* state);
 int lua_Slider_getTextColor(lua_State* state);
 int lua_Slider_getTextRightToLeft(lua_State* state);
+int lua_Slider_getTopLevelForm(lua_State* state);
 int lua_Slider_getType(lua_State* state);
 int lua_Slider_getValue(lua_State* state);
 int lua_Slider_getValueTextAlignment(lua_State* state);
@@ -60,11 +62,15 @@ int lua_Slider_getWidth(lua_State* state);
 int lua_Slider_getX(lua_State* state);
 int lua_Slider_getY(lua_State* state);
 int lua_Slider_getZIndex(lua_State* state);
+int lua_Slider_hasFocus(lua_State* state);
+int lua_Slider_isChild(lua_State* state);
 int lua_Slider_isContainer(lua_State* state);
 int lua_Slider_isEnabled(lua_State* state);
+int lua_Slider_isEnabledInHierarchy(lua_State* state);
 int lua_Slider_isHeightPercentage(lua_State* state);
 int lua_Slider_isValueTextVisible(lua_State* state);
 int lua_Slider_isVisible(lua_State* state);
+int lua_Slider_isVisibleInHierarchy(lua_State* state);
 int lua_Slider_isWidthPercentage(lua_State* state);
 int lua_Slider_isXPercentage(lua_State* state);
 int lua_Slider_isYPercentage(lua_State* state);
@@ -77,10 +83,12 @@ int lua_Slider_setAutoHeight(lua_State* state);
 int lua_Slider_setAutoWidth(lua_State* state);
 int lua_Slider_setBorder(lua_State* state);
 int lua_Slider_setBounds(lua_State* state);
+int lua_Slider_setCanFocus(lua_State* state);
 int lua_Slider_setConsumeInputEvents(lua_State* state);
 int lua_Slider_setCursorColor(lua_State* state);
 int lua_Slider_setCursorRegion(lua_State* state);
 int lua_Slider_setEnabled(lua_State* state);
+int lua_Slider_setFocus(lua_State* state);
 int lua_Slider_setFocusIndex(lua_State* state);
 int lua_Slider_setFont(lua_State* state);
 int lua_Slider_setFontSize(lua_State* state);

+ 381 - 0
gameplay/src/lua/lua_TextBox.cpp

@@ -31,6 +31,7 @@ void luaRegister_TextBox()
         {"addListener", lua_TextBox_addListener},
         {"addRef", lua_TextBox_addRef},
         {"addScriptCallback", lua_TextBox_addScriptCallback},
+        {"canFocus", lua_TextBox_canFocus},
         {"createAnimation", lua_TextBox_createAnimation},
         {"createAnimationFromBy", lua_TextBox_createAnimationFromBy},
         {"createAnimationFromTo", lua_TextBox_createAnimationFromTo},
@@ -44,6 +45,7 @@ void luaRegister_TextBox()
         {"getAutoWidth", lua_TextBox_getAutoWidth},
         {"getBorder", lua_TextBox_getBorder},
         {"getBounds", lua_TextBox_getBounds},
+        {"getCaretLocation", lua_TextBox_getCaretLocation},
         {"getClip", lua_TextBox_getClip},
         {"getClipBounds", lua_TextBox_getClipBounds},
         {"getConsumeInputEvents", lua_TextBox_getConsumeInputEvents},
@@ -74,16 +76,21 @@ void luaRegister_TextBox()
         {"getTextAlignment", lua_TextBox_getTextAlignment},
         {"getTextColor", lua_TextBox_getTextColor},
         {"getTextRightToLeft", lua_TextBox_getTextRightToLeft},
+        {"getTopLevelForm", lua_TextBox_getTopLevelForm},
         {"getType", lua_TextBox_getType},
         {"getWidth", lua_TextBox_getWidth},
         {"getX", lua_TextBox_getX},
         {"getY", lua_TextBox_getY},
         {"getZIndex", lua_TextBox_getZIndex},
+        {"hasFocus", lua_TextBox_hasFocus},
         {"initialize", lua_TextBox_initialize},
+        {"isChild", lua_TextBox_isChild},
         {"isContainer", lua_TextBox_isContainer},
         {"isEnabled", lua_TextBox_isEnabled},
+        {"isEnabledInHierarchy", lua_TextBox_isEnabledInHierarchy},
         {"isHeightPercentage", lua_TextBox_isHeightPercentage},
         {"isVisible", lua_TextBox_isVisible},
+        {"isVisibleInHierarchy", lua_TextBox_isVisibleInHierarchy},
         {"isWidthPercentage", lua_TextBox_isWidthPercentage},
         {"isXPercentage", lua_TextBox_isXPercentage},
         {"isYPercentage", lua_TextBox_isYPercentage},
@@ -96,10 +103,13 @@ void luaRegister_TextBox()
         {"setAutoWidth", lua_TextBox_setAutoWidth},
         {"setBorder", lua_TextBox_setBorder},
         {"setBounds", lua_TextBox_setBounds},
+        {"setCanFocus", lua_TextBox_setCanFocus},
+        {"setCaretLocation", lua_TextBox_setCaretLocation},
         {"setConsumeInputEvents", lua_TextBox_setConsumeInputEvents},
         {"setCursorColor", lua_TextBox_setCursorColor},
         {"setCursorRegion", lua_TextBox_setCursorRegion},
         {"setEnabled", lua_TextBox_setEnabled},
+        {"setFocus", lua_TextBox_setFocus},
         {"setFocusIndex", lua_TextBox_setFocusIndex},
         {"setFont", lua_TextBox_setFont},
         {"setFontSize", lua_TextBox_setFontSize},
@@ -307,6 +317,41 @@ int lua_TextBox_addScriptCallback(lua_State* state)
     return 0;
 }
 
+int lua_TextBox_canFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                TextBox* instance = getInstance(state);
+                bool result = instance->canFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_TextBox_canFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_TextBox_createAnimation(lua_State* state)
 {
     // Get the number of parameters.
@@ -1122,6 +1167,41 @@ int lua_TextBox_getBounds(lua_State* state)
     return 0;
 }
 
+int lua_TextBox_getCaretLocation(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                TextBox* instance = getInstance(state);
+                unsigned int result = instance->getCaretLocation();
+
+                // Push the return value onto the stack.
+                lua_pushunsigned(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_TextBox_getCaretLocation - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_TextBox_getClip(lua_State* state)
 {
     // Get the number of parameters.
@@ -2556,6 +2636,50 @@ int lua_TextBox_getTextRightToLeft(lua_State* state)
     return 0;
 }
 
+int lua_TextBox_getTopLevelForm(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                TextBox* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getTopLevelForm();
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Form");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_TextBox_getTopLevelForm - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_TextBox_getType(lua_State* state)
 {
     // Get the number of parameters.
@@ -2731,6 +2855,41 @@ int lua_TextBox_getZIndex(lua_State* state)
     return 0;
 }
 
+int lua_TextBox_hasFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                TextBox* instance = getInstance(state);
+                bool result = instance->hasFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_TextBox_hasFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_TextBox_initialize(lua_State* state)
 {
     // Get the number of parameters.
@@ -2783,6 +2942,51 @@ int lua_TextBox_initialize(lua_State* state)
     return 0;
 }
 
+int lua_TextBox_isChild(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Control> param1 = gameplay::ScriptUtil::getObjectPointer<Control>(2, "Control", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Control'.");
+                    lua_error(state);
+                }
+
+                TextBox* instance = getInstance(state);
+                bool result = instance->isChild(param1);
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_TextBox_isChild - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_TextBox_isContainer(lua_State* state)
 {
     // Get the number of parameters.
@@ -2853,6 +3057,41 @@ int lua_TextBox_isEnabled(lua_State* state)
     return 0;
 }
 
+int lua_TextBox_isEnabledInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                TextBox* instance = getInstance(state);
+                bool result = instance->isEnabledInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_TextBox_isEnabledInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_TextBox_isHeightPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -2923,6 +3162,41 @@ int lua_TextBox_isVisible(lua_State* state)
     return 0;
 }
 
+int lua_TextBox_isVisibleInHierarchy(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                TextBox* instance = getInstance(state);
+                bool result = instance->isVisibleInHierarchy();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_TextBox_isVisibleInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_TextBox_isWidthPercentage(lua_State* state)
 {
     // Get the number of parameters.
@@ -3488,6 +3762,78 @@ int lua_TextBox_setBounds(lua_State* state)
     return 0;
 }
 
+int lua_TextBox_setCanFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
+
+                TextBox* instance = getInstance(state);
+                instance->setCanFocus(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_TextBox_setCanFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_TextBox_setCaretLocation(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
+
+                TextBox* instance = getInstance(state);
+                instance->setCaretLocation(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_TextBox_setCaretLocation - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_TextBox_setConsumeInputEvents(lua_State* state)
 {
     // Get the number of parameters.
@@ -3652,6 +3998,41 @@ int lua_TextBox_setEnabled(lua_State* state)
     return 0;
 }
 
+int lua_TextBox_setFocus(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                TextBox* instance = getInstance(state);
+                bool result = instance->setFocus();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_TextBox_setFocus - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_TextBox_setFocusIndex(lua_State* state)
 {
     // Get the number of parameters.

+ 10 - 0
gameplay/src/lua/lua_TextBox.h

@@ -9,6 +9,7 @@ int lua_TextBox__gc(lua_State* state);
 int lua_TextBox_addListener(lua_State* state);
 int lua_TextBox_addRef(lua_State* state);
 int lua_TextBox_addScriptCallback(lua_State* state);
+int lua_TextBox_canFocus(lua_State* state);
 int lua_TextBox_createAnimation(lua_State* state);
 int lua_TextBox_createAnimationFromBy(lua_State* state);
 int lua_TextBox_createAnimationFromTo(lua_State* state);
@@ -22,6 +23,7 @@ int lua_TextBox_getAutoHeight(lua_State* state);
 int lua_TextBox_getAutoWidth(lua_State* state);
 int lua_TextBox_getBorder(lua_State* state);
 int lua_TextBox_getBounds(lua_State* state);
+int lua_TextBox_getCaretLocation(lua_State* state);
 int lua_TextBox_getClip(lua_State* state);
 int lua_TextBox_getClipBounds(lua_State* state);
 int lua_TextBox_getConsumeInputEvents(lua_State* state);
@@ -52,16 +54,21 @@ int lua_TextBox_getText(lua_State* state);
 int lua_TextBox_getTextAlignment(lua_State* state);
 int lua_TextBox_getTextColor(lua_State* state);
 int lua_TextBox_getTextRightToLeft(lua_State* state);
+int lua_TextBox_getTopLevelForm(lua_State* state);
 int lua_TextBox_getType(lua_State* state);
 int lua_TextBox_getWidth(lua_State* state);
 int lua_TextBox_getX(lua_State* state);
 int lua_TextBox_getY(lua_State* state);
 int lua_TextBox_getZIndex(lua_State* state);
+int lua_TextBox_hasFocus(lua_State* state);
 int lua_TextBox_initialize(lua_State* state);
+int lua_TextBox_isChild(lua_State* state);
 int lua_TextBox_isContainer(lua_State* state);
 int lua_TextBox_isEnabled(lua_State* state);
+int lua_TextBox_isEnabledInHierarchy(lua_State* state);
 int lua_TextBox_isHeightPercentage(lua_State* state);
 int lua_TextBox_isVisible(lua_State* state);
+int lua_TextBox_isVisibleInHierarchy(lua_State* state);
 int lua_TextBox_isWidthPercentage(lua_State* state);
 int lua_TextBox_isXPercentage(lua_State* state);
 int lua_TextBox_isYPercentage(lua_State* state);
@@ -74,10 +81,13 @@ int lua_TextBox_setAutoHeight(lua_State* state);
 int lua_TextBox_setAutoWidth(lua_State* state);
 int lua_TextBox_setBorder(lua_State* state);
 int lua_TextBox_setBounds(lua_State* state);
+int lua_TextBox_setCanFocus(lua_State* state);
+int lua_TextBox_setCaretLocation(lua_State* state);
 int lua_TextBox_setConsumeInputEvents(lua_State* state);
 int lua_TextBox_setCursorColor(lua_State* state);
 int lua_TextBox_setCursorRegion(lua_State* state);
 int lua_TextBox_setEnabled(lua_State* state);
+int lua_TextBox_setFocus(lua_State* state);
 int lua_TextBox_setFocusIndex(lua_State* state);
 int lua_TextBox_setFont(lua_State* state);
 int lua_TextBox_setFontSize(lua_State* state);