Procházet zdrojové kódy

Merge branch 'next' of https://github.com/blackberry/GamePlay into next

sgrenier před 12 roky
rodič
revize
147052aea5
55 změnil soubory, kde provedl 6383 přidání a 101 odebrání
  1. 2 0
      gameplay/CMakeLists.txt
  2. 1 0
      gameplay/android/jni/Android.mk
  3. 21 9
      gameplay/gameplay.vcxproj
  4. 61 28
      gameplay/gameplay.vcxproj.filters
  5. 1 0
      gameplay/res/shaders/colored.frag
  6. 5 0
      gameplay/src/Container.cpp
  7. 34 1
      gameplay/src/Form.cpp
  8. 10 0
      gameplay/src/Form.h
  9. 13 1
      gameplay/src/Game.cpp
  10. 2 1
      gameplay/src/Game.h
  11. 57 7
      gameplay/src/Gamepad.cpp
  12. 25 23
      gameplay/src/Gamepad.h
  13. 132 0
      gameplay/src/ImageControl.cpp
  14. 142 0
      gameplay/src/ImageControl.h
  15. 1 0
      gameplay/src/Platform.cpp
  16. 1 1
      gameplay/src/ScriptController.cpp
  17. 1 0
      gameplay/src/SpriteBatch.cpp
  18. 6 0
      gameplay/src/Theme.cpp
  19. 6 1
      gameplay/src/Theme.h
  20. 1 0
      gameplay/src/lua/lua_Container.cpp
  21. 36 0
      gameplay/src/lua/lua_DepthStencilTarget.cpp
  22. 1 0
      gameplay/src/lua/lua_DepthStencilTarget.h
  23. 1 0
      gameplay/src/lua/lua_Form.cpp
  24. 72 0
      gameplay/src/lua/lua_FrameBuffer.cpp
  25. 2 0
      gameplay/src/lua/lua_FrameBuffer.h
  26. 86 0
      gameplay/src/lua/lua_Frustum.cpp
  27. 2 0
      gameplay/src/lua/lua_Frustum.h
  28. 41 0
      gameplay/src/lua/lua_Game.cpp
  29. 1 0
      gameplay/src/lua/lua_Game.h
  30. 2 0
      gameplay/src/lua/lua_Gamepad.cpp
  31. 15 0
      gameplay/src/lua/lua_GamepadGamepadEvent.cpp
  32. 7 0
      gameplay/src/lua/lua_Global.cpp
  33. 4736 0
      gameplay/src/lua/lua_ImageControl.cpp
  34. 109 0
      gameplay/src/lua/lua_ImageControl.h
  35. 53 0
      gameplay/src/lua/lua_Light.cpp
  36. 1 0
      gameplay/src/lua/lua_Light.h
  37. 37 0
      gameplay/src/lua/lua_Material.cpp
  38. 1 0
      gameplay/src/lua/lua_Material.h
  39. 37 0
      gameplay/src/lua/lua_Pass.cpp
  40. 1 0
      gameplay/src/lua/lua_Pass.h
  41. 4 0
      gameplay/src/lua/lua_Platform.cpp
  42. 37 0
      gameplay/src/lua/lua_RenderState.cpp
  43. 1 0
      gameplay/src/lua/lua_RenderState.h
  44. 1 0
      gameplay/src/lua/lua_Scene.cpp
  45. 1 0
      gameplay/src/lua/lua_SpriteBatch.cpp
  46. 37 0
      gameplay/src/lua/lua_Technique.cpp
  47. 1 0
      gameplay/src/lua/lua_Technique.h
  48. 311 0
      gameplay/src/lua/lua_Terrain.cpp
  49. 36 29
      gameplay/src/lua/lua_Terrain.h
  50. 133 0
      gameplay/src/lua/lua_TerrainListener.cpp
  51. 15 0
      gameplay/src/lua/lua_TerrainListener.h
  52. 38 0
      gameplay/src/lua/lua_ThemeUVs.cpp
  53. 1 0
      gameplay/src/lua/lua_ThemeUVs.h
  54. 2 0
      gameplay/src/lua/lua_all_bindings.cpp
  55. 2 0
      gameplay/src/lua/lua_all_bindings.h

+ 2 - 0
gameplay/CMakeLists.txt

