Added Actor:GetDestX/Y/Z to Lua API.

This commit is contained in:
Kyzentun
2014-07-04 02:03:05 -06:00
parent 3c028c2321
commit e9220c56b7
3 changed files with 20 additions and 2 deletions
+3
View File
@@ -261,6 +261,9 @@
<Function name='GetBaseZoomY'/>
<Function name='GetBaseZoomZ'/>
<Function name='GetCommand'/>
<Function name='GetDestX'/>
<Function name='GetDestY'/>
<Function name='GetDestZ'/>
<Function name='GetDiffuse'/>
<Function name='GetDiffuseAlpha'/>
<Function name='GetEffectDelta'/>
+11 -2
View File
@@ -818,6 +818,15 @@ save yourself some time, copy this for undocumented things:
<Function name='GetZ' return='float' arguments=''>
Returns the Actor's z position.
</Function>
<Function name='GetDestX' return='float' arguments=''>
Returns what the Actor's x position will be when it reaches its destination tween state.
</Function>
<Function name='GetDestY' return='float' arguments=''>
Returns what the Actor's y position will be when it reaches its destination tween state.
</Function>
<Function name='GetDestZ' return='float' arguments=''>
Returns what the Actor's z position will be when it reaches its destination tween state.
</Function>
<Function name='GetZoom' return='float' arguments=''>
Returns the Actor's zoom.
</Function>
@@ -3687,8 +3696,8 @@ save yourself some time, copy this for undocumented things:
ago= float, -- How long ago this input occurred, in seconds.<br/>
is_joystick= bool, -- True if the device is a joystick.<br/>
is_mouse= bool -- True if the device is a mouse.<br/>
},<br/>
controller= string, -- The game controller this event was mapped to. "GameController_1" or "GameController_2", or nil if the event wasn't mapped to either controller.
}, -- This ends the list of things inside the DeviceInput part of the table.<br/>
controller= string, -- The game controller this event was mapped to. "GameController_1" or "GameController_2", or nil if the event wasn't mapped to either controller.<br/>
button= string, -- The semi-raw button that was pressed. This is what the button was mapped to by the keymap settings, but without the conversions that occur when OnlyDedicatedMenuButtons is true. Will be empty if the button was not mapped.<br/>
type= string, -- The type of event. "InputEventType_FirstPress", "InputEventType_Repeat", or "InputEventType_Release".<br/>
GameButton= string, -- The cooked button that was pressed. This is button with mapping that occurs when OnlyDedicatedMenuButtons is true applied. This is nil for unmapped buttons.<br/>
+6
View File
@@ -1662,6 +1662,9 @@ public:
static int GetX( T* p, lua_State *L ) { lua_pushnumber( L, p->GetX() ); return 1; }
static int GetY( T* p, lua_State *L ) { lua_pushnumber( L, p->GetY() ); return 1; }
static int GetZ( T* p, lua_State *L ) { lua_pushnumber( L, p->GetZ() ); return 1; }
static int GetDestX( T* p, lua_State *L ) { lua_pushnumber( L, p->GetDestX() ); return 1; }
static int GetDestY( T* p, lua_State *L ) { lua_pushnumber( L, p->GetDestY() ); return 1; }
static int GetDestZ( T* p, lua_State *L ) { lua_pushnumber( L, p->GetDestZ() ); return 1; }
static int GetWidth( T* p, lua_State *L ) { lua_pushnumber( L, p->GetUnzoomedWidth() ); return 1; }
static int GetHeight( T* p, lua_State *L ) { lua_pushnumber( L, p->GetUnzoomedHeight() ); return 1; }
static int GetZoomedWidth( T* p, lua_State *L ) { lua_pushnumber( L, p->GetZoomedWidth() ); return 1; }
@@ -1838,6 +1841,9 @@ public:
ADD_METHOD( GetX );
ADD_METHOD( GetY );
ADD_METHOD( GetZ );
ADD_METHOD( GetDestX );
ADD_METHOD( GetDestY );
ADD_METHOD( GetDestZ );
ADD_METHOD( GetWidth );
ADD_METHOD( GetHeight );
ADD_METHOD( GetZoomedWidth );