add SetSecondsPerItem
default SetSecondsPerItem to 0. 1 isn't a useful default (almost nothing ever scrolls that slowly).
This commit is contained in:
@@ -22,7 +22,7 @@ ActorScroller::ActorScroller()
|
|||||||
m_iNumItems = 0;
|
m_iNumItems = 0;
|
||||||
m_fCurrentItem = 0;
|
m_fCurrentItem = 0;
|
||||||
m_fDestinationItem = 0;
|
m_fDestinationItem = 0;
|
||||||
m_fSecondsPerItem = 1;
|
m_fSecondsPerItem = 0;
|
||||||
m_fSecondsPauseBetweenItems = 0;
|
m_fSecondsPauseBetweenItems = 0;
|
||||||
m_fNumItemsToDraw = 7;
|
m_fNumItemsToDraw = 7;
|
||||||
m_iFirstSubActorIndex = 0;
|
m_iFirstSubActorIndex = 0;
|
||||||
@@ -286,6 +286,7 @@ public:
|
|||||||
LunaActorScroller() { LUA->Register( Register ); }
|
LunaActorScroller() { LUA->Register( Register ); }
|
||||||
|
|
||||||
static int SetCurrentAndDestinationItem( T* p, lua_State *L ) { p->SetCurrentAndDestinationItem( FArg(1) ); return 0; }
|
static int SetCurrentAndDestinationItem( T* p, lua_State *L ) { p->SetCurrentAndDestinationItem( FArg(1) ); return 0; }
|
||||||
|
static int secondsperitem( T* p, lua_State *L ) { p->SetSecondsPerItem(FArg(1)); return 0; }
|
||||||
static int scrollthroughallitems( T* p, lua_State *L ) { p->ScrollThroughAllItems(); return 0; }
|
static int scrollthroughallitems( T* p, lua_State *L ) { p->ScrollThroughAllItems(); return 0; }
|
||||||
static int scrollwithpadding( T* p, lua_State *L ) { p->ScrollWithPadding(FArg(1),FArg(2)); return 0; }
|
static int scrollwithpadding( T* p, lua_State *L ) { p->ScrollWithPadding(FArg(1),FArg(2)); return 0; }
|
||||||
static int setfastcatchup( T* p, lua_State *L ) { p->SetFastCatchup(BArg(1)); return 0; }
|
static int setfastcatchup( T* p, lua_State *L ) { p->SetFastCatchup(BArg(1)); return 0; }
|
||||||
@@ -293,6 +294,7 @@ public:
|
|||||||
static void Register(lua_State *L)
|
static void Register(lua_State *L)
|
||||||
{
|
{
|
||||||
ADD_METHOD( SetCurrentAndDestinationItem );
|
ADD_METHOD( SetCurrentAndDestinationItem );
|
||||||
|
ADD_METHOD( secondsperitem );
|
||||||
ADD_METHOD( scrollthroughallitems );
|
ADD_METHOD( scrollthroughallitems );
|
||||||
ADD_METHOD( scrollwithpadding );
|
ADD_METHOD( scrollwithpadding );
|
||||||
ADD_METHOD( setfastcatchup );
|
ADD_METHOD( setfastcatchup );
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ public:
|
|||||||
void ScrollWithPadding( float fItemPaddingStart, float fItemPaddingEnd );
|
void ScrollWithPadding( float fItemPaddingStart, float fItemPaddingEnd );
|
||||||
void SetPauseCountdownSeconds( float fSecs ) { m_fPauseCountdownSeconds = fSecs; }
|
void SetPauseCountdownSeconds( float fSecs ) { m_fPauseCountdownSeconds = fSecs; }
|
||||||
void SetFastCatchup( bool bOn ) { m_bFastCatchup = bOn; }
|
void SetFastCatchup( bool bOn ) { m_bFastCatchup = bOn; }
|
||||||
|
void SetSecondsPerItem( float fSeconds ) { m_fSecondsPerItem = fSeconds; }
|
||||||
void SetSecondsPauseBetweenItems( float fSeconds ) { m_fSecondsPauseBetweenItems = fSeconds; }
|
void SetSecondsPauseBetweenItems( float fSeconds ) { m_fSecondsPauseBetweenItems = fSeconds; }
|
||||||
float GetSecondsForCompleteScrollThrough() const;
|
float GetSecondsForCompleteScrollThrough() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user