@@ -83,6 +83,8 @@ set(GAMEPLAY_SRC
     src/Image.cpp
     src/Image.h
     src/Image.inl
+    src/ImageControl.cpp
+    src/ImageControl.h
     src/Joint.cpp
     src/Joint.h
     src/Joystick.cpp

+ 1 - 0
gameplay/android/jni/Android.mk

@@ -54,6 +54,7 @@ LOCAL_SRC_FILES := \
     Gamepad.cpp \
     HeightField.cpp \
     Image.cpp \
+	ImageControl.cpp \
     Joint.cpp \
     Joystick.cpp \
     Label.cpp \

+ 21 - 9
gameplay/gameplay.vcxproj

@@ -91,6 +91,7 @@
     <ClCompile Include="src\gameplay-main-windows.cpp" />
     <ClCompile Include="src\HeightField.cpp" />
     <ClCompile Include="src\Image.cpp" />
+    <ClCompile Include="src\ImageControl.cpp" />
     <ClCompile Include="src\Joint.cpp" />
     <ClCompile Include="src\Joystick.cpp" />
     <ClCompile Include="src\Label.cpp" />
@@ -158,6 +159,7 @@
     <ClCompile Include="src\lua\lua_Global.cpp" />
     <ClCompile Include="src\lua\lua_HeightField.cpp" />
     <ClCompile Include="src\lua\lua_Image.cpp" />
+    <ClCompile Include="src\lua\lua_ImageControl.cpp" />
     <ClCompile Include="src\lua\lua_ImageFormat.cpp" />
     <ClCompile Include="src\lua\lua_Joint.cpp" />
     <ClCompile Include="src\lua\lua_Joystick.cpp" />
@@ -240,6 +242,7 @@
     <ClCompile Include="src\lua\lua_Technique.cpp" />
     <ClCompile Include="src\lua\lua_Terrain.cpp" />
     <ClCompile Include="src\lua\lua_TerrainFlags.cpp" />
+    <ClCompile Include="src\lua\lua_TerrainListener.cpp" />
     <ClCompile Include="src\lua\lua_TextBox.cpp" />
     <ClCompile Include="src\lua\lua_Texture.cpp" />
     <ClCompile Include="src\lua\lua_TextureFilter.cpp" />
@@ -367,6 +370,7 @@
     <ClInclude Include="src\Gesture.h" />
     <ClInclude Include="src\HeightField.h" />
     <ClInclude Include="src\Image.h" />
+    <ClInclude Include="src\ImageControl.h" />
     <ClInclude Include="src\Joint.h" />
     <ClInclude Include="src\Joystick.h" />
     <ClInclude Include="src\Keyboard.h" />
@@ -435,6 +439,7 @@
     <ClInclude Include="src\lua\lua_Global.h" />
     <ClInclude Include="src\lua\lua_HeightField.h" />
     <ClInclude Include="src\lua\lua_Image.h" />
+    <ClInclude Include="src\lua\lua_ImageControl.h" />
     <ClInclude Include="src\lua\lua_ImageFormat.h" />
     <ClInclude Include="src\lua\lua_Joint.h" />
     <ClInclude Include="src\lua\lua_Joystick.h" />
@@ -517,6 +522,7 @@
     <ClInclude Include="src\lua\lua_Technique.h" />
     <ClInclude Include="src\lua\lua_Terrain.h" />
     <ClInclude Include="src\lua\lua_TerrainFlags.h" />
+    <ClInclude Include="src\lua\lua_TerrainListener.h" />
     <ClInclude Include="src\lua\lua_TextBox.h" />
     <ClInclude Include="src\lua\lua_Texture.h" />
     <ClInclude Include="src\lua\lua_TextureFilter.h" />
@@ -613,15 +619,21 @@
     <None Include="res\shaders\colored-unlit.vert" />
     <None Include="res\shaders\colored.frag" />
     <None Include="res\shaders\colored.vert" />
-    <None Include="res\shaders\lib\attributes-skinning.vert" />
-    <None Include="res\shaders\lib\attributes.vert" />
-    <None Include="res\shaders\lib\lighting-directional.frag" />
-    <None Include="res\shaders\lib\lighting-directional.vert" />
-    <None Include="res\shaders\lib\lighting-point.frag" />
-    <None Include="res\shaders\lib\lighting-point.vert" />
-    <None Include="res\shaders\lib\lighting-spot.frag" />
-    <None Include="res\shaders\lib\lighting-spot.vert" />
-    <None Include="res\shaders\lib\lighting.frag" />
+    <None Include="res\shaders\font.frag" />
+    <None Include="res\shaders\font.vert" />
+    <None Include="res\shaders\form.frag" />
+    <None Include="res\shaders\form.vert" />
+    <None Include="res\shaders\lighting-directional.frag" />
+    <None Include="res\shaders\lighting-directional.vert" />
+    <None Include="res\shaders\lighting-point.frag" />
+    <None Include="res\shaders\lighting-point.vert" />
+    <None Include="res\shaders\lighting-spot.frag" />
+    <None Include="res\shaders\lighting-spot.vert" />
+    <None Include="res\shaders\lighting.frag" />
+    <None Include="res\shaders\skinning-none.vert" />
+    <None Include="res\shaders\skinning.vert" />
+    <None Include="res\shaders\sprite.frag" />
+    <None Include="res\shaders\sprite.vert" />
     <None Include="res\shaders\terrain.frag" />
     <None Include="res\shaders\terrain.vert" />
     <None Include="res\shaders\textured-bumped.frag" />

+ 61 - 28
gameplay/gameplay.vcxproj.filters

@@ -10,9 +10,6 @@
     <Filter Include="res\shaders">
       <UniqueIdentifier>{be0b36f1-49ed-4a06-9f1f-57c654a554fe}</UniqueIdentifier>
     </Filter>
-    <Filter Include="res\shaders\lib">
-      <UniqueIdentifier>{d42defb1-22e2-4573-8077-9bd23e61494c}</UniqueIdentifier>
-    </Filter>
     <Filter Include="src\lua">
       <UniqueIdentifier>{21cf31c6-9c10-44cb-a864-d46a0e7bfe5e}</UniqueIdentifier>
     </Filter>
@@ -843,6 +840,15 @@
     <ClCompile Include="src\Platform.cpp">
       <Filter>src</Filter>
     </ClCompile>
+    <ClCompile Include="src\ImageControl.cpp">
+      <Filter>src</Filter>
+    </ClCompile>
+    <ClCompile Include="src\lua\lua_ImageControl.cpp">
+      <Filter>src\lua</Filter>
+    </ClCompile>
+    <ClCompile Include="src\lua\lua_TerrainListener.cpp">
+      <Filter>src\lua</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="src\Animation.h">
@@ -1670,6 +1676,15 @@
     <ClInclude Include="src\lua\lua_HeightField.h">
       <Filter>src\lua</Filter>
     </ClInclude>
+    <ClInclude Include="src\ImageControl.h">
+      <Filter>src</Filter>
+    </ClInclude>
+    <ClInclude Include="src\lua\lua_ImageControl.h">
+      <Filter>src\lua</Filter>
+    </ClInclude>
+    <ClInclude Include="src\lua\lua_TerrainListener.h">
+      <Filter>src\lua</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="src\Game.inl">
@@ -1717,55 +1732,73 @@
     <None Include="res\shaders\colored-unlit.vert">
       <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\textured.frag">
+    <None Include="res\shaders\font.frag">
       <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\textured.vert">
+    <None Include="res\shaders\font.vert">
       <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\textured-bumped.frag">
+    <None Include="res\shaders\form.frag">
       <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\textured-bumped.vert">
+    <None Include="res\shaders\form.vert">
       <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\textured-unlit.frag">
+    <None Include="res\shaders\lighting.frag">
       <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\textured-unlit.vert">
+    <None Include="res\shaders\lighting-directional.frag">
+      <Filter>res\shaders</Filter>
+    </None>
+    <None Include="res\shaders\lighting-directional.vert">
       <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\lib\attributes.vert">
-      <Filter>res\shaders\lib</Filter>
+    <None Include="res\shaders\lighting-point.frag">
+      <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\lib\attributes-skinning.vert">
-      <Filter>res\shaders\lib</Filter>
+    <None Include="res\shaders\lighting-point.vert">
+      <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\lib\lighting.frag">
-      <Filter>res\shaders\lib</Filter>
+    <None Include="res\shaders\lighting-spot.frag">
+      <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\lib\lighting-directional.frag">
-      <Filter>res\shaders\lib</Filter>
+    <None Include="res\shaders\lighting-spot.vert">
+      <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\lib\lighting-directional.vert">
-      <Filter>res\shaders\lib</Filter>
+    <None Include="res\shaders\skinning.vert">
+      <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\lib\lighting-point.frag">
-      <Filter>res\shaders\lib</Filter>
+    <None Include="res\shaders\skinning-none.vert">
+      <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\lib\lighting-point.vert">
-      <Filter>res\shaders\lib</Filter>
+    <None Include="res\shaders\sprite.frag">
+      <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\lib\lighting-spot.frag">
-      <Filter>res\shaders\lib</Filter>
+    <None Include="res\shaders\sprite.vert">
+      <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\lib\lighting-spot.vert">
-      <Filter>res\shaders\lib</Filter>
+    <None Include="res\shaders\terrain.frag">
+      <Filter>res\shaders</Filter>
     </None>
     <None Include="res\shaders\terrain.vert">
       <Filter>res\shaders</Filter>
     </None>
-    <None Include="res\shaders\terrain.frag">
+    <None Include="res\shaders\textured.frag">
+      <Filter>res\shaders</Filter>
+    </None>
+    <None Include="res\shaders\textured.vert">
+      <Filter>res\shaders</Filter>
+    </None>
+    <None Include="res\shaders\textured-bumped.frag">
+      <Filter>res\shaders</Filter>
+    </None>
+    <None Include="res\shaders\textured-bumped.vert">
+      <Filter>res\shaders</Filter>
+    </None>
+    <None Include="res\shaders\textured-unlit.frag">
+      <Filter>res\shaders</Filter>
+    </None>
+    <None Include="res\shaders\textured-unlit.vert">
       <Filter>res\shaders</Filter>
     </None>
   </ItemGroup>

+ 1 - 0
gameplay/res/shaders/colored.frag

@@ -14,6 +14,7 @@ uniform float u_specularExponent;				// Specular exponent
 #if defined(SPOT_LIGHT)
 uniform float u_spotLightInnerAngleCos;			// The bright spot [0.0 - 1.0]
 uniform float u_spotLightOuterAngleCos;			// The soft outer part [0.0 - 1.0]
+uniform vec3 u_spotLightDirection;              // Direction of a spot light source
 #endif
 #if defined(MODULATE_COLOR)
 uniform vec4 u_modulateColor;					// Modulation color

+ 5 - 0
gameplay/src/Container.cpp

@@ -10,6 +10,7 @@
 #include "RadioButton.h"
 #include "Slider.h"
 #include "TextBox.h"
+#include "ImageControl.h"
 #include "Joystick.h"
 #include "Game.h"
 
@@ -165,6 +166,10 @@ void Container::addControls(Theme* theme, Properties* properties)
         {
             control = Joystick::create(controlStyle, controlSpace);
         }
+        else if (controlName == "IMAGE")
+        {
+            control = ImageControl::create(controlStyle, controlSpace);
+        }
         else
         {
             // Ignore - not a valid control name.

+ 34 - 1
gameplay/src/Form.cpp

@@ -586,6 +586,21 @@ const char* Form::getType() const
     return "form";
 }
 
+void Form::updateInternal(float elapsedTime)
+{
+    size_t size = __forms.size();
+    for (size_t i = 0; i < size; ++i)
+    {
+        Form* form = __forms[i];
+        GP_ASSERT(form);
+
+        if (form->isEnabled() && form->isVisible())
+        {
+            form->update(elapsedTime);
+        }
+    }
+}
+
 bool Form::touchEventInternal(Touch::TouchEvent evt, int x, int y, unsigned int contactIndex)
 {
     // Check for a collision with each Form in __forms.
@@ -643,7 +658,7 @@ bool Form::keyEventInternal(Keyboard::KeyEvent evt, int key)
     {
         Form* form = __forms[i];
         GP_ASSERT(form);
-        if (form->isEnabled() && form->isVisible())
+        if (form->isEnabled() && form->isVisible() && form->getState() == Control::FOCUS)
         {
             if (form->keyEvent(evt, key))
                 return true;
@@ -706,6 +721,24 @@ bool Form::mouseEventInternal(Mouse::MouseEvent evt, int x, int y, int wheelDelt
     return eventConsumed;
 }
 
+bool Form::gamepadEventInternal(Gamepad::GamepadEvent evt, Gamepad* gamepad, unsigned int analogIndex)
+{
+    bool eventConsumed = false;
+
+    for (size_t i = 0; i < __forms.size(); ++i)
+    {
+        Form* form = __forms[i];
+        GP_ASSERT(form);
+
+        if (form->isEnabled() && form->isVisible())
+        {
+            eventConsumed |= form->gamepadEventInternal(evt, gamepad, analogIndex);
+        }
+    }
+
+    return eventConsumed;
+}
+
 bool Form::projectPoint(int x, int y, Vector3* point)
 {
     Scene* scene = _node->getScene();

+ 10 - 0
gameplay/src/Form.h

@@ -9,6 +9,7 @@
 #include "Touch.h"
 #include "Keyboard.h"
 #include "Mouse.h"
+#include "Gamepad.h"
 
 namespace gameplay
 {
@@ -48,6 +49,8 @@ class Theme;
 class Form : public Container
 {
     friend class Platform;
+    friend class Game;
+    friend class Gamepad;
 
 public:
 
@@ -188,6 +191,11 @@ private:
      */
     void updateBounds();
 
+    /**
+     * Updates all visible, enabled forms.
+     */
+    static void updateInternal(float elapsedTime);
+
     /**
      * Propagate touch events to enabled forms.
      *
@@ -211,6 +219,8 @@ private:
      */
     static bool mouseEventInternal(Mouse::MouseEvent evt, int x, int y, int wheelDelta);
 
+    static bool gamepadEventInternal(Gamepad::GamepadEvent evt, Gamepad* gamepad, unsigned int analogIndex);
+
     /**
      * Get the next highest power of two of an integer.  Used when creating framebuffers.
      *

+ 13 - 1
gameplay/src/Game.cpp

@@ -322,6 +322,12 @@ void Game::frame()
         // Update AI.
         _aiController->update(elapsedTime);
 
+        // Update gamepads.
+        Gamepad::updateInternal(elapsedTime);
+
+        // Update forms.
+        Form::updateInternal(elapsedTime);
+
         // Application Update.
         update(elapsedTime);
 
@@ -348,6 +354,12 @@ void Game::frame()
     }
 	else if (_state == Game::PAUSED)
     {
+        // Update gamepads.
+        Gamepad::updateInternal(0);
+
+        // Update forms.
+        Form::updateInternal(0);
+
         // Application Update.
         update(0);
 
@@ -509,7 +521,7 @@ void Game::gamepadEvent(Gamepad::GamepadEvent evt, Gamepad* gamepad)
 {
 }
 
-void Game::getArguments(int* argc, char*** argv)
+void Game::getArguments(int* argc, char*** argv) const
 {
     Platform::getArguments(argc, argv);
 }

+ 2 - 1
gameplay/src/Game.h

@@ -523,8 +523,9 @@ public:
      * 
      * @param argc The number of command line arguments.
      * @param argv The array of command line arguments.
+     * @script{ignore}
      */
-    void getArguments(int* argc, char*** argv);
+    void getArguments(int* argc, char*** argv) const;
 
     /**
      * Schedules a time event to be sent to the given TimeListener a given number of game milliseconds from now.

+ 57 - 7
gameplay/src/Gamepad.cpp

@@ -3,6 +3,8 @@
 #include "Game.h"
 #include "Button.h"
 #include "Platform.h"
+#include "Form.h"
+#include "Joystick.h"
 
 namespace gameplay
 {
@@ -23,6 +25,7 @@ Gamepad::Gamepad(const char* formPath)
     for (int i = 0; i < 2; ++i)
     {
         _uiJoysticks[i] = NULL;
+        _triggers[i] = 0.0f;
     }
 
     for (int i = 0; i < 20; ++i)
@@ -47,6 +50,11 @@ Gamepad::Gamepad(GamepadHandle handle, unsigned int buttonCount, unsigned int jo
     {
         _productString = productString;
     }
+
+    for (int i = 0; i < 2; ++i)
+    {
+        _triggers[i] = 0.0f;
+    }
 }
 
 Gamepad::~Gamepad()
@@ -181,6 +189,19 @@ Gamepad* Gamepad::getGamepad(unsigned int index, bool preferPhysical)
     return backupVirtual;
 }
 
+Gamepad* Gamepad::getGamepad(GamepadHandle handle)
+{
+    unsigned int count = __gamepads.size();
+    for (unsigned int i = 0; i < count; ++i)
+    {
+        if (__gamepads[i]->_handle == handle)
+        {
+            return __gamepads[i];
+        }
+    }
+    return NULL;
+}
+
 Gamepad::ButtonMapping Gamepad::getButtonMappingFromString(const char* string)
 {
     if (strcmp(string, "A") == 0 || strcmp(string, "BUTTON_A") == 0)
@@ -250,16 +271,18 @@ const char* Gamepad::getProductString() const
 
 void Gamepad::update(float elapsedTime)
 {
-    if (_form)
+    if (!_form)
     {
-        if (_form->isEnabled())
-        {
-            _form->update(elapsedTime);
-        }
+        Platform::pollGamepadState(this);
     }
-    else
+}
+
+void Gamepad::updateInternal(float elapsedTime)
+{
+    unsigned int size = __gamepads.size();
+    for (unsigned int i = 0; i < size; ++i)
     {
-        Platform::pollGamepadState(this);
+        __gamepads[i]->update(elapsedTime);
     }
 }
 
@@ -356,4 +379,31 @@ Form* Gamepad::getForm() const
     return _form;
 }
 
+void Gamepad::setButtons(unsigned int buttons)
+{
+    if (buttons != _buttons)
+    {
+        _buttons = buttons;
+        Form::gamepadEventInternal(BUTTON_EVENT, this, 0);
+    }
+}
+
+void Gamepad::setJoystickValue(unsigned int index, float x, float y)
+{
+    if (_joysticks[index].x != x || _joysticks[index].y != y)
+    {
+        _joysticks[index].set(x, y);
+        Form::gamepadEventInternal(JOYSTICK_EVENT, this, index);
+    }
+}
+
+void Gamepad::setTriggerValue(unsigned int index, float value)
+{
+    if (_triggers[index] != value)
+    {
+        _triggers[index] = value;
+        Form::gamepadEventInternal(TRIGGER_EVENT, this, index);
+    }
+}
+
 }

+ 25 - 23
gameplay/src/Gamepad.h

@@ -1,14 +1,16 @@
 #ifndef GAMEPAD_H_
 #define GAMEPAD_H_
 
-#include "Form.h"
-#include "Joystick.h"
+#include "Vector2.h"
 
 namespace gameplay
 {
 
-class Platform;
 class Button;
+class Container;
+class Form;
+class Joystick;
+class Platform;
 
 /**
  * Defines an interface for handling gamepad input.
@@ -17,7 +19,6 @@ class Gamepad
 {
     friend class Platform;
     friend class Game;
-    friend class Control;
     friend class Button;
 
 public:
@@ -28,7 +29,10 @@ public:
     enum GamepadEvent
     {
         CONNECTED_EVENT,
-        DISCONNECTED_EVENT
+        DISCONNECTED_EVENT,
+        BUTTON_EVENT,
+        JOYSTICK_EVENT,
+        TRIGGER_EVENT
     };
 
     /**
@@ -164,7 +168,6 @@ public:
      */
     void draw();
 
-
 private:
 
     /**
@@ -188,18 +191,23 @@ private:
      */
     Gamepad(GamepadHandle handle, 
             unsigned int buttonCount, unsigned int joystickCount, unsigned int triggerCount,
-            unsigned int vendorId, unsigned int productId, 
-            const char* vendorString, const char* productString);
+            unsigned int vendorId, unsigned int productId, const char* vendorString, const char* productString);
 
     /**
      * Copy constructor.
      */
     Gamepad(const Gamepad& copy);
 
+    /** 
+     * Destructor.
+     */
+    virtual ~Gamepad();
+
+    static void updateInternal(float elapsedTime);
+
     static Gamepad* add(GamepadHandle handle, 
                         unsigned int buttonCount, unsigned int joystickCount, unsigned int triggerCount,
-                        unsigned int vendorId, unsigned int productId, 
-                        const char* vendorString, const char* productString);
+                        unsigned int vendorId, unsigned int productId, const char* vendorString, const char* productString);
 
     static Gamepad* add(const char* formPath);
 
@@ -211,20 +219,18 @@ private:
 
     static Gamepad* getGamepad(unsigned int index, bool preferPhysical = true);
 
+    static Gamepad* getGamepad(GamepadHandle handle);
+
     static ButtonMapping getButtonMappingFromString(const char* string);
 
-    /** 
-     * Destructor.
-     */
-    virtual ~Gamepad();
+    void setButtons(unsigned int buttons);
+
+    void setJoystickValue(unsigned int index, float x, float y);
+
+    void setTriggerValue(unsigned int index, float value);
     
-    /** 
-     * Binds the Joystick and Button Control object's from the specified container.
-     */
     void bindGamepadControls(Container* container);
 
-    static unsigned int getIndexFromMapping(Gamepad::ButtonMapping mapping);
-
     GamepadHandle _handle;        // The handle of the Gamepad.
     unsigned int _buttonCount;    // Number of buttons.
     unsigned int _joystickCount;  // Number of joysticks.
@@ -233,13 +239,9 @@ private:
     unsigned int _productId;
     std::string _vendorString;
     std::string _productString;
-    
-    // Data needed for virtual gamepads.
     Form* _form;
     Joystick* _uiJoysticks[2];
     Button* _uiButtons[20];
-
-    // Current gamepad state.
     unsigned int _buttons;
     Vector2 _joysticks[2];
     float _triggers[2];

+ 132 - 0
gameplay/src/ImageControl.cpp

@@ -0,0 +1,132 @@
+#include "Base.h"
+#include "ImageControl.h"
+
+namespace gameplay
+{
+
+ImageControl::ImageControl() :
+    _srcRegion(Rectangle::empty()), _dstRegion(Rectangle::empty()), _batch(NULL),
+    _tw(0.0f), _th(0.0f), _uvs(Theme::UVs::full())
+{
+}
+
+ImageControl::~ImageControl()
+{
+    SAFE_DELETE(_batch);
+}
+
+ImageControl* ImageControl::create(const char* id, Theme::Style* style)
+{
+    GP_ASSERT(style);
+
+    ImageControl* imageControl = new ImageControl();
+    if (id)
+        imageControl->_id = id;
+    imageControl->setStyle(style);
+
+    imageControl->_consumeInputEvents = false;
+    imageControl->_focusIndex = -2;
+
+    return imageControl;
+}
+
+ImageControl* ImageControl::create(Theme::Style* style, Properties* properties)
+{
+    ImageControl* imageControl = new ImageControl();
+    imageControl->initialize(style, properties);
+
+    imageControl->_consumeInputEvents = false;
+    imageControl->_focusIndex = -2;
+
+    return imageControl;
+}
+
+void ImageControl::initialize(Theme::Style* style, Properties* properties)
+{
+    GP_ASSERT(properties);
+
+    Control::initialize(style, properties);
+
+    const char* path = properties->getString("path");
+    if (path)
+    {
+        setImage(path);
+    }
+
+    Vector4 region;
+    properties->getVector4("srcRegion", &region);
+    setRegionSrc(region.x, region.y, region.z, region.w);
+    properties->getVector4("dstRegion", &region);
+    setRegionDst(region.x, region.y, region.z, region.w);
+}
+
+void ImageControl::setImage(const char* path)
+{
+    SAFE_DELETE(_batch);
+    Texture* texture = Texture::create(path);
+    _batch = SpriteBatch::create(texture);
+    _tw = 1.0f / texture->getWidth();
+    _th = 1.0f / texture->getHeight();
+    texture->release();
+}
+
+void ImageControl::setRegionSrc(float x, float y, float width, float height)
+{
+    _srcRegion.set(x, y, width, height);
+
+    _uvs.u1 = x * _tw;
+    _uvs.u2 = (x + width) * _tw;
+    _uvs.v1 = 1.0f - (y * _th);
+    _uvs.v2 = 1.0f - ((y + height) * _tw);
+}
+
+void ImageControl::setRegionSrc(const Rectangle& region)
+{
+    setRegionSrc(region.x, region.y, region.width, region.height);
+}
+
+const Rectangle& ImageControl::getRegionSrc() const
+{
+    return _srcRegion;
+}
+
+void ImageControl::setRegionDst(float x, float y, float width, float height)
+{
+    _dstRegion.set(x, y, width, height);
+}
+
+void ImageControl::setRegionDst(const Rectangle& region)
+{
+    setRegionDst(region.x, region.y, region.width, region.height);
+}
+
+const Rectangle& ImageControl::getRegionDst() const
+{
+    return _dstRegion;
+}
+
+void ImageControl::drawImages(SpriteBatch* spriteBatch, const Rectangle& clip)
+{
+    spriteBatch->finish();
+
+    // An ImageControl is not part of the texture atlas but should use the same projection matrix.
+    _batch->setProjectionMatrix(spriteBatch->getProjectionMatrix());
+
+    _batch->start();
+    if (_dstRegion.isEmpty())
+    {
+        _batch->draw(_viewportBounds.x, _viewportBounds.y, _viewportBounds.width, _viewportBounds.height,
+            _uvs.u1, _uvs.v1, _uvs.u2, _uvs.v2, Vector4::one(), _viewportClipBounds);
+    }
+    else
+    {
+        _batch->draw(_viewportBounds.x + _dstRegion.x, _viewportBounds.y + _dstRegion.y,
+            _dstRegion.width, _dstRegion.height,
+            _uvs.u1, _uvs.v1, _uvs.u2, _uvs.v2, Vector4::one(), _viewportClipBounds);
+    }
+    _batch->finish();
+
+    spriteBatch->start();
+}
+
+}

+ 142 - 0
gameplay/src/ImageControl.h

@@ -0,0 +1,142 @@
+#ifndef IMAGECONTROL_H_
+#define IMAGECONTROL_H_
+
+#include "Control.h"
+#include "Theme.h"
+#include "Image.h"
+#include "SpriteBatch.h"
+#include "Rectangle.h"
+
+namespace gameplay
+{
+
+/**
+ * An ImageControl allows forms to display images from arbitrary files not specified in the theme.
+ *
+ * The following properties are available for image controls:
+
+ @verbatim
+     imageControl <control ID>
+     {
+         style          = <styleID>
+         alignment      = <Control::Alignment constant> // Note: 'position' will be ignored.
+         position       = <x, y>
+         autoWidth      = <bool>
+         autoHeight     = <bool>
+         size           = <width, height>
+         width          = <width>   // Can be used in place of 'size', e.g. with 'autoHeight = true'
+         height         = <height>  // Can be used in place of 'size', e.g. with 'autoWidth = true'
+         consumeEvents  = <bool>    // Whether the label propagates input events to the Game's input event handler. Default is true.
+         path           = <string>  // Path to image or texture atlas.
+         srcRegion      = <x, y, width, height>  // Region within file to create UVs from.
+         dstRegion      = <x, y, width, height>  // Region of control's viewport to draw into.
+     }
+ @endverbatim
+ */
+class ImageControl : public Control
+{
+    friend class Container;
+
+public:
+
+    /**
+     * Create a new ImageControl.
+     *
+     * @param id The control's ID.
+     * @param style The control's style.
+     *
+     * @return The new ImageControl.
+     * @script{create}
+     */
+    static ImageControl* create(const char* id, Theme::Style* style);
+
+    /**
+     * Set the path of the image for this ImageControl to display.
+     */
+    void setImage(const char* path);
+
+    /**
+     * Set the source region of this ImageControl.  This is the region of the file,
+     * in pixels, to use when drawing.
+     *
+     * @param x The x coordinate of the source region.
+     * @param y The y coordinate of the source region.
+     * @param width The width of the source region.
+     * @param height The height of the source region.
+     */
+    void setRegionSrc(float x, float y, float width, float height);
+
+    /**
+     * Set the source region of this ImageControl.  This is the region of the file,
+     * in pixels, to use when drawing.
+     *
+     * @param region The new source region.
+     */
+    void setRegionSrc(const Rectangle& region);
+
+    /**
+     * Get the source region of this ImageControl.
+     *
+     * @return The source region of this ImageControl.
+     */
+    const Rectangle& getRegionSrc() const;
+
+    /**
+     * Sets the destination region of this ImageControl.  This is the region
+     * within the control's viewport to draw the image.
+     *
+     * @param x The x coordinate of the destination region.
+     * @param y The y coordinate of the destination region.
+     * @param width The width of the destination region.
+     * @param height The height of the destination region.
+     */
+    void setRegionDst(float x, float y, float width, float height);
+    
+    /**
+     * Sets the destination region of this ImageControl.  This is the region
+     * within the control's viewport to draw the image.
+     *
+     * @param region The new destination region.
+     */
+    void setRegionDst(const Rectangle& region);
+
+    /**
+     * Get the destination region of this ImageControl.
+     *
+     * @return The destination region of this ImageControl.
+     */
+    const Rectangle& getRegionDst() const;
+
+protected:
+
+    ImageControl();
+    
+    virtual ~ImageControl();
+
+    static ImageControl* create(Theme::Style* style, Properties* properties);
+
+    virtual void initialize(Theme::Style* style, Properties* properties);
+
+    void drawImages(SpriteBatch* spriteBatch, const Rectangle& clip);
+
+    // Source region.
+    Rectangle _srcRegion;
+    // Destination region.
+    Rectangle _dstRegion;
+    SpriteBatch* _batch;
+    
+    // One over texture width and height, for use when calculating UVs from a new source region.
+    float _tw;
+    float _th;
+    
+    // Calculated UVs.
+    Theme::UVs _uvs;
+
+private:
+
+    ImageControl(const ImageControl& copy);
+};
+
+}
+
+#endif

+ 1 - 0
gameplay/src/Platform.cpp

@@ -3,6 +3,7 @@
 #include "Platform.h"
 #include "Game.h"
 #include "ScriptController.h"
+#include "Form.h"
 
 namespace gameplay
 {

+ 1 - 1
gameplay/src/ScriptController.cpp

@@ -794,7 +794,7 @@ bool ScriptController::mouseEvent(Mouse::MouseEvent evt, int x, int y, int wheel
 {
     if (_callbacks[MOUSE_EVENT])
     {
-        return executeFunction<bool>(_callbacks[MOUSE_EVENT]->c_str(), "[Mouse::MouseEvent]iiii", evt, x, y, wheelDelta);
+        return executeFunction<bool>(_callbacks[MOUSE_EVENT]->c_str(), "[Mouse::MouseEvent]iii", evt, x, y, wheelDelta);
     }
     return false;
 }

+ 1 - 0
gameplay/src/SpriteBatch.cpp

@@ -1,6 +1,7 @@
 #include "Base.h"
 #include "SpriteBatch.h"
 #include "Game.h"
+#include "Material.h"
 
 // Default size of a newly created sprite batch
 #define SPRITE_BATCH_DEFAULT_SIZE 128

+ 6 - 0
gameplay/src/Theme.cpp

@@ -506,6 +506,12 @@ const Theme::UVs& Theme::UVs::empty()
     return empty;
 }
 
+const Theme::UVs& Theme::UVs::full()
+{
+    static UVs full(0, 0, 1, 1);
+    return full;
+}
+
 /**********************
  * Theme::SideRegions *
  **********************/

+ 6 - 1
gameplay/src/Theme.h

@@ -170,10 +170,15 @@ public:
         UVs(float u1, float v1, float u2, float v2);
 
         /**
-         * Get's an empty UVs.
+         * Gets an empty UVs struct (0, 0, 0, 0).
          */
         static const UVs& empty();
 
+        /**
+         * Gets UVs covering an entire texture (0, 0, 1, 1).
+         */
+        static const UVs& full();
+
         /**
          * u component of the first UV coordinate.
          */

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

@@ -11,6 +11,7 @@
 #include "Control.h"
 #include "FlowLayout.h"
 #include "Game.h"
+#include "ImageControl.h"
 #include "Joystick.h"
 #include "Label.h"
 #include "Layout.h"

+ 36 - 0
gameplay/src/lua/lua_DepthStencilTarget.cpp

@@ -20,6 +20,7 @@ void luaRegister_DepthStencilTarget()
         {"getId", lua_DepthStencilTarget_getId},
         {"getRefCount", lua_DepthStencilTarget_getRefCount},
         {"getWidth", lua_DepthStencilTarget_getWidth},
+        {"isPacked", lua_DepthStencilTarget_isPacked},
         {"release", lua_DepthStencilTarget_release},
         {NULL, NULL}
     };
@@ -286,6 +287,41 @@ int lua_DepthStencilTarget_getWidth(lua_State* state)
     return 0;
 }
 
+int lua_DepthStencilTarget_isPacked(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))
+            {
+                DepthStencilTarget* instance = getInstance(state);
+                bool result = instance->isPacked();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_DepthStencilTarget_isPacked - 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_DepthStencilTarget_release(lua_State* state)
 {
     // Get the number of parameters.

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

@@ -12,6 +12,7 @@ int lua_DepthStencilTarget_getHeight(lua_State* state);
 int lua_DepthStencilTarget_getId(lua_State* state);
 int lua_DepthStencilTarget_getRefCount(lua_State* state);
 int lua_DepthStencilTarget_getWidth(lua_State* state);
+int lua_DepthStencilTarget_isPacked(lua_State* state);
 int lua_DepthStencilTarget_release(lua_State* state);
 int lua_DepthStencilTarget_static_create(lua_State* state);
 int lua_DepthStencilTarget_static_getDepthStencilTarget(lua_State* state);

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

@@ -12,6 +12,7 @@
 #include "FlowLayout.h"
 #include "Form.h"
 #include "Game.h"
+#include "ImageControl.h"
 #include "Joystick.h"
 #include "Label.h"
 #include "Layout.h"

+ 72 - 0
gameplay/src/lua/lua_FrameBuffer.cpp

@@ -20,7 +20,9 @@ void luaRegister_FrameBuffer()
         {"getId", lua_FrameBuffer_getId},
         {"getRefCount", lua_FrameBuffer_getRefCount},
         {"getRenderTarget", lua_FrameBuffer_getRenderTarget},
+        {"getRenderTargetCount", lua_FrameBuffer_getRenderTargetCount},
         {"getWidth", lua_FrameBuffer_getWidth},
+        {"isDefault", lua_FrameBuffer_isDefault},
         {"release", lua_FrameBuffer_release},
         {"setDepthStencilTarget", lua_FrameBuffer_setDepthStencilTarget},
         {"setRenderTarget", lua_FrameBuffer_setRenderTarget},
@@ -383,6 +385,41 @@ int lua_FrameBuffer_getRenderTarget(lua_State* state)
     return 0;
 }
 
+int lua_FrameBuffer_getRenderTargetCount(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))
+            {
+                FrameBuffer* instance = getInstance(state);
+                unsigned int result = instance->getRenderTargetCount();
+
+                // Push the return value onto the stack.
+                lua_pushunsigned(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_FrameBuffer_getRenderTargetCount - 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_FrameBuffer_getWidth(lua_State* state)
 {
     // Get the number of parameters.
@@ -418,6 +455,41 @@ int lua_FrameBuffer_getWidth(lua_State* state)
     return 0;
 }
 
+int lua_FrameBuffer_isDefault(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))
+            {
+                FrameBuffer* instance = getInstance(state);
+                bool result = instance->isDefault();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_FrameBuffer_isDefault - 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_FrameBuffer_release(lua_State* state)
 {
     // Get the number of parameters.

+ 2 - 0
gameplay/src/lua/lua_FrameBuffer.h

@@ -13,7 +13,9 @@ int lua_FrameBuffer_getHeight(lua_State* state);
 int lua_FrameBuffer_getId(lua_State* state);
 int lua_FrameBuffer_getRefCount(lua_State* state);
 int lua_FrameBuffer_getRenderTarget(lua_State* state);
+int lua_FrameBuffer_getRenderTargetCount(lua_State* state);
 int lua_FrameBuffer_getWidth(lua_State* state);
+int lua_FrameBuffer_isDefault(lua_State* state);
 int lua_FrameBuffer_release(lua_State* state);
 int lua_FrameBuffer_setDepthStencilTarget(lua_State* state);
 int lua_FrameBuffer_setRenderTarget(lua_State* state);

+ 86 - 0
gameplay/src/lua/lua_Frustum.cpp

@@ -16,9 +16,11 @@ void luaRegister_Frustum()
         {"getBottom", lua_Frustum_getBottom},
         {"getCorners", lua_Frustum_getCorners},
         {"getFar", lua_Frustum_getFar},
+        {"getFarCorners", lua_Frustum_getFarCorners},
         {"getLeft", lua_Frustum_getLeft},
         {"getMatrix", lua_Frustum_getMatrix},
         {"getNear", lua_Frustum_getNear},
+        {"getNearCorners", lua_Frustum_getNearCorners},
         {"getRight", lua_Frustum_getRight},
         {"getTop", lua_Frustum_getTop},
         {"intersects", lua_Frustum_intersects},
@@ -305,6 +307,48 @@ int lua_Frustum_getFar(lua_State* state)
     return 0;
 }
 
+int lua_Frustum_getFarCorners(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<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector3'.");
+                    lua_error(state);
+                }
+
+                Frustum* instance = getInstance(state);
+                instance->getFarCorners(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Frustum_getFarCorners - 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_Frustum_getLeft(lua_State* state)
 {
     // Get the number of parameters.
@@ -435,6 +479,48 @@ int lua_Frustum_getNear(lua_State* state)
     return 0;
 }
 
+int lua_Frustum_getNearCorners(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<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector3'.");
+                    lua_error(state);
+                }
+
+                Frustum* instance = getInstance(state);
+                instance->getNearCorners(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Frustum_getNearCorners - 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_Frustum_getRight(lua_State* state)
 {
     // Get the number of parameters.

+ 2 - 0
gameplay/src/lua/lua_Frustum.h

@@ -10,9 +10,11 @@ int lua_Frustum__init(lua_State* state);
 int lua_Frustum_getBottom(lua_State* state);
 int lua_Frustum_getCorners(lua_State* state);
 int lua_Frustum_getFar(lua_State* state);
+int lua_Frustum_getFarCorners(lua_State* state);
 int lua_Frustum_getLeft(lua_State* state);
 int lua_Frustum_getMatrix(lua_State* state);
 int lua_Frustum_getNear(lua_State* state);
+int lua_Frustum_getNearCorners(lua_State* state);
 int lua_Frustum_getRight(lua_State* state);
 int lua_Frustum_getTop(lua_State* state);
 int lua_Frustum_intersects(lua_State* state);

+ 41 - 0
gameplay/src/lua/lua_Game.cpp

@@ -62,6 +62,7 @@ void luaRegister_Game()
         {"mouseEvent", lua_Game_mouseEvent},
         {"pause", lua_Game_pause},
         {"registerGesture", lua_Game_registerGesture},
+        {"resizeEvent", lua_Game_resizeEvent},
         {"resume", lua_Game_resume},
         {"run", lua_Game_run},
         {"schedule", lua_Game_schedule},
@@ -1743,6 +1744,46 @@ int lua_Game_registerGesture(lua_State* state)
     return 0;
 }
 
+int lua_Game_resizeEvent(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
+
+                // Get parameter 2 off the stack.
+                unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
+
+                Game* instance = getInstance(state);
+                instance->resizeEvent(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Game_resizeEvent - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Game_resume(lua_State* state)
 {
     // Get the number of parameters.

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

@@ -45,6 +45,7 @@ int lua_Game_menuEvent(lua_State* state);
 int lua_Game_mouseEvent(lua_State* state);
 int lua_Game_pause(lua_State* state);
 int lua_Game_registerGesture(lua_State* state);
+int lua_Game_resizeEvent(lua_State* state);
 int lua_Game_resume(lua_State* state);
 int lua_Game_run(lua_State* state);
 int lua_Game_schedule(lua_State* state);

+ 2 - 0
gameplay/src/lua/lua_Gamepad.cpp

@@ -3,8 +3,10 @@
 #include "lua_Gamepad.h"
 #include "Base.h"
 #include "Button.h"
+#include "Form.h"
 #include "Game.h"
 #include "Gamepad.h"
+#include "Joystick.h"
 #include "Platform.h"
 #include "lua_GamepadButtonMapping.h"
 

+ 15 - 0
gameplay/src/lua/lua_GamepadGamepadEvent.cpp

@@ -8,6 +8,9 @@ static const char* enumStringEmpty = "";
 
 static const char* luaEnumString_GamepadGamepadEvent_CONNECTED_EVENT = "CONNECTED_EVENT";
 static const char* luaEnumString_GamepadGamepadEvent_DISCONNECTED_EVENT = "DISCONNECTED_EVENT";
+static const char* luaEnumString_GamepadGamepadEvent_BUTTON_EVENT = "BUTTON_EVENT";
+static const char* luaEnumString_GamepadGamepadEvent_JOYSTICK_EVENT = "JOYSTICK_EVENT";
+static const char* luaEnumString_GamepadGamepadEvent_TRIGGER_EVENT = "TRIGGER_EVENT";
 
 Gamepad::GamepadEvent lua_enumFromString_GamepadGamepadEvent(const char* s)
 {
@@ -15,6 +18,12 @@ Gamepad::GamepadEvent lua_enumFromString_GamepadGamepadEvent(const char* s)
         return Gamepad::CONNECTED_EVENT;
     if (strcmp(s, luaEnumString_GamepadGamepadEvent_DISCONNECTED_EVENT) == 0)
         return Gamepad::DISCONNECTED_EVENT;
+    if (strcmp(s, luaEnumString_GamepadGamepadEvent_BUTTON_EVENT) == 0)
+        return Gamepad::BUTTON_EVENT;
+    if (strcmp(s, luaEnumString_GamepadGamepadEvent_JOYSTICK_EVENT) == 0)
+        return Gamepad::JOYSTICK_EVENT;
+    if (strcmp(s, luaEnumString_GamepadGamepadEvent_TRIGGER_EVENT) == 0)
+        return Gamepad::TRIGGER_EVENT;
     GP_ERROR("Invalid enumeration value '%s' for enumeration Gamepad::GamepadEvent.", s);
     return Gamepad::CONNECTED_EVENT;
 }
@@ -25,6 +34,12 @@ const char* lua_stringFromEnum_GamepadGamepadEvent(Gamepad::GamepadEvent e)
         return luaEnumString_GamepadGamepadEvent_CONNECTED_EVENT;
     if (e == Gamepad::DISCONNECTED_EVENT)
         return luaEnumString_GamepadGamepadEvent_DISCONNECTED_EVENT;
+    if (e == Gamepad::BUTTON_EVENT)
+        return luaEnumString_GamepadGamepadEvent_BUTTON_EVENT;
+    if (e == Gamepad::JOYSTICK_EVENT)
+        return luaEnumString_GamepadGamepadEvent_JOYSTICK_EVENT;
+    if (e == Gamepad::TRIGGER_EVENT)
+        return luaEnumString_GamepadGamepadEvent_TRIGGER_EVENT;
     GP_ERROR("Invalid enumeration value '%d' for enumeration Gamepad::GamepadEvent.", e);
     return enumStringEmpty;
 }

+ 7 - 0
gameplay/src/lua/lua_Global.cpp

@@ -11,6 +11,7 @@ void luaRegister_lua_Global()
     gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Container");
     gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Control");
     gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Form");
+    gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "ImageControl");
     gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Joint");
     gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Joystick");
     gameplay::ScriptUtil::setGlobalHierarchyPair("AnimationTarget", "Label");
@@ -27,6 +28,7 @@ void luaRegister_lua_Global()
     gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "CheckBox");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "Container");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "Form");
+    gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "ImageControl");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "Joystick");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "Label");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Control", "RadioButton");
@@ -76,6 +78,7 @@ void luaRegister_lua_Global()
     gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "FrameBuffer");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "HeightField");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Image");
