allow float value for NumItemsToDraw
This commit is contained in:
@@ -46,7 +46,7 @@ void ActorScroller::LoadFromIni( const IniFile &ini, const CString &sKey )
|
||||
Dialog::OK( ssprintf("File '%s' is missing the value Scroller::%s", ini.GetPath().c_str(), szName) );
|
||||
|
||||
float fSecondsPerItem = 1;
|
||||
int iNumItemsToDraw = 7;
|
||||
float fNumItemsToDraw = 7;
|
||||
RageVector3 vRotationDegrees = RageVector3(0,0,0);
|
||||
RageVector3 vTranslateTerm0 = RageVector3(0,0,0);
|
||||
RageVector3 vTranslateTerm1 = RageVector3(0,0,0);
|
||||
@@ -55,7 +55,7 @@ void ActorScroller::LoadFromIni( const IniFile &ini, const CString &sKey )
|
||||
float fItemPaddingEnd = 0;
|
||||
|
||||
REQUIRED_GET_VALUE( "SecondsPerItem", fSecondsPerItem );
|
||||
REQUIRED_GET_VALUE( "NumItemsToDraw", iNumItemsToDraw );
|
||||
REQUIRED_GET_VALUE( "NumItemsToDraw", fNumItemsToDraw );
|
||||
REQUIRED_GET_VALUE( "RotationDegreesX", vRotationDegrees[0] );
|
||||
REQUIRED_GET_VALUE( "RotationDegreesY", vRotationDegrees[1] );
|
||||
REQUIRED_GET_VALUE( "RotationDegreesZ", vRotationDegrees[2] );
|
||||
@@ -74,7 +74,7 @@ void ActorScroller::LoadFromIni( const IniFile &ini, const CString &sKey )
|
||||
|
||||
Load(
|
||||
fSecondsPerItem,
|
||||
iNumItemsToDraw,
|
||||
fNumItemsToDraw,
|
||||
vRotationDegrees,
|
||||
vTranslateTerm0,
|
||||
vTranslateTerm1,
|
||||
@@ -103,7 +103,6 @@ void ActorScroller::DrawPrimitives()
|
||||
}
|
||||
else
|
||||
{
|
||||
int iFirstItemToDraw = (int)roundf( m_fCurrentItem - m_fNumItemsToDraw/2.f );
|
||||
for( int i=0; i<m_SubActors.size(); i++ )
|
||||
{
|
||||
float fItemOffset = i - m_fCurrentItem;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#define OPTION_ORDER( dir ) THEME->GetMetric (m_sName,"OptionOrder"+CString(dir))
|
||||
#define SHOW_SCROLLER THEME->GetMetricB(m_sName,"ShowScroller")
|
||||
#define SCROLLER_SECONDS_PER_ITEM THEME->GetMetricF(m_sName,"ScrollerSecondsPerItem")
|
||||
#define SCROLLER_NUM_ITEMS_TO_DRAW THEME->GetMetricI(m_sName,"ScrollerNumItemsToDraw")
|
||||
#define SCROLLER_NUM_ITEMS_TO_DRAW THEME->GetMetricF(m_sName,"ScrollerNumItemsToDraw")
|
||||
#define SCROLLER_SPACING_X THEME->GetMetricF(m_sName,"ScrollerSpacingX")
|
||||
#define SCROLLER_SPACING_Y THEME->GetMetricF(m_sName,"ScrollerSpacingY")
|
||||
#define DEFAULT_CHOICE THEME->GetMetric (m_sName,"DefaultChoice")
|
||||
@@ -109,6 +109,7 @@ ScreenSelectMaster::ScreenSelectMaster( CString sClassName ) : ScreenSelect( sCl
|
||||
CString sFName = ssprintf("%s Scroll Choice%s", m_sName.c_str(),mc.m_sName.c_str());
|
||||
m_sprScroll[c][0].Load( THEME->GetPathToG(sFName) );
|
||||
m_sprScroll[c][0]->SetName( ssprintf("Scroll") );
|
||||
m_sprScroll[c][0]->PlayCommand( "Init" );
|
||||
m_Scroller[0].AddChild( m_sprScroll[c][0] );
|
||||
}
|
||||
}
|
||||
@@ -133,6 +134,7 @@ ScreenSelectMaster::ScreenSelectMaster( CString sClassName ) : ScreenSelect( sCl
|
||||
CString sFName = ssprintf("%s Scroll Choice%s P%d", m_sName.c_str(),mc.m_sName.c_str(),p+1);
|
||||
m_sprScroll[c][p].Load( THEME->GetPathToG(sFName) );
|
||||
m_sprScroll[c][p]->SetName( ssprintf("ScrollP%d",p+1) );
|
||||
m_sprScroll[c][p]->PlayCommand( "Init" );
|
||||
m_Scroller[p].AddChild( m_sprScroll[c][p] );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user