add PerChoiceScrollElement metric
This commit is contained in:
@@ -89,6 +89,7 @@ Choice7=screen,ScreenExit;text,Exit
|
|||||||
Choice8=screen,ScreenTest;text,Sandbox
|
Choice8=screen,ScreenTest;text,Sandbox
|
||||||
ShowIcon=0
|
ShowIcon=0
|
||||||
ShowScroller=1
|
ShowScroller=1
|
||||||
|
PerChoiceScrollElement=0
|
||||||
ScrollerTransform=function(self,offset,itemIndex,numItems) self:x(offset*20 + itemIndex) self:y(20*offset) end
|
ScrollerTransform=function(self,offset,itemIndex,numItems) self:x(offset*20 + itemIndex) self:y(20*offset) end
|
||||||
ScrollerSecondsPerItem=0
|
ScrollerSecondsPerItem=0
|
||||||
ScrollerNumItemsToDraw=20
|
ScrollerNumItemsToDraw=20
|
||||||
@@ -3091,6 +3092,7 @@ ShowCursor=0
|
|||||||
ShowScroller=0
|
ShowScroller=0
|
||||||
WrapScroller=0
|
WrapScroller=0
|
||||||
LoopScroller=0
|
LoopScroller=0
|
||||||
|
PerChoiceScrollElement=1
|
||||||
# All on page 1 by default.
|
# All on page 1 by default.
|
||||||
NumChoicesOnPage1=999
|
NumChoicesOnPage1=999
|
||||||
SharedSelection=1
|
SharedSelection=1
|
||||||
@@ -3318,6 +3320,7 @@ ShowCursor=0
|
|||||||
ShowScroller=0
|
ShowScroller=0
|
||||||
WrapScroller=0
|
WrapScroller=0
|
||||||
LoopScroller=0
|
LoopScroller=0
|
||||||
|
PerChoiceScrollElement=1
|
||||||
# All on page 1 by default.
|
# All on page 1 by default.
|
||||||
NumChoicesOnPage1=999
|
NumChoicesOnPage1=999
|
||||||
SharedSelection=1
|
SharedSelection=1
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ void ScreenSelectMaster::Init()
|
|||||||
WRAP_CURSOR.Load( m_sName, "WrapCursor" );
|
WRAP_CURSOR.Load( m_sName, "WrapCursor" );
|
||||||
WRAP_SCROLLER.Load( m_sName, "WrapScroller" );
|
WRAP_SCROLLER.Load( m_sName, "WrapScroller" );
|
||||||
LOOP_SCROLLER.Load( m_sName, "LoopScroller" );
|
LOOP_SCROLLER.Load( m_sName, "LoopScroller" );
|
||||||
|
PER_CHOICE_SCROLL_ELEMENT.Load( m_sName, "PerChoiceScrollElement" );
|
||||||
ALLOW_REPEATING_INPUT.Load( m_sName, "AllowRepeatingInput" );
|
ALLOW_REPEATING_INPUT.Load( m_sName, "AllowRepeatingInput" );
|
||||||
SCROLLER_SECONDS_PER_ITEM.Load( m_sName, "ScrollerSecondsPerItem" );
|
SCROLLER_SECONDS_PER_ITEM.Load( m_sName, "ScrollerSecondsPerItem" );
|
||||||
SCROLLER_NUM_ITEMS_TO_DRAW.Load( m_sName, "ScrollerNumItemsToDraw" );
|
SCROLLER_NUM_ITEMS_TO_DRAW.Load( m_sName, "ScrollerNumItemsToDraw" );
|
||||||
@@ -62,7 +63,6 @@ void ScreenSelectMaster::Init()
|
|||||||
vpns.push_back( p );
|
vpns.push_back( p );
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PLAYER_APPEND_WITH_SPACE(p) (SHARED_SELECTION ? RString() : ssprintf(" P%d",(p)+1))
|
|
||||||
#define PLAYER_APPEND_NO_SPACE(p) (SHARED_SELECTION ? RString() : ssprintf("P%d",(p)+1))
|
#define PLAYER_APPEND_NO_SPACE(p) (SHARED_SELECTION ? RString() : ssprintf("P%d",(p)+1))
|
||||||
|
|
||||||
// init cursor
|
// init cursor
|
||||||
@@ -70,7 +70,7 @@ void ScreenSelectMaster::Init()
|
|||||||
{
|
{
|
||||||
FOREACH( PlayerNumber, vpns, p )
|
FOREACH( PlayerNumber, vpns, p )
|
||||||
{
|
{
|
||||||
RString sElement = "Cursor" + PLAYER_APPEND_WITH_SPACE(*p);
|
RString sElement = "Cursor " + PLAYER_APPEND_NO_SPACE(*p);
|
||||||
m_sprCursor[*p].Load( THEME->GetPathG(m_sName,sElement) );
|
m_sprCursor[*p].Load( THEME->GetPathG(m_sName,sElement) );
|
||||||
sElement.Replace( " ", "" );
|
sElement.Replace( " ", "" );
|
||||||
m_sprCursor[*p]->SetName( sElement );
|
m_sprCursor[*p]->SetName( sElement );
|
||||||
@@ -108,7 +108,13 @@ void ScreenSelectMaster::Init()
|
|||||||
{
|
{
|
||||||
FOREACH( PlayerNumber, vpns, p )
|
FOREACH( PlayerNumber, vpns, p )
|
||||||
{
|
{
|
||||||
RString sElement = ssprintf( "Scroll Choice%s", mc.m_sName.c_str() ) + PLAYER_APPEND_WITH_SPACE(*p);
|
vector<RString> vs;
|
||||||
|
vs.push_back( "scroll" );
|
||||||
|
if( PER_CHOICE_SCROLL_ELEMENT )
|
||||||
|
vs.push_back( "choice" + mc.m_sName );
|
||||||
|
if( !SHARED_SELECTION )
|
||||||
|
vs.push_back( PLAYER_APPEND_NO_SPACE(*p) );
|
||||||
|
RString sElement = join( " ", vs );
|
||||||
m_vsprScroll[*p][c].Load( THEME->GetPathG(m_sName,sElement) );
|
m_vsprScroll[*p][c].Load( THEME->GetPathG(m_sName,sElement) );
|
||||||
sElement.Replace( " ", "" );
|
sElement.Replace( " ", "" );
|
||||||
m_vsprScroll[*p][c]->SetName( sElement );
|
m_vsprScroll[*p][c]->SetName( sElement );
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ protected:
|
|||||||
ThemeMetric<bool> WRAP_CURSOR;
|
ThemeMetric<bool> WRAP_CURSOR;
|
||||||
ThemeMetric<bool> WRAP_SCROLLER;
|
ThemeMetric<bool> WRAP_SCROLLER;
|
||||||
ThemeMetric<bool> LOOP_SCROLLER;
|
ThemeMetric<bool> LOOP_SCROLLER;
|
||||||
|
ThemeMetric<bool> PER_CHOICE_SCROLL_ELEMENT;
|
||||||
ThemeMetric<bool> ALLOW_REPEATING_INPUT;
|
ThemeMetric<bool> ALLOW_REPEATING_INPUT;
|
||||||
ThemeMetric<float> SCROLLER_SECONDS_PER_ITEM;
|
ThemeMetric<float> SCROLLER_SECONDS_PER_ITEM;
|
||||||
ThemeMetric<float> SCROLLER_NUM_ITEMS_TO_DRAW;
|
ThemeMetric<float> SCROLLER_NUM_ITEMS_TO_DRAW;
|
||||||
|
|||||||
Reference in New Issue
Block a user