+    gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "ImageControl");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Joint");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Joystick");
     gameplay::ScriptUtil::setGlobalHierarchyPair("Ref", "Label");
@@ -114,6 +117,7 @@ void luaRegister_lua_Global()
     gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Container");
     gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Control");
     gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Form");
+    gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "ImageControl");
     gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Joint");
     gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Joystick");
     gameplay::ScriptUtil::setGlobalHierarchyPair("ScriptTarget", "Label");
@@ -377,6 +381,9 @@ void luaRegister_lua_Global()
         scopePath.push_back("Gamepad");
         gameplay::ScriptUtil::registerConstantString("CONNECTED_EVENT", "CONNECTED_EVENT", scopePath);
         gameplay::ScriptUtil::registerConstantString("DISCONNECTED_EVENT", "DISCONNECTED_EVENT", scopePath);
+        gameplay::ScriptUtil::registerConstantString("BUTTON_EVENT", "BUTTON_EVENT", scopePath);
+        gameplay::ScriptUtil::registerConstantString("JOYSTICK_EVENT", "JOYSTICK_EVENT", scopePath);
+        gameplay::ScriptUtil::registerConstantString("TRIGGER_EVENT", "TRIGGER_EVENT", scopePath);
     }
 
     // Register enumeration Gesture::GestureEvent.

+ 4736 - 0
gameplay/src/lua/lua_ImageControl.cpp

@@ -0,0 +1,4736 @@
+#include "Base.h"
+#include "ScriptController.h"
+#include "lua_ImageControl.h"
+#include "Animation.h"
+#include "AnimationTarget.h"
+#include "Base.h"
+#include "Control.h"
+#include "Game.h"
+#include "ImageControl.h"
+#include "Node.h"
+#include "Ref.h"
+#include "ScriptController.h"
+#include "ScriptTarget.h"
+#include "lua_ControlAlignment.h"
+#include "lua_ControlListenerEventType.h"
+#include "lua_ControlState.h"
+#include "lua_CurveInterpolationType.h"
+#include "lua_FontJustify.h"
+
+namespace gameplay
+{
+
+void luaRegister_ImageControl()
+{
+    const luaL_Reg lua_members[] = 
+    {
+        {"addListener", lua_ImageControl_addListener},
+        {"addRef", lua_ImageControl_addRef},
+        {"addScriptCallback", lua_ImageControl_addScriptCallback},
+        {"createAnimation", lua_ImageControl_createAnimation},
+        {"createAnimationFromBy", lua_ImageControl_createAnimationFromBy},
+        {"createAnimationFromTo", lua_ImageControl_createAnimationFromTo},
+        {"destroyAnimation", lua_ImageControl_destroyAnimation},
+        {"getAlignment", lua_ImageControl_getAlignment},
+        {"getAnimation", lua_ImageControl_getAnimation},
+        {"getAnimationPropertyComponentCount", lua_ImageControl_getAnimationPropertyComponentCount},
+        {"getAnimationPropertyValue", lua_ImageControl_getAnimationPropertyValue},
+        {"getAutoHeight", lua_ImageControl_getAutoHeight},
+        {"getAutoWidth", lua_ImageControl_getAutoWidth},
+        {"getBorder", lua_ImageControl_getBorder},
+        {"getBounds", lua_ImageControl_getBounds},
+        {"getClip", lua_ImageControl_getClip},
+        {"getClipBounds", lua_ImageControl_getClipBounds},
+        {"getConsumeInputEvents", lua_ImageControl_getConsumeInputEvents},
+        {"getCursorColor", lua_ImageControl_getCursorColor},
+        {"getCursorRegion", lua_ImageControl_getCursorRegion},
+        {"getCursorUVs", lua_ImageControl_getCursorUVs},
+        {"getFocusIndex", lua_ImageControl_getFocusIndex},
+        {"getFont", lua_ImageControl_getFont},
+        {"getFontSize", lua_ImageControl_getFontSize},
+        {"getHeight", lua_ImageControl_getHeight},
+        {"getId", lua_ImageControl_getId},
+        {"getImageColor", lua_ImageControl_getImageColor},
+        {"getImageRegion", lua_ImageControl_getImageRegion},
+        {"getImageUVs", lua_ImageControl_getImageUVs},
+        {"getMargin", lua_ImageControl_getMargin},
+        {"getOpacity", lua_ImageControl_getOpacity},
+        {"getPadding", lua_ImageControl_getPadding},
+        {"getRefCount", lua_ImageControl_getRefCount},
+        {"getRegionDst", lua_ImageControl_getRegionDst},
+        {"getRegionSrc", lua_ImageControl_getRegionSrc},
+        {"getSkinColor", lua_ImageControl_getSkinColor},
+        {"getSkinRegion", lua_ImageControl_getSkinRegion},
+        {"getState", lua_ImageControl_getState},
+        {"getStyle", lua_ImageControl_getStyle},
+        {"getTextAlignment", lua_ImageControl_getTextAlignment},
+        {"getTextColor", lua_ImageControl_getTextColor},
+        {"getTextRightToLeft", lua_ImageControl_getTextRightToLeft},
+        {"getType", lua_ImageControl_getType},
+        {"getWidth", lua_ImageControl_getWidth},
+        {"getX", lua_ImageControl_getX},
+        {"getY", lua_ImageControl_getY},
+        {"getZIndex", lua_ImageControl_getZIndex},
+        {"isContainer", lua_ImageControl_isContainer},
+        {"isEnabled", lua_ImageControl_isEnabled},
+        {"isVisible", lua_ImageControl_isVisible},
+        {"release", lua_ImageControl_release},
+        {"removeListener", lua_ImageControl_removeListener},
+        {"removeScriptCallback", lua_ImageControl_removeScriptCallback},
+        {"setAlignment", lua_ImageControl_setAlignment},
+        {"setAnimationPropertyValue", lua_ImageControl_setAnimationPropertyValue},
+        {"setAutoHeight", lua_ImageControl_setAutoHeight},
+        {"setAutoWidth", lua_ImageControl_setAutoWidth},
+        {"setBorder", lua_ImageControl_setBorder},
+        {"setBounds", lua_ImageControl_setBounds},
+        {"setConsumeInputEvents", lua_ImageControl_setConsumeInputEvents},
+        {"setCursorColor", lua_ImageControl_setCursorColor},
+        {"setCursorRegion", lua_ImageControl_setCursorRegion},
+        {"setEnabled", lua_ImageControl_setEnabled},
+        {"setFocusIndex", lua_ImageControl_setFocusIndex},
+        {"setFont", lua_ImageControl_setFont},
+        {"setFontSize", lua_ImageControl_setFontSize},
+        {"setHeight", lua_ImageControl_setHeight},
+        {"setImage", lua_ImageControl_setImage},
+        {"setImageColor", lua_ImageControl_setImageColor},
+        {"setImageRegion", lua_ImageControl_setImageRegion},
+        {"setMargin", lua_ImageControl_setMargin},
+        {"setOpacity", lua_ImageControl_setOpacity},
+        {"setPadding", lua_ImageControl_setPadding},
+        {"setPosition", lua_ImageControl_setPosition},
+        {"setRegionDst", lua_ImageControl_setRegionDst},
+        {"setRegionSrc", lua_ImageControl_setRegionSrc},
+        {"setSize", lua_ImageControl_setSize},
+        {"setSkinColor", lua_ImageControl_setSkinColor},
+        {"setSkinRegion", lua_ImageControl_setSkinRegion},
+        {"setState", lua_ImageControl_setState},
+        {"setStyle", lua_ImageControl_setStyle},
+        {"setTextAlignment", lua_ImageControl_setTextAlignment},
+        {"setTextColor", lua_ImageControl_setTextColor},
+        {"setTextRightToLeft", lua_ImageControl_setTextRightToLeft},
+        {"setVisible", lua_ImageControl_setVisible},
+        {"setWidth", lua_ImageControl_setWidth},
+        {"setZIndex", lua_ImageControl_setZIndex},
+        {NULL, NULL}
+    };
+    const luaL_Reg lua_statics[] = 
+    {
+        {"ANIMATE_OPACITY", lua_ImageControl_static_ANIMATE_OPACITY},
+        {"ANIMATE_POSITION", lua_ImageControl_static_ANIMATE_POSITION},
+        {"ANIMATE_POSITION_X", lua_ImageControl_static_ANIMATE_POSITION_X},
+        {"ANIMATE_POSITION_Y", lua_ImageControl_static_ANIMATE_POSITION_Y},
+        {"ANIMATE_SIZE", lua_ImageControl_static_ANIMATE_SIZE},
+        {"ANIMATE_SIZE_HEIGHT", lua_ImageControl_static_ANIMATE_SIZE_HEIGHT},
+        {"ANIMATE_SIZE_WIDTH", lua_ImageControl_static_ANIMATE_SIZE_WIDTH},
+        {"create", lua_ImageControl_static_create},
+        {NULL, NULL}
+    };
+    std::vector<std::string> scopePath;
+
+    gameplay::ScriptUtil::registerClass("ImageControl", lua_members, NULL, lua_ImageControl__gc, lua_statics, scopePath);
+}
+
+static ImageControl* getInstance(lua_State* state)
+{
+    void* userdata = luaL_checkudata(state, 1, "ImageControl");
+    luaL_argcheck(state, userdata != NULL, 1, "'ImageControl' expected.");
+    return (ImageControl*)((gameplay::ScriptUtil::LuaObject*)userdata)->instance;
+}
+
+int lua_ImageControl__gc(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))
+            {
+                void* userdata = luaL_checkudata(state, 1, "ImageControl");
+                luaL_argcheck(state, userdata != NULL, 1, "'ImageControl' expected.");
+                gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)userdata;
+                if (object->owns)
+                {
+                    ImageControl* instance = (ImageControl*)object->instance;
+                    SAFE_RELEASE(instance);
+                }
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl__gc - 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_addListener(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 3:
+        {
+            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) &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Control::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<Control::Listener>(2, "ControlListener", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Control::Listener'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                int param2 = (int)luaL_checkint(state, 3);
+
+                ImageControl* instance = getInstance(state);
+                instance->addListener(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_addListener - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_addRef(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);
+                instance->addRef();
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_addRef - 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_addScriptCallback(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                std::string param1 = gameplay::ScriptUtil::getString(2, true);
+
+                // Get parameter 2 off the stack.
+                std::string param2 = gameplay::ScriptUtil::getString(3, true);
+
+                ImageControl* instance = getInstance(state);
+                instance->addScriptCallback(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_addScriptCallback - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_createAnimation(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 3:
+        {
+            do
+            {
+                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                    (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                    (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
+                {
+                    // Get parameter 1 off the stack.
+                    const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                    // Get parameter 2 off the stack.
+                    const char* param2 = gameplay::ScriptUtil::getString(3, false);
+
+                    ImageControl* instance = getInstance(state);
+                    void* returnPtr = (void*)instance->createAnimation(param1, param2);
+                    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, "Animation");
+                        lua_setmetatable(state, -2);
+                    }
+                    else
+                    {
+                        lua_pushnil(state);
+                    }
+
+                    return 1;
+                }
+            } while (0);
+
+            do
+            {
+                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                    (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                    (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
+                {
+                    // Get parameter 1 off the stack.
+                    const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                    // Get parameter 2 off the stack.
+                    bool param2Valid;
+                    gameplay::ScriptUtil::LuaArray<Properties> param2 = gameplay::ScriptUtil::getObjectPointer<Properties>(3, "Properties", false, &param2Valid);
+                    if (!param2Valid)
+                        break;
+
+                    ImageControl* instance = getInstance(state);
+                    void* returnPtr = (void*)instance->createAnimation(param1, param2);
+                    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, "Animation");
+                        lua_setmetatable(state, -2);
+                    }
+                    else
+                    {
+                        lua_pushnil(state);
+                    }
+
+                    return 1;
+                }
+            } while (0);
+
+            lua_pushstring(state, "lua_ImageControl_createAnimation - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 7:
+        {
+            do
+            {
+                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                    (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                    lua_type(state, 3) == LUA_TNUMBER &&
+                    lua_type(state, 4) == LUA_TNUMBER &&
+                    (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
+                    (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
+                    (lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL))
+                {
+                    // Get parameter 1 off the stack.
+                    const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                    // Get parameter 2 off the stack.
+                    int param2 = (int)luaL_checkint(state, 3);
+
+                    // Get parameter 3 off the stack.
+                    unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
+
+                    // Get parameter 4 off the stack.
+                    gameplay::ScriptUtil::LuaArray<unsigned int> param4 = gameplay::ScriptUtil::getUnsignedIntPointer(5);
+
+                    // Get parameter 5 off the stack.
+                    gameplay::ScriptUtil::LuaArray<float> param5 = gameplay::ScriptUtil::getFloatPointer(6);
+
+                    // Get parameter 6 off the stack.
+                    Curve::InterpolationType param6 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 7));
+
+                    ImageControl* instance = getInstance(state);
+                    void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6);
+                    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, "Animation");
+                        lua_setmetatable(state, -2);
+                    }
+                    else
+                    {
+                        lua_pushnil(state);
+                    }
+
+                    return 1;
+                }
+            } while (0);
+
+            lua_pushstring(state, "lua_ImageControl_createAnimation - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 9:
+        {
+            do
+            {
+                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                    (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                    lua_type(state, 3) == LUA_TNUMBER &&
+                    lua_type(state, 4) == LUA_TNUMBER &&
+                    (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
+                    (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
+                    (lua_type(state, 7) == LUA_TTABLE || lua_type(state, 7) == LUA_TLIGHTUSERDATA) &&
+                    (lua_type(state, 8) == LUA_TTABLE || lua_type(state, 8) == LUA_TLIGHTUSERDATA) &&
+                    (lua_type(state, 9) == LUA_TSTRING || lua_type(state, 9) == LUA_TNIL))
+                {
+                    // Get parameter 1 off the stack.
+                    const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                    // Get parameter 2 off the stack.
+                    int param2 = (int)luaL_checkint(state, 3);
+
+                    // Get parameter 3 off the stack.
+                    unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
+
+                    // Get parameter 4 off the stack.
+                    gameplay::ScriptUtil::LuaArray<unsigned int> param4 = gameplay::ScriptUtil::getUnsignedIntPointer(5);
+
+                    // Get parameter 5 off the stack.
+                    gameplay::ScriptUtil::LuaArray<float> param5 = gameplay::ScriptUtil::getFloatPointer(6);
+
+                    // Get parameter 6 off the stack.
+                    gameplay::ScriptUtil::LuaArray<float> param6 = gameplay::ScriptUtil::getFloatPointer(7);
+
+                    // Get parameter 7 off the stack.
+                    gameplay::ScriptUtil::LuaArray<float> param7 = gameplay::ScriptUtil::getFloatPointer(8);
+
+                    // Get parameter 8 off the stack.
+                    Curve::InterpolationType param8 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 9));
+
+                    ImageControl* instance = getInstance(state);
+                    void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6, param7, param8);
+                    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, "Animation");
+                        lua_setmetatable(state, -2);
+                    }
+                    else
+                    {
+                        lua_pushnil(state);
+                    }
+
+                    return 1;
+                }
+            } while (0);
+
+            lua_pushstring(state, "lua_ImageControl_createAnimation - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3, 7 or 9).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_createAnimationFromBy(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 7:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER &&
+                (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
+                (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
+                (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
+                lua_type(state, 7) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                // Get parameter 2 off the stack.
+                int param2 = (int)luaL_checkint(state, 3);
+
+                // Get parameter 3 off the stack.
+                gameplay::ScriptUtil::LuaArray<float> param3 = gameplay::ScriptUtil::getFloatPointer(4);
+
+                // Get parameter 4 off the stack.
+                gameplay::ScriptUtil::LuaArray<float> param4 = gameplay::ScriptUtil::getFloatPointer(5);
+
+                // Get parameter 5 off the stack.
+                Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
+
+                // Get parameter 6 off the stack.
+                unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
+
+                ImageControl* instance = getInstance(state);
+                void* returnPtr = (void*)instance->createAnimationFromBy(param1, param2, param3, param4, param5, param6);
+                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, "Animation");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_createAnimationFromBy - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 7).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_createAnimationFromTo(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 7:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER &&
+                (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
+                (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
+                (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
+                lua_type(state, 7) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                // Get parameter 2 off the stack.
+                int param2 = (int)luaL_checkint(state, 3);
+
+                // Get parameter 3 off the stack.
+                gameplay::ScriptUtil::LuaArray<float> param3 = gameplay::ScriptUtil::getFloatPointer(4);
+
+                // Get parameter 4 off the stack.
+                gameplay::ScriptUtil::LuaArray<float> param4 = gameplay::ScriptUtil::getFloatPointer(5);
+
+                // Get parameter 5 off the stack.
+                Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
+
+                // Get parameter 6 off the stack.
+                unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
+
+                ImageControl* instance = getInstance(state);
+                void* returnPtr = (void*)instance->createAnimationFromTo(param1, param2, param3, param4, param5, param6);
+                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, "Animation");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_createAnimationFromTo - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 7).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_destroyAnimation(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);
+                instance->destroyAnimation();
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_destroyAnimation - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                ImageControl* instance = getInstance(state);
+                instance->destroyAnimation(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_destroyAnimation - 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 or 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_getAlignment(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);
+                Control::Alignment result = instance->getAlignment();
+
+                // Push the return value onto the stack.
+                lua_pushstring(state, lua_stringFromEnum_ControlAlignment(result));
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getAlignment - 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_getAnimation(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->getAnimation();
+                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, "Animation");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getAnimation - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                ImageControl* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getAnimation(param1);
+                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, "Animation");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getAnimation - 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 or 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_getAnimationPropertyComponentCount(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);
+
+                ImageControl* instance = getInstance(state);
+                unsigned int result = instance->getAnimationPropertyComponentCount(param1);
+
+                // Push the return value onto the stack.
+                lua_pushunsigned(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getAnimationPropertyComponentCount - 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_getAnimationPropertyValue(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                int param1 = (int)luaL_checkint(state, 2);
+
+                // Get parameter 2 off the stack.
+                bool param2Valid;
+                gameplay::ScriptUtil::LuaArray<AnimationValue> param2 = gameplay::ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false, &param2Valid);
+                if (!param2Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'.");
+                    lua_error(state);
+                }
+
+                ImageControl* instance = getInstance(state);
+                instance->getAnimationPropertyValue(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_getAutoHeight(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->getAutoHeight();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getAutoHeight - 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_getAutoWidth(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->getAutoWidth();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getAutoWidth - 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_getBorder(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->getBorder());
+                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, "ThemeSideRegions");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getBorder - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
+
+                ImageControl* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getBorder(param1));
+                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, "ThemeSideRegions");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getBorder - 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 or 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_getBounds(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->getBounds());
+                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, "Rectangle");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getBounds - 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_getClip(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->getClip());
+                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, "Rectangle");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getClip - 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_getClipBounds(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->getClipBounds());
+                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, "Rectangle");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getClipBounds - 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_getConsumeInputEvents(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->getConsumeInputEvents();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getConsumeInputEvents - 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_getCursorColor(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_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
+
+                ImageControl* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getCursorColor(param1));
+                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, "Vector4");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getCursorColor - 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_getCursorRegion(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_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
+
+                ImageControl* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getCursorRegion(param1));
+                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, "Rectangle");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getCursorRegion - 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_getCursorUVs(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_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
+
+                ImageControl* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getCursorUVs(param1));
+                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, "ThemeUVs");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getCursorUVs - 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_getFocusIndex(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);
+                int result = instance->getFocusIndex();
+
+                // Push the return value onto the stack.
+                lua_pushinteger(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getFocusIndex - 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_getFont(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->getFont();
+                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, "Font");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getFont - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
+
+                ImageControl* instance = getInstance(state);
+                void* returnPtr = (void*)instance->getFont(param1);
+                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, "Font");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getFont - 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 or 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_getFontSize(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);
+                unsigned int result = instance->getFontSize();
+
+                // Push the return value onto the stack.
+                lua_pushunsigned(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getFontSize - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
+
+                ImageControl* instance = getInstance(state);
+                unsigned int result = instance->getFontSize(param1);
+
+                // Push the return value onto the stack.
+                lua_pushunsigned(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getFontSize - 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 or 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_getHeight(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);
+                float result = instance->getHeight();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getHeight - 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_getId(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);
+                const char* result = instance->getId();
+
+                // Push the return value onto the stack.
+                lua_pushstring(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getId - 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_getImageColor(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                // Get parameter 2 off the stack.
+                Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
+
+                ImageControl* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getImageColor(param1, param2));
+                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, "Vector4");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getImageColor - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_getImageRegion(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                // Get parameter 2 off the stack.
+                Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
+
+                ImageControl* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getImageRegion(param1, param2));
+                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, "Rectangle");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getImageRegion - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_getImageUVs(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                // Get parameter 2 off the stack.
+                Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
+
+                ImageControl* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getImageUVs(param1, param2));
+                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, "ThemeUVs");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getImageUVs - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_getMargin(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->getMargin());
+                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, "ThemeSideRegions");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getMargin - 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_getOpacity(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);
+                float result = instance->getOpacity();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getOpacity - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
+
+                ImageControl* instance = getInstance(state);
+                float result = instance->getOpacity(param1);
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getOpacity - 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 or 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_getPadding(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->getPadding());
+                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, "ThemeSideRegions");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getPadding - 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_getRefCount(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);
+                unsigned int result = instance->getRefCount();
+
+                // Push the return value onto the stack.
+                lua_pushunsigned(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getRefCount - 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_getRegionDst(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->getRegionDst());
+                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, "Rectangle");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getRegionDst - 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_getRegionSrc(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->getRegionSrc());
+                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, "Rectangle");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getRegionSrc - 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_getSkinColor(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->getSkinColor());
+                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, "Vector4");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getSkinColor - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
+
+                ImageControl* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getSkinColor(param1));
+                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, "Vector4");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getSkinColor - 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 or 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_getSkinRegion(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->getSkinRegion());
+                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, "Rectangle");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getSkinRegion - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
+
+                ImageControl* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getSkinRegion(param1));
+                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, "Rectangle");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getSkinRegion - 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 or 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_getState(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);
+                Control::State result = instance->getState();
+
+                // Push the return value onto the stack.
+                lua_pushstring(state, lua_stringFromEnum_ControlState(result));
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getState - 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_getStyle(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->getStyle();
+                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, "ThemeStyle");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getStyle - 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_getTextAlignment(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);
+                Font::Justify result = instance->getTextAlignment();
+
+                // Push the return value onto the stack.
+                lua_pushstring(state, lua_stringFromEnum_FontJustify(result));
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getTextAlignment - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
+
+                ImageControl* instance = getInstance(state);
+                Font::Justify result = instance->getTextAlignment(param1);
+
+                // Push the return value onto the stack.
+                lua_pushstring(state, lua_stringFromEnum_FontJustify(result));
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getTextAlignment - 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 or 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_getTextColor(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->getTextColor());
+                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, "Vector4");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getTextColor - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
+
+                ImageControl* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getTextColor(param1));
+                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, "Vector4");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getTextColor - 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 or 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_getTextRightToLeft(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->getTextRightToLeft();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getTextRightToLeft - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
+
+                ImageControl* instance = getInstance(state);
+                bool result = instance->getTextRightToLeft(param1);
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getTextRightToLeft - 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 or 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_getType(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);
+                const char* result = instance->getType();
+
+                // Push the return value onto the stack.
+                lua_pushstring(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getType - 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_getWidth(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);
+                float result = instance->getWidth();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getWidth - 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_getX(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);
+                float result = instance->getX();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getX - 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_getY(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);
+                float result = instance->getY();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getY - 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_getZIndex(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);
+                int result = instance->getZIndex();
+
+                // Push the return value onto the stack.
+                lua_pushinteger(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_getZIndex - 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_isContainer(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->isContainer();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_isContainer - 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_isEnabled(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->isEnabled();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_isEnabled - 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_isVisible(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->isVisible();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_isVisible - 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_release(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);
+                instance->release();
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_release - 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_removeListener(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::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<Control::Listener>(2, "ControlListener", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Control::Listener'.");
+                    lua_error(state);
+                }
+
+                ImageControl* instance = getInstance(state);
+                instance->removeListener(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_removeListener - 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_removeScriptCallback(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                std::string param1 = gameplay::ScriptUtil::getString(2, true);
+
+                // Get parameter 2 off the stack.
+                std::string param2 = gameplay::ScriptUtil::getString(3, true);
+
+                ImageControl* instance = getInstance(state);
+                instance->removeScriptCallback(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_removeScriptCallback - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setAlignment(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_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                Control::Alignment param1 = (Control::Alignment)lua_enumFromString_ControlAlignment(luaL_checkstring(state, 2));
+
+                ImageControl* instance = getInstance(state);
+                instance->setAlignment(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setAlignment - 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_setAnimationPropertyValue(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                int param1 = (int)luaL_checkint(state, 2);
+
+                // Get parameter 2 off the stack.
+                bool param2Valid;
+                gameplay::ScriptUtil::LuaArray<AnimationValue> param2 = gameplay::ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false, &param2Valid);
+                if (!param2Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'.");
+                    lua_error(state);
+                }
+
+                ImageControl* instance = getInstance(state);
+                instance->setAnimationPropertyValue(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 4:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL) &&
+                lua_type(state, 4) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                int param1 = (int)luaL_checkint(state, 2);
+
+                // Get parameter 2 off the stack.
+                bool param2Valid;
+                gameplay::ScriptUtil::LuaArray<AnimationValue> param2 = gameplay::ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false, &param2Valid);
+                if (!param2Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 3 off the stack.
+                float param3 = (float)luaL_checknumber(state, 4);
+
+                ImageControl* instance = getInstance(state);
+                instance->setAnimationPropertyValue(param1, param2, param3);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setAutoHeight(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->setAutoHeight(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setAutoHeight - 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_setAutoWidth(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->setAutoWidth(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setAutoWidth - 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_setBorder(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 5:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER &&
+                lua_type(state, 3) == LUA_TNUMBER &&
+                lua_type(state, 4) == LUA_TNUMBER &&
+                lua_type(state, 5) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                // Get parameter 2 off the stack.
+                float param2 = (float)luaL_checknumber(state, 3);
+
+                // Get parameter 3 off the stack.
+                float param3 = (float)luaL_checknumber(state, 4);
+
+                // Get parameter 4 off the stack.
+                float param4 = (float)luaL_checknumber(state, 5);
+
+                ImageControl* instance = getInstance(state);
+                instance->setBorder(param1, param2, param3, param4);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setBorder - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 6:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER &&
+                lua_type(state, 3) == LUA_TNUMBER &&
+                lua_type(state, 4) == LUA_TNUMBER &&
+                lua_type(state, 5) == LUA_TNUMBER &&
+                lua_type(state, 6) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                // Get parameter 2 off the stack.
+                float param2 = (float)luaL_checknumber(state, 3);
+
+                // Get parameter 3 off the stack.
+                float param3 = (float)luaL_checknumber(state, 4);
+
+                // Get parameter 4 off the stack.
+                float param4 = (float)luaL_checknumber(state, 5);
+
+                // Get parameter 5 off the stack.
+                unsigned char param5 = (unsigned char)luaL_checkunsigned(state, 6);
+
+                ImageControl* instance = getInstance(state);
+                instance->setBorder(param1, param2, param3, param4, param5);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setBorder - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 5 or 6).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setBounds(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_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
+                    lua_error(state);
+                }
+
+                ImageControl* instance = getInstance(state);
+                instance->setBounds(*param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setBounds - 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.
+    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->setConsumeInputEvents(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setConsumeInputEvents - 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_setCursorColor(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
+
+                ImageControl* instance = getInstance(state);
+                instance->setCursorColor(*param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setCursorColor - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setCursorRegion(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
+
+                ImageControl* instance = getInstance(state);
+                instance->setCursorRegion(*param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setCursorRegion - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setEnabled(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->setEnabled(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setEnabled - 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_setFocusIndex(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);
+
+                ImageControl* instance = getInstance(state);
+                instance->setFocusIndex(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setFocusIndex - 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_setFont(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<Font> param1 = gameplay::ScriptUtil::getObjectPointer<Font>(2, "Font", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Font'.");
+                    lua_error(state);
+                }
+
+                ImageControl* instance = getInstance(state);
+                instance->setFont(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setFont - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 3:
+        {
+            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) &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Font> param1 = gameplay::ScriptUtil::getObjectPointer<Font>(2, "Font", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Font'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
+
+                ImageControl* instance = getInstance(state);
+                instance->setFont(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setFont - 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 or 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setFontSize(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);
+
+                ImageControl* instance = getInstance(state);
+                instance->setFontSize(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setFontSize - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
+
+                // Get parameter 2 off the stack.
+                unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
+
+                ImageControl* instance = getInstance(state);
+                instance->setFontSize(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setFontSize - 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 or 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setHeight(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.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                ImageControl* instance = getInstance(state);
+                instance->setHeight(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setHeight - 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_setImage(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_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                ImageControl* instance = getInstance(state);
+                instance->setImage(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setImage - 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_setImageColor(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                // Get parameter 2 off the stack.
+                bool param2Valid;
+                gameplay::ScriptUtil::LuaArray<Vector4> param2 = gameplay::ScriptUtil::getObjectPointer<Vector4>(3, "Vector4", true, &param2Valid);
+                if (!param2Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector4'.");
+                    lua_error(state);
+                }
+
+                ImageControl* instance = getInstance(state);
+                instance->setImageColor(param1, *param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setImageColor - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 4:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
+                lua_type(state, 4) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                // Get parameter 2 off the stack.
+                bool param2Valid;
+                gameplay::ScriptUtil::LuaArray<Vector4> param2 = gameplay::ScriptUtil::getObjectPointer<Vector4>(3, "Vector4", true, &param2Valid);
+                if (!param2Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector4'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 3 off the stack.
+                unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4);
+
+                ImageControl* instance = getInstance(state);
+                instance->setImageColor(param1, *param2, param3);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setImageColor - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setImageRegion(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                // Get parameter 2 off the stack.
+                bool param2Valid;
+                gameplay::ScriptUtil::LuaArray<Rectangle> param2 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true, &param2Valid);
+                if (!param2Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 2 to type 'Rectangle'.");
+                    lua_error(state);
+                }
+
+                ImageControl* instance = getInstance(state);
+                instance->setImageRegion(param1, *param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setImageRegion - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 4:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
+                lua_type(state, 4) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                // Get parameter 2 off the stack.
+                bool param2Valid;
+                gameplay::ScriptUtil::LuaArray<Rectangle> param2 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true, &param2Valid);
+                if (!param2Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 2 to type 'Rectangle'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 3 off the stack.
+                unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4);
+
+                ImageControl* instance = getInstance(state);
+                instance->setImageRegion(param1, *param2, param3);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setImageRegion - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setMargin(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 5:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER &&
+                lua_type(state, 3) == LUA_TNUMBER &&
+                lua_type(state, 4) == LUA_TNUMBER &&
+                lua_type(state, 5) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                // Get parameter 2 off the stack.
+                float param2 = (float)luaL_checknumber(state, 3);
+
+                // Get parameter 3 off the stack.
+                float param3 = (float)luaL_checknumber(state, 4);
+
+                // Get parameter 4 off the stack.
+                float param4 = (float)luaL_checknumber(state, 5);
+
+                ImageControl* instance = getInstance(state);
+                instance->setMargin(param1, param2, param3, param4);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setMargin - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 5).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setOpacity(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.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                ImageControl* instance = getInstance(state);
+                instance->setOpacity(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setOpacity - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                // Get parameter 2 off the stack.
+                unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
+
+                ImageControl* instance = getInstance(state);
+                instance->setOpacity(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setOpacity - 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 or 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setPadding(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 5:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER &&
+                lua_type(state, 3) == LUA_TNUMBER &&
+                lua_type(state, 4) == LUA_TNUMBER &&
+                lua_type(state, 5) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                // Get parameter 2 off the stack.
+                float param2 = (float)luaL_checknumber(state, 3);
+
+                // Get parameter 3 off the stack.
+                float param3 = (float)luaL_checknumber(state, 4);
+
+                // Get parameter 4 off the stack.
+                float param4 = (float)luaL_checknumber(state, 5);
+
+                ImageControl* instance = getInstance(state);
+                instance->setPadding(param1, param2, param3, param4);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setPadding - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 5).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setPosition(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                // Get parameter 2 off the stack.
+                float param2 = (float)luaL_checknumber(state, 3);
+
+                ImageControl* instance = getInstance(state);
+                instance->setPosition(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setPosition - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setRegionDst(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:
+        {
+            do
+            {
+                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
+                {
+                    // Get parameter 1 off the stack.
+                    bool param1Valid;
+                    gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
+                    if (!param1Valid)
+                        break;
+
+                    ImageControl* instance = getInstance(state);
+                    instance->setRegionDst(*param1);
+                    
+                    return 0;
+                }
+            } while (0);
+
+            lua_pushstring(state, "lua_ImageControl_setRegionDst - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 5:
+        {
+            do
+            {
+                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                    lua_type(state, 2) == LUA_TNUMBER &&
+                    lua_type(state, 3) == LUA_TNUMBER &&
+                    lua_type(state, 4) == LUA_TNUMBER &&
+                    lua_type(state, 5) == LUA_TNUMBER)
+                {
+                    // Get parameter 1 off the stack.
+                    float param1 = (float)luaL_checknumber(state, 2);
+
+                    // Get parameter 2 off the stack.
+                    float param2 = (float)luaL_checknumber(state, 3);
+
+                    // Get parameter 3 off the stack.
+                    float param3 = (float)luaL_checknumber(state, 4);
+
+                    // Get parameter 4 off the stack.
+                    float param4 = (float)luaL_checknumber(state, 5);
+
+                    ImageControl* instance = getInstance(state);
+                    instance->setRegionDst(param1, param2, param3, param4);
+                    
+                    return 0;
+                }
+            } while (0);
+
+            lua_pushstring(state, "lua_ImageControl_setRegionDst - 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 or 5).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setRegionSrc(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:
+        {
+            do
+            {
+                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
+                {
+                    // Get parameter 1 off the stack.
+                    bool param1Valid;
+                    gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
+                    if (!param1Valid)
+                        break;
+
+                    ImageControl* instance = getInstance(state);
+                    instance->setRegionSrc(*param1);
+                    
+                    return 0;
+                }
+            } while (0);
+
+            lua_pushstring(state, "lua_ImageControl_setRegionSrc - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 5:
+        {
+            do
+            {
+                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                    lua_type(state, 2) == LUA_TNUMBER &&
+                    lua_type(state, 3) == LUA_TNUMBER &&
+                    lua_type(state, 4) == LUA_TNUMBER &&
+                    lua_type(state, 5) == LUA_TNUMBER)
+                {
+                    // Get parameter 1 off the stack.
+                    float param1 = (float)luaL_checknumber(state, 2);
+
+                    // Get parameter 2 off the stack.
+                    float param2 = (float)luaL_checknumber(state, 3);
+
+                    // Get parameter 3 off the stack.
+                    float param3 = (float)luaL_checknumber(state, 4);
+
+                    // Get parameter 4 off the stack.
+                    float param4 = (float)luaL_checknumber(state, 5);
+
+                    ImageControl* instance = getInstance(state);
+                    instance->setRegionSrc(param1, param2, param3, param4);
+                    
+                    return 0;
+                }
+            } while (0);
+
+            lua_pushstring(state, "lua_ImageControl_setRegionSrc - 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 or 5).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setSize(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 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                // Get parameter 2 off the stack.
+                float param2 = (float)luaL_checknumber(state, 3);
+
+                ImageControl* instance = getInstance(state);
+                instance->setSize(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setSize - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setSkinColor(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_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
+                    lua_error(state);
+                }
+
+                ImageControl* instance = getInstance(state);
+                instance->setSkinColor(*param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setSkinColor - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
+
+                ImageControl* instance = getInstance(state);
+                instance->setSkinColor(*param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setSkinColor - 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 or 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setSkinRegion(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_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
+                    lua_error(state);
+                }
+
+                ImageControl* instance = getInstance(state);
+                instance->setSkinRegion(*param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setSkinRegion - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Rectangle> param1 = gameplay::ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
+
+                ImageControl* instance = getInstance(state);
+                instance->setSkinRegion(*param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setSkinRegion - 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 or 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setState(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_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
+
+                ImageControl* instance = getInstance(state);
+                instance->setState(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setState - 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_setStyle(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<Theme::Style> param1 = gameplay::ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Theme::Style'.");
+                    lua_error(state);
+                }
+
+                ImageControl* instance = getInstance(state);
+                instance->setStyle(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setStyle - 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_setTextAlignment(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_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2));
+
+                ImageControl* instance = getInstance(state);
+                instance->setTextAlignment(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setTextAlignment - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2));
+
+                // Get parameter 2 off the stack.
+                unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
+
+                ImageControl* instance = getInstance(state);
+                instance->setTextAlignment(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setTextAlignment - 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 or 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setTextColor(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_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
+                    lua_error(state);
+                }
+
+                ImageControl* instance = getInstance(state);
+                instance->setTextColor(*param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setTextColor - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector4> param1 = gameplay::ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
+
+                ImageControl* instance = getInstance(state);
+                instance->setTextColor(*param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setTextColor - 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 or 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setTextRightToLeft(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->setTextRightToLeft(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setTextRightToLeft - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN &&
+                lua_type(state, 3) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
+
+                // Get parameter 2 off the stack.
+                unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
+
+                ImageControl* instance = getInstance(state);
+                instance->setTextRightToLeft(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setTextRightToLeft - 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 or 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+int lua_ImageControl_setVisible(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->setVisible(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setVisible - 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_setWidth(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.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                ImageControl* instance = getInstance(state);
+                instance->setWidth(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setWidth - 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_setZIndex(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);
+
+                ImageControl* instance = getInstance(state);
+                instance->setZIndex(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_setZIndex - 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_static_ANIMATE_OPACITY(lua_State* state)
+{
+    // Validate the number of parameters.
+    if (lua_gettop(state) > 0)
+    {
+        lua_pushstring(state, "Invalid number of parameters (expected 0).");
+        lua_error(state);
+    }
+
+    int result = ImageControl::ANIMATE_OPACITY;
+
+    // Push the return value onto the stack.
+    lua_pushinteger(state, result);
+
+    return 1;
+}
+
+int lua_ImageControl_static_ANIMATE_POSITION(lua_State* state)
+{
+    // Validate the number of parameters.
+    if (lua_gettop(state) > 0)
+    {
+        lua_pushstring(state, "Invalid number of parameters (expected 0).");
+        lua_error(state);
+    }
+
+    int result = ImageControl::ANIMATE_POSITION;
+
+    // Push the return value onto the stack.
+    lua_pushinteger(state, result);
+
+    return 1;
+}
+
+int lua_ImageControl_static_ANIMATE_POSITION_X(lua_State* state)
+{
+    // Validate the number of parameters.
+    if (lua_gettop(state) > 0)
+    {
+        lua_pushstring(state, "Invalid number of parameters (expected 0).");
+        lua_error(state);
+    }
+
+    int result = ImageControl::ANIMATE_POSITION_X;
+
+    // Push the return value onto the stack.
+    lua_pushinteger(state, result);
+
+    return 1;
+}
+
+int lua_ImageControl_static_ANIMATE_POSITION_Y(lua_State* state)
+{
+    // Validate the number of parameters.
+    if (lua_gettop(state) > 0)
+    {
+        lua_pushstring(state, "Invalid number of parameters (expected 0).");
+        lua_error(state);
+    }
+
+    int result = ImageControl::ANIMATE_POSITION_Y;
+
+    // Push the return value onto the stack.
+    lua_pushinteger(state, result);
+
+    return 1;
+}
+
+int lua_ImageControl_static_ANIMATE_SIZE(lua_State* state)
+{
+    // Validate the number of parameters.
+    if (lua_gettop(state) > 0)
+    {
+        lua_pushstring(state, "Invalid number of parameters (expected 0).");
+        lua_error(state);
+    }
+
+    int result = ImageControl::ANIMATE_SIZE;
+
+    // Push the return value onto the stack.
+    lua_pushinteger(state, result);
+
+    return 1;
+}
+
+int lua_ImageControl_static_ANIMATE_SIZE_HEIGHT(lua_State* state)
+{
+    // Validate the number of parameters.
+    if (lua_gettop(state) > 0)
+    {
+        lua_pushstring(state, "Invalid number of parameters (expected 0).");
+        lua_error(state);
+    }
+
+    int result = ImageControl::ANIMATE_SIZE_HEIGHT;
+
+    // Push the return value onto the stack.
+    lua_pushinteger(state, result);
+
+    return 1;
+}
+
+int lua_ImageControl_static_ANIMATE_SIZE_WIDTH(lua_State* state)
+{
+    // Validate the number of parameters.
+    if (lua_gettop(state) > 0)
+    {
+        lua_pushstring(state, "Invalid number of parameters (expected 0).");
+        lua_error(state);
+    }
+
+    int result = ImageControl::ANIMATE_SIZE_WIDTH;
+
+    // Push the return value onto the stack.
+    lua_pushinteger(state, result);
+
+    return 1;
+}
+
+int lua_ImageControl_static_create(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_TSTRING || lua_type(state, 1) == LUA_TNIL) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(1, false);
+
+                // Get parameter 2 off the stack.
+                bool param2Valid;
+                gameplay::ScriptUtil::LuaArray<Theme::Style> param2 = gameplay::ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false, &param2Valid);
+                if (!param2Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 2 to type 'Theme::Style'.");
+                    lua_error(state);
+                }
+
+                void* returnPtr = (void*)ImageControl::create(param1, param2);
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = true;
+                    luaL_getmetatable(state, "ImageControl");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_ImageControl_static_create - 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;
+}
+
+}

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

@@ -0,0 +1,109 @@
+#ifndef LUA_IMAGECONTROL_H_
+#define LUA_IMAGECONTROL_H_
+
+namespace gameplay
+{
+
+// Lua bindings for ImageControl.
+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_createAnimation(lua_State* state);
+int lua_ImageControl_createAnimationFromBy(lua_State* state);
+int lua_ImageControl_createAnimationFromTo(lua_State* state);
+int lua_ImageControl_destroyAnimation(lua_State* state);
+int lua_ImageControl_getAlignment(lua_State* state);
+int lua_ImageControl_getAnimation(lua_State* state);
+int lua_ImageControl_getAnimationPropertyComponentCount(lua_State* state);
+int lua_ImageControl_getAnimationPropertyValue(lua_State* state);
+int lua_ImageControl_getAutoHeight(lua_State* state);
+int lua_ImageControl_getAutoWidth(lua_State* state);
+int lua_ImageControl_getBorder(lua_State* state);
+int lua_ImageControl_getBounds(lua_State* state);
+int lua_ImageControl_getClip(lua_State* state);
+int lua_ImageControl_getClipBounds(lua_State* state);
+int lua_ImageControl_getConsumeInputEvents(lua_State* state);
+int lua_ImageControl_getCursorColor(lua_State* state);
+int lua_ImageControl_getCursorRegion(lua_State* state);
+int lua_ImageControl_getCursorUVs(lua_State* state);
+int lua_ImageControl_getFocusIndex(lua_State* state);
+int lua_ImageControl_getFont(lua_State* state);
+int lua_ImageControl_getFontSize(lua_State* state);
+int lua_ImageControl_getHeight(lua_State* state);
+int lua_ImageControl_getId(lua_State* state);
+int lua_ImageControl_getImageColor(lua_State* state);
+int lua_ImageControl_getImageRegion(lua_State* state);
+int lua_ImageControl_getImageUVs(lua_State* state);
+int lua_ImageControl_getMargin(lua_State* state);
+int lua_ImageControl_getOpacity(lua_State* state);
+int lua_ImageControl_getPadding(lua_State* state);
+int lua_ImageControl_getRefCount(lua_State* state);
+int lua_ImageControl_getRegionDst(lua_State* state);
+int lua_ImageControl_getRegionSrc(lua_State* state);
+int lua_ImageControl_getSkinColor(lua_State* state);
+int lua_ImageControl_getSkinRegion(lua_State* state);
+int lua_ImageControl_getState(lua_State* state);
+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_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_isContainer(lua_State* state);
+int lua_ImageControl_isEnabled(lua_State* state);
+int lua_ImageControl_isVisible(lua_State* state);
+int lua_ImageControl_release(lua_State* state);
+int lua_ImageControl_removeListener(lua_State* state);
+int lua_ImageControl_removeScriptCallback(lua_State* state);
+int lua_ImageControl_setAlignment(lua_State* state);
+int lua_ImageControl_setAnimationPropertyValue(lua_State* state);
+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_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_setFocusIndex(lua_State* state);
+int lua_ImageControl_setFont(lua_State* state);
+int lua_ImageControl_setFontSize(lua_State* state);
+int lua_ImageControl_setHeight(lua_State* state);
+int lua_ImageControl_setImage(lua_State* state);
+int lua_ImageControl_setImageColor(lua_State* state);
+int lua_ImageControl_setImageRegion(lua_State* state);
+int lua_ImageControl_setMargin(lua_State* state);
+int lua_ImageControl_setOpacity(lua_State* state);
+int lua_ImageControl_setPadding(lua_State* state);
+int lua_ImageControl_setPosition(lua_State* state);
+int lua_ImageControl_setRegionDst(lua_State* state);
+int lua_ImageControl_setRegionSrc(lua_State* state);
+int lua_ImageControl_setSize(lua_State* state);
+int lua_ImageControl_setSkinColor(lua_State* state);
+int lua_ImageControl_setSkinRegion(lua_State* state);
+int lua_ImageControl_setState(lua_State* state);
+int lua_ImageControl_setStyle(lua_State* state);
+int lua_ImageControl_setTextAlignment(lua_State* state);
+int lua_ImageControl_setTextColor(lua_State* state);
+int lua_ImageControl_setTextRightToLeft(lua_State* state);
+int lua_ImageControl_setVisible(lua_State* state);
+int lua_ImageControl_setWidth(lua_State* state);
+int lua_ImageControl_setZIndex(lua_State* state);
+int lua_ImageControl_static_ANIMATE_OPACITY(lua_State* state);
+int lua_ImageControl_static_ANIMATE_POSITION(lua_State* state);
+int lua_ImageControl_static_ANIMATE_POSITION_X(lua_State* state);
+int lua_ImageControl_static_ANIMATE_POSITION_Y(lua_State* state);
+int lua_ImageControl_static_ANIMATE_SIZE(lua_State* state);
+int lua_ImageControl_static_ANIMATE_SIZE_HEIGHT(lua_State* state);
+int lua_ImageControl_static_ANIMATE_SIZE_WIDTH(lua_State* state);
+int lua_ImageControl_static_create(lua_State* state);
+
+void luaRegister_ImageControl();
+
+}
+
+#endif

+ 53 - 0
gameplay/src/lua/lua_Light.cpp

@@ -35,6 +35,7 @@ void luaRegister_Light()
     };
     const luaL_Reg lua_statics[] = 
     {
+        {"create", lua_Light_static_create},
         {"createDirectional", lua_Light_static_createDirectional},
         {"createPoint", lua_Light_static_createPoint},
         {"createSpot", lua_Light_static_createSpot},
@@ -701,6 +702,58 @@ int lua_Light_setRange(lua_State* state)
     return 0;
 }
 
+int lua_Light_static_create(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 || lua_type(state, 1) == LUA_TTABLE || lua_type(state, 1) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Properties> param1 = gameplay::ScriptUtil::getObjectPointer<Properties>(1, "Properties", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Properties'.");
+                    lua_error(state);
+                }
+
+                void* returnPtr = (void*)Light::create(param1);
+                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, "Light");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Light_static_create - 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_Light_static_createDirectional(lua_State* state)
 {
     // Get the number of parameters.

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

@@ -22,6 +22,7 @@ int lua_Light_setColor(lua_State* state);
 int lua_Light_setInnerAngle(lua_State* state);
 int lua_Light_setOuterAngle(lua_State* state);
 int lua_Light_setRange(lua_State* state);
+int lua_Light_static_create(lua_State* state);
 int lua_Light_static_createDirectional(lua_State* state);
 int lua_Light_static_createPoint(lua_State* state);
 int lua_Light_static_createSpot(lua_State* state);

+ 37 - 0
gameplay/src/lua/lua_Material.cpp

@@ -25,6 +25,7 @@ void luaRegister_Material()
     const luaL_Reg lua_members[] = 
     {
         {"addRef", lua_Material_addRef},
+        {"clearParameter", lua_Material_clearParameter},
         {"getParameter", lua_Material_getParameter},
         {"getRefCount", lua_Material_getRefCount},
         {"getStateBlock", lua_Material_getStateBlock},
@@ -124,6 +125,42 @@ int lua_Material_addRef(lua_State* state)
     return 0;
 }
 
+int lua_Material_clearParameter(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_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                Material* instance = getInstance(state);
+                instance->clearParameter(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Material_clearParameter - 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_Material_getParameter(lua_State* state)
 {
     // Get the number of parameters.

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

@@ -7,6 +7,7 @@ namespace gameplay
 // Lua bindings for Material.
 int lua_Material__gc(lua_State* state);
 int lua_Material_addRef(lua_State* state);
+int lua_Material_clearParameter(lua_State* state);
 int lua_Material_getParameter(lua_State* state);
 int lua_Material_getRefCount(lua_State* state);
 int lua_Material_getStateBlock(lua_State* state);

+ 37 - 0
gameplay/src/lua/lua_Pass.cpp

@@ -23,6 +23,7 @@ void luaRegister_Pass()
     {
         {"addRef", lua_Pass_addRef},
         {"bind", lua_Pass_bind},
+        {"clearParameter", lua_Pass_clearParameter},
         {"getEffect", lua_Pass_getEffect},
         {"getId", lua_Pass_getId},
         {"getParameter", lua_Pass_getParameter},
@@ -151,6 +152,42 @@ int lua_Pass_bind(lua_State* state)
     return 0;
 }
 
+int lua_Pass_clearParameter(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_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                Pass* instance = getInstance(state);
+                instance->clearParameter(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Pass_clearParameter - 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_Pass_getEffect(lua_State* state)
 {
     // Get the number of parameters.

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

@@ -8,6 +8,7 @@ namespace gameplay
 int lua_Pass__gc(lua_State* state);
 int lua_Pass_addRef(lua_State* state);
 int lua_Pass_bind(lua_State* state);
+int lua_Pass_clearParameter(lua_State* state);
 int lua_Pass_getEffect(lua_State* state);
 int lua_Pass_getId(lua_State* state);
 int lua_Pass_getParameter(lua_State* state);

+ 4 - 0
gameplay/src/lua/lua_Platform.cpp

@@ -1,7 +1,11 @@
 #include "Base.h"
 #include "ScriptController.h"
 #include "lua_Platform.h"
+#include "Base.h"
+#include "Form.h"
+#include "Game.h"
 #include "Platform.h"
+#include "ScriptController.h"
 
 namespace gameplay
 {

+ 37 - 0
gameplay/src/lua/lua_RenderState.cpp

@@ -21,6 +21,7 @@ void luaRegister_RenderState()
     const luaL_Reg lua_members[] = 
     {
         {"addRef", lua_RenderState_addRef},
+        {"clearParameter", lua_RenderState_clearParameter},
         {"getParameter", lua_RenderState_getParameter},
         {"getRefCount", lua_RenderState_getRefCount},
         {"getStateBlock", lua_RenderState_getStateBlock},
@@ -112,6 +113,42 @@ int lua_RenderState_addRef(lua_State* state)
     return 0;
 }
 
+int lua_RenderState_clearParameter(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_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                RenderState* instance = getInstance(state);
+                instance->clearParameter(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_RenderState_clearParameter - 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_RenderState_getParameter(lua_State* state)
 {
     // Get the number of parameters.

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

@@ -7,6 +7,7 @@ namespace gameplay
 // Lua bindings for RenderState.
 int lua_RenderState__gc(lua_State* state);
 int lua_RenderState_addRef(lua_State* state);
+int lua_RenderState_clearParameter(lua_State* state);
 int lua_RenderState_getParameter(lua_State* state);
 int lua_RenderState_getRefCount(lua_State* state);
 int lua_RenderState_getStateBlock(lua_State* state);

+ 1 - 0
gameplay/src/lua/lua_Scene.cpp

@@ -3,6 +3,7 @@
 #include "lua_Scene.h"
 #include "AudioListener.h"
 #include "Base.h"
+#include "Bundle.h"
 #include "Game.h"
 #include "Joint.h"
 #include "MeshSkin.h"

+ 1 - 0
gameplay/src/lua/lua_SpriteBatch.cpp

@@ -3,6 +3,7 @@
 #include "lua_SpriteBatch.h"
 #include "Base.h"
 #include "Game.h"
+#include "Material.h"
 #include "SpriteBatch.h"
 
 namespace gameplay

+ 37 - 0
gameplay/src/lua/lua_Technique.cpp

@@ -22,6 +22,7 @@ void luaRegister_Technique()
     const luaL_Reg lua_members[] = 
     {
         {"addRef", lua_Technique_addRef},
+        {"clearParameter", lua_Technique_clearParameter},
         {"getId", lua_Technique_getId},
         {"getParameter", lua_Technique_getParameter},
         {"getPass", lua_Technique_getPass},
@@ -117,6 +118,42 @@ int lua_Technique_addRef(lua_State* state)
     return 0;
 }
 
+int lua_Technique_clearParameter(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_TSTRING || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                const char* param1 = gameplay::ScriptUtil::getString(2, false);
+
+                Technique* instance = getInstance(state);
+                instance->clearParameter(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Technique_clearParameter - 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_Technique_getId(lua_State* state)
 {
     // Get the number of parameters.

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

@@ -7,6 +7,7 @@ namespace gameplay
 // Lua bindings for Technique.
 int lua_Technique__gc(lua_State* state);
 int lua_Technique_addRef(lua_State* state);
+int lua_Technique_clearParameter(lua_State* state);
 int lua_Technique_getId(lua_State* state);
 int lua_Technique_getParameter(lua_State* state);
 int lua_Technique_getPass(lua_State* state);

+ 311 - 0
gameplay/src/lua/lua_Terrain.cpp

@@ -23,18 +23,25 @@ void luaRegister_Terrain()
 {
     const luaL_Reg lua_members[] = 
     {
+        {"addListener", lua_Terrain_addListener},
         {"addRef", lua_Terrain_addRef},
         {"draw", lua_Terrain_draw},
         {"getBoundingBox", lua_Terrain_getBoundingBox},
         {"getHeight", lua_Terrain_getHeight},
+        {"getInverseWorldMatrix", lua_Terrain_getInverseWorldMatrix},
         {"getNode", lua_Terrain_getNode},
+        {"getNormalMatrix", lua_Terrain_getNormalMatrix},
         {"getPatchCount", lua_Terrain_getPatchCount},
         {"getRefCount", lua_Terrain_getRefCount},
         {"getTriangleCount", lua_Terrain_getTriangleCount},
         {"getVisiblePatchCount", lua_Terrain_getVisiblePatchCount},
         {"getVisibleTriangleCount", lua_Terrain_getVisibleTriangleCount},
+        {"getWorldMatrix", lua_Terrain_getWorldMatrix},
+        {"getWorldViewMatrix", lua_Terrain_getWorldViewMatrix},
+        {"getWorldViewProjectionMatrix", lua_Terrain_getWorldViewProjectionMatrix},
         {"isFlagSet", lua_Terrain_isFlagSet},
         {"release", lua_Terrain_release},
+        {"removeListener", lua_Terrain_removeListener},
         {"setFlag", lua_Terrain_setFlag},
         {"transformChanged", lua_Terrain_transformChanged},
         {NULL, NULL}
@@ -94,6 +101,48 @@ int lua_Terrain__gc(lua_State* state)
     return 0;
 }
 
+int lua_Terrain_addListener(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<Terrain::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<Terrain::Listener>(2, "TerrainListener", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Terrain::Listener'.");
+                    lua_error(state);
+                }
+
+                Terrain* instance = getInstance(state);
+                instance->addListener(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Terrain_addListener - 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_Terrain_addRef(lua_State* state)
 {
     // Get the number of parameters.
@@ -263,6 +312,50 @@ int lua_Terrain_getHeight(lua_State* state)
     return 0;
 }
 
+int lua_Terrain_getInverseWorldMatrix(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))
+            {
+                Terrain* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getInverseWorldMatrix());
+                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, "Matrix");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Terrain_getInverseWorldMatrix - 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_Terrain_getNode(lua_State* state)
 {
     // Get the number of parameters.
@@ -307,6 +400,50 @@ int lua_Terrain_getNode(lua_State* state)
     return 0;
 }
 
+int lua_Terrain_getNormalMatrix(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))
+            {
+                Terrain* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getNormalMatrix());
+                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, "Matrix");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Terrain_getNormalMatrix - 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_Terrain_getPatchCount(lua_State* state)
 {
     // Get the number of parameters.
@@ -482,6 +619,138 @@ int lua_Terrain_getVisibleTriangleCount(lua_State* state)
     return 0;
 }
 
+int lua_Terrain_getWorldMatrix(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))
+            {
+                Terrain* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getWorldMatrix());
+                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, "Matrix");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Terrain_getWorldMatrix - 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_Terrain_getWorldViewMatrix(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))
+            {
+                Terrain* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getWorldViewMatrix());
+                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, "Matrix");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Terrain_getWorldViewMatrix - 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_Terrain_getWorldViewProjectionMatrix(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))
+            {
+                Terrain* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getWorldViewProjectionMatrix());
+                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, "Matrix");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Terrain_getWorldViewProjectionMatrix - 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_Terrain_isFlagSet(lua_State* state)
 {
     // Get the number of parameters.
@@ -553,6 +822,48 @@ int lua_Terrain_release(lua_State* state)
     return 0;
 }
 
+int lua_Terrain_removeListener(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<Terrain::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<Terrain::Listener>(2, "TerrainListener", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Terrain::Listener'.");
+                    lua_error(state);
+                }
+
+                Terrain* instance = getInstance(state);
+                instance->removeListener(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Terrain_removeListener - 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_Terrain_setFlag(lua_State* state)
 {
     // Get the number of parameters.

+ 36 - 29
gameplay/src/lua/lua_Terrain.h

@@ -1,29 +1,36 @@
-#ifndef LUA_TERRAIN_H_
-#define LUA_TERRAIN_H_
-
-namespace gameplay
-{
-
-// Lua bindings for Terrain.
-int lua_Terrain__gc(lua_State* state);
-int lua_Terrain_addRef(lua_State* state);
-int lua_Terrain_draw(lua_State* state);
-int lua_Terrain_getBoundingBox(lua_State* state);
-int lua_Terrain_getHeight(lua_State* state);
-int lua_Terrain_getNode(lua_State* state);
-int lua_Terrain_getPatchCount(lua_State* state);
-int lua_Terrain_getRefCount(lua_State* state);
-int lua_Terrain_getTriangleCount(lua_State* state);
-int lua_Terrain_getVisiblePatchCount(lua_State* state);
-int lua_Terrain_getVisibleTriangleCount(lua_State* state);
-int lua_Terrain_isFlagSet(lua_State* state);
-int lua_Terrain_release(lua_State* state);
-int lua_Terrain_setFlag(lua_State* state);
-int lua_Terrain_static_create(lua_State* state);
-int lua_Terrain_transformChanged(lua_State* state);
-
-void luaRegister_Terrain();
-
-}
-
-#endif
+#ifndef LUA_TERRAIN_H_
+#define LUA_TERRAIN_H_
+
+namespace gameplay
+{
+
+// Lua bindings for Terrain.
+int lua_Terrain__gc(lua_State* state);
+int lua_Terrain_addListener(lua_State* state);
+int lua_Terrain_addRef(lua_State* state);
+int lua_Terrain_draw(lua_State* state);
+int lua_Terrain_getBoundingBox(lua_State* state);
+int lua_Terrain_getHeight(lua_State* state);
+int lua_Terrain_getInverseWorldMatrix(lua_State* state);
+int lua_Terrain_getNode(lua_State* state);
+int lua_Terrain_getNormalMatrix(lua_State* state);
+int lua_Terrain_getPatchCount(lua_State* state);
+int lua_Terrain_getRefCount(lua_State* state);
+int lua_Terrain_getTriangleCount(lua_State* state);
+int lua_Terrain_getVisiblePatchCount(lua_State* state);
+int lua_Terrain_getVisibleTriangleCount(lua_State* state);
+int lua_Terrain_getWorldMatrix(lua_State* state);
+int lua_Terrain_getWorldViewMatrix(lua_State* state);
+int lua_Terrain_getWorldViewProjectionMatrix(lua_State* state);
+int lua_Terrain_isFlagSet(lua_State* state);
+int lua_Terrain_release(lua_State* state);
+int lua_Terrain_removeListener(lua_State* state);
+int lua_Terrain_setFlag(lua_State* state);
+int lua_Terrain_static_create(lua_State* state);
+int lua_Terrain_transformChanged(lua_State* state);
+
+void luaRegister_Terrain();
+
+}
+
+#endif

+ 133 - 0
gameplay/src/lua/lua_TerrainListener.cpp

@@ -0,0 +1,133 @@
+#include "Base.h"
+#include "ScriptController.h"
+#include "lua_TerrainListener.h"
+#include "Animation.h"
+#include "AnimationTarget.h"
+#include "Base.h"
+#include "FileSystem.h"
+#include "Game.h"
+#include "Node.h"
+#include "Ref.h"
+#include "ScriptController.h"
+#include "ScriptTarget.h"
+#include "Terrain.h"
+#include "TerrainPatch.h"
+#include "Transform.h"
+#include "lua_CurveInterpolationType.h"
+#include "lua_TerrainFlags.h"
+
+namespace gameplay
+{
+
+void luaRegister_TerrainListener()
+{
+    const luaL_Reg lua_members[] = 
+    {
+        {"materialUpdated", lua_TerrainListener_materialUpdated},
+        {NULL, NULL}
+    };
+    const luaL_Reg* lua_statics = NULL;
+    std::vector<std::string> scopePath;
+    scopePath.push_back("Terrain");
+
+    gameplay::ScriptUtil::registerClass("TerrainListener", lua_members, NULL, lua_TerrainListener__gc, lua_statics, scopePath);
+}
+
+static Terrain::Listener* getInstance(lua_State* state)
+{
+    void* userdata = luaL_checkudata(state, 1, "TerrainListener");
+    luaL_argcheck(state, userdata != NULL, 1, "'TerrainListener' expected.");
+    return (Terrain::Listener*)((gameplay::ScriptUtil::LuaObject*)userdata)->instance;
+}
+
+int lua_TerrainListener__gc(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))
+            {
+                void* userdata = luaL_checkudata(state, 1, "TerrainListener");
+                luaL_argcheck(state, userdata != NULL, 1, "'TerrainListener' expected.");
+                gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)userdata;
+                if (object->owns)
+                {
+                    Terrain::Listener* instance = (Terrain::Listener*)object->instance;
+                    SAFE_DELETE(instance);
+                }
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_TerrainListener__gc - 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_TerrainListener_materialUpdated(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 3:
+        {
+            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) &&
+                (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Terrain> param1 = gameplay::ScriptUtil::getObjectPointer<Terrain>(2, "Terrain", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Terrain'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                bool param2Valid;
+                gameplay::ScriptUtil::LuaArray<Material> param2 = gameplay::ScriptUtil::getObjectPointer<Material>(3, "Material", false, &param2Valid);
+                if (!param2Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 2 to type 'Material'.");
+                    lua_error(state);
+                }
+
+                Terrain::Listener* instance = getInstance(state);
+                instance->materialUpdated(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_TerrainListener_materialUpdated - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
+}

+ 15 - 0
gameplay/src/lua/lua_TerrainListener.h

@@ -0,0 +1,15 @@
+#ifndef LUA_TERRAINLISTENER_H_
+#define LUA_TERRAINLISTENER_H_
+
+namespace gameplay
+{
+
+// Lua bindings for Terrain::Listener.
+int lua_TerrainListener__gc(lua_State* state);
+int lua_TerrainListener_materialUpdated(lua_State* state);
+
+void luaRegister_TerrainListener();
+
+}
+
+#endif

+ 38 - 0
gameplay/src/lua/lua_ThemeUVs.cpp

@@ -23,6 +23,7 @@ void luaRegister_ThemeUVs()
     const luaL_Reg lua_statics[] = 
     {
         {"empty", lua_ThemeUVs_static_empty},
+        {"full", lua_ThemeUVs_static_full},
         {NULL, NULL}
     };
     std::vector<std::string> scopePath;
@@ -193,6 +194,43 @@ int lua_ThemeUVs_static_empty(lua_State* state)
     return 0;
 }
 
+int lua_ThemeUVs_static_full(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*)&(Theme::UVs::full());
+            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, "ThemeUVs");
+                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_ThemeUVs_u1(lua_State* state)
 {
     // Validate the number of parameters.

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

@@ -8,6 +8,7 @@ namespace gameplay
 int lua_ThemeUVs__gc(lua_State* state);
 int lua_ThemeUVs__init(lua_State* state);
 int lua_ThemeUVs_static_empty(lua_State* state);
+int lua_ThemeUVs_static_full(lua_State* state);
 int lua_ThemeUVs_u1(lua_State* state);
 int lua_ThemeUVs_u2(lua_State* state);
 int lua_ThemeUVs_v1(lua_State* state);

+ 2 - 0
gameplay/src/lua/lua_all_bindings.cpp

@@ -48,6 +48,7 @@ void lua_RegisterAllBindings()
     luaRegister_Gesture();
     luaRegister_HeightField();
     luaRegister_Image();
+    luaRegister_ImageControl();
     luaRegister_Joint();
     luaRegister_Joystick();
     luaRegister_Keyboard();
@@ -109,6 +110,7 @@ void lua_RegisterAllBindings()
     luaRegister_SpriteBatch();
     luaRegister_Technique();
     luaRegister_Terrain();
+    luaRegister_TerrainListener();
     luaRegister_TextBox();
     luaRegister_Texture();
     luaRegister_TextureSampler();

+ 2 - 0
gameplay/src/lua/lua_all_bindings.h

@@ -43,6 +43,7 @@
 #include "lua_Gesture.h"
 #include "lua_HeightField.h"
 #include "lua_Image.h"
+#include "lua_ImageControl.h"
 #include "lua_Joint.h"
 #include "lua_Joystick.h"
 #include "lua_Keyboard.h"
@@ -104,6 +105,7 @@
 #include "lua_SpriteBatch.h"
 #include "lua_Technique.h"
 #include "lua_Terrain.h"
+#include "lua_TerrainListener.h"
 #include "lua_TextBox.h"
 #include "lua_Texture.h"
 #include "lua_TextureSampler.h"