remove SSM parts
This commit is contained in:
@@ -81,7 +81,7 @@ Choice6=screen,ScreenJukeboxMenu
|
||||
Choice7=screen,ScreenExit
|
||||
Choice8=screen,ScreenTest
|
||||
|
||||
NumIconParts=0
|
||||
ShowIcon=0
|
||||
ShowScroller=1
|
||||
ScrollerTransform=function(self,offset,itemIndex,numItems) self:y(50*offset) end
|
||||
ScrollerSecondsPerItem=0
|
||||
@@ -2947,72 +2947,74 @@ OptionOrderDown=
|
||||
OptionOrderLeft=
|
||||
OptionOrderRight=
|
||||
OptionOrderAuto=
|
||||
NumIconParts=0
|
||||
NumCursorParts=0
|
||||
NumPreviewParts=0
|
||||
ShowIcon=0
|
||||
ShowCursor=0
|
||||
ShowPreview=0
|
||||
ShowScroller=0
|
||||
WrapScroller=0
|
||||
ScrollerFastCatchup=0
|
||||
# All on page 1 by default.
|
||||
NumChoicesOnPage1=999
|
||||
SharedPreviewAndCursor=1
|
||||
CursorPart1P1OffsetXFromIcon=0
|
||||
CursorPart1P1OffsetYFromIcon=0
|
||||
CursorP1OffsetXFromIcon=0
|
||||
CursorP1OffsetYFromIcon=0
|
||||
CursorP2OffsetXFromIcon=0
|
||||
CursorP2OffsetYFromIcon=0
|
||||
DisabledColor=#606060
|
||||
|
||||
# Blank defaults for a few options.
|
||||
IconPart1Choice1SwitchToPage1Command=
|
||||
IconPart1Choice1SwitchToPage2Command=
|
||||
IconPart1Choice1OnCommand=
|
||||
IconPart1Choice1OffCommand=
|
||||
IconPart1Choice1OffFocusedCommand=
|
||||
IconPart1Choice1OffUnfocusedCommand=
|
||||
IconPart1Choice1GainFocusCommand=
|
||||
IconPart1Choice1LoseFocusCommand=
|
||||
IconPart1Choice1EnabledCommand=
|
||||
IconPart1Choice1DisabledCommand=
|
||||
IconChoice1SwitchToPage1Command=
|
||||
IconChoice1SwitchToPage2Command=
|
||||
IconChoice1OnCommand=
|
||||
IconChoice1OffCommand=
|
||||
IconChoice1OffFocusedCommand=
|
||||
IconChoice1OffUnfocusedCommand=
|
||||
IconChoice1GainFocusCommand=
|
||||
IconChoice1LoseFocusCommand=
|
||||
IconChoice1EnabledCommand=
|
||||
IconChoice1DisabledCommand=
|
||||
|
||||
IconPart1Choice2SwitchToPage1Command=
|
||||
IconPart1Choice2SwitchToPage2Command=
|
||||
IconPart1Choice2OnCommand=
|
||||
IconPart1Choice2OffCommand=
|
||||
IconPart1Choice2OffFocusedCommand=
|
||||
IconPart1Choice2OffUnfocusedCommand=
|
||||
IconPart1Choice2GainFocusCommand=
|
||||
IconPart1Choice2LoseFocusCommand=
|
||||
IconPart1Choice2EnabledCommand=
|
||||
IconPart1Choice2DisabledCommand=
|
||||
IconChoice2SwitchToPage1Command=
|
||||
IconChoice2SwitchToPage2Command=
|
||||
IconChoice2OnCommand=
|
||||
IconChoice2OffCommand=
|
||||
IconChoice2OffFocusedCommand=
|
||||
IconChoice2OffUnfocusedCommand=
|
||||
IconChoice2GainFocusCommand=
|
||||
IconChoice2LoseFocusCommand=
|
||||
IconChoice2EnabledCommand=
|
||||
IconChoice2DisabledCommand=
|
||||
|
||||
IconPart1Choice3SwitchToPage1Command=
|
||||
IconPart1Choice3SwitchToPage2Command=
|
||||
IconPart1Choice3OnCommand=
|
||||
IconPart1Choice3OffCommand=
|
||||
IconPart1Choice3OffFocusedCommand=
|
||||
IconPart1Choice3OffUnfocusedCommand=
|
||||
IconPart1Choice3GainFocusCommand=
|
||||
IconPart1Choice3LoseFocusCommand=
|
||||
IconPart1Choice3EnabledCommand=
|
||||
IconPart1Choice3DisabledCommand=
|
||||
IconChoice3SwitchToPage1Command=
|
||||
IconChoice3SwitchToPage2Command=
|
||||
IconChoice3OnCommand=
|
||||
IconChoice3OffCommand=
|
||||
IconChoice3OffFocusedCommand=
|
||||
IconChoice3OffUnfocusedCommand=
|
||||
IconChoice3GainFocusCommand=
|
||||
IconChoice3LoseFocusCommand=
|
||||
IconChoice3EnabledCommand=
|
||||
IconChoice3DisabledCommand=
|
||||
|
||||
IconPart1Choice4SwitchToPage1Command=
|
||||
IconPart1Choice4SwitchToPage2Command=
|
||||
IconPart1Choice4OnCommand=
|
||||
IconPart1Choice4OffCommand=
|
||||
IconPart1Choice4OffFocusedCommand=
|
||||
IconPart1Choice4OffUnfocusedCommand=
|
||||
IconPart1Choice4GainFocusCommand=
|
||||
IconPart1Choice4LoseFocusCommand=
|
||||
IconPart1Choice4EnabledCommand=
|
||||
IconPart1Choice4DisabledCommand=
|
||||
IconChoice4SwitchToPage1Command=
|
||||
IconChoice4SwitchToPage2Command=
|
||||
IconChoice4OnCommand=
|
||||
IconChoice4OffCommand=
|
||||
IconChoice4OffFocusedCommand=
|
||||
IconChoice4OffUnfocusedCommand=
|
||||
IconChoice4GainFocusCommand=
|
||||
IconChoice4LoseFocusCommand=
|
||||
IconChoice4EnabledCommand=
|
||||
IconChoice4DisabledCommand=
|
||||
|
||||
PreviewPart1GainFocusCommand=
|
||||
PreviewPart1LoseFocusCommand=
|
||||
PreviewPart1PreSwitchPageCommand=
|
||||
PreviewPart1PostSwitchPageCommand=
|
||||
PreviewPart1OnCommand=
|
||||
PreviewPart1OffCommand=
|
||||
PreviewPart1OffFocusedCommand=
|
||||
PreviewPart1OffUnfocusedCommand=
|
||||
PreviewGainFocusCommand=
|
||||
PreviewLoseFocusCommand=
|
||||
PreviewPreSwitchPageCommand=
|
||||
PreviewPostSwitchPageCommand=
|
||||
PreviewOnCommand=
|
||||
PreviewOffCommand=
|
||||
PreviewOffFocusedCommand=
|
||||
PreviewOffUnfocusedCommand=
|
||||
|
||||
ExplanationPage1X=0
|
||||
ExplanationPage1Y=0
|
||||
@@ -3207,17 +3209,19 @@ OptionOrderDown=
|
||||
OptionOrderLeft=
|
||||
OptionOrderRight=
|
||||
OptionOrderAuto=
|
||||
NumIconParts=0
|
||||
NumCursorParts=0
|
||||
NumPreviewParts=0
|
||||
ShowIcon=0
|
||||
ShowCursor=0
|
||||
ShowPreview=0
|
||||
ShowScroller=0
|
||||
WrapScroller=0
|
||||
ScrollerFastCatchup=0
|
||||
# All on page 1 by default.
|
||||
NumChoicesOnPage1=999
|
||||
SharedPreviewAndCursor=1
|
||||
CursorPart1P1OffsetXFromIcon=0
|
||||
CursorPart1P1OffsetYFromIcon=0
|
||||
CursorP1OffsetXFromIcon=0
|
||||
CursorP1OffsetYFromIcon=0
|
||||
CursorP2OffsetXFromIcon=0
|
||||
CursorP2OffsetYFromIcon=0
|
||||
DisabledColor=#606060
|
||||
|
||||
ExplanationPage1X=
|
||||
@@ -4510,21 +4514,12 @@ WrapCursor=1
|
||||
AllowRepeatingInput=1
|
||||
ChoiceNames=
|
||||
CodeNames=
|
||||
NextScreen=ScreenOptionsEditProfile
|
||||
|
||||
NumIconParts=0
|
||||
ShowScroller=1
|
||||
ScrollerOnCommand=
|
||||
ScrollerOffCommand=
|
||||
ScrollerX=SCREEN_CENTER_X-240
|
||||
ScrollerY=SCREEN_CENTER_Y-130
|
||||
ScrollerTransform=function(self,offset,itemIndex,numItems) self:y(50*offset); end
|
||||
ScrollerSecondsPerItem=0
|
||||
ScrollerNumItemsToDraw=20
|
||||
ScrollLoseFocusCommand=
|
||||
ShowScroller=0
|
||||
|
||||
[ScreenSelectProfileManage]
|
||||
Fallback=ScreenSelectProfile
|
||||
NextScreen=ScreenOptionsEditProfile
|
||||
|
||||
[ScreenOptionsEditProfile]
|
||||
Fallback=ScreenOptions
|
||||
|
||||
@@ -16,20 +16,21 @@
|
||||
|
||||
AutoScreenMessage( SM_PlayPostSwitchPage )
|
||||
|
||||
CString CURSOR_OFFSET_X_FROM_ICON_NAME( size_t p, size_t part ) { return ssprintf("CursorPart%dP%dOffsetXFromIcon",int(part+1),int(p+1)); }
|
||||
CString CURSOR_OFFSET_Y_FROM_ICON_NAME( size_t p, size_t part ) { return ssprintf("CursorPart%dP%dOffsetYFromIcon",int(part+1),int(p+1)); }
|
||||
CString CURSOR_OFFSET_X_FROM_ICON_NAME( size_t p ) { return ssprintf("CursorP%dOffsetXFromIcon",int(p+1)); }
|
||||
CString CURSOR_OFFSET_Y_FROM_ICON_NAME( size_t p ) { return ssprintf("CursorP%dOffsetYFromIcon",int(p+1)); }
|
||||
/* e.g. "OptionOrderLeft=0:1,1:2,2:3,3:4" */
|
||||
CString OPTION_ORDER_NAME( size_t dir ) { return "OptionOrder"+MenuDirToString((MenuDir)dir); }
|
||||
|
||||
REGISTER_SCREEN_CLASS( ScreenSelectMaster );
|
||||
ScreenSelectMaster::ScreenSelectMaster( CString sClassName ) : ScreenSelect( sClassName ),
|
||||
NUM_ICON_PARTS(m_sName,"NumIconParts"),
|
||||
NUM_PREVIEW_PARTS(m_sName,"NumPreviewParts"),
|
||||
NUM_CURSOR_PARTS(m_sName,"NumCursorParts"),
|
||||
SHOW_ICON(m_sName,"ShowIcon"),
|
||||
SHOW_PREVIEW(m_sName,"ShowPreview"),
|
||||
SHOW_CURSOR(m_sName,"ShowCursor"),
|
||||
SHOW_SCROLLER(m_sName,"ShowScroller"),
|
||||
SHARED_PREVIEW_AND_CURSOR(m_sName,"SharedPreviewAndCursor"),
|
||||
NUM_CHOICES_ON_PAGE_1(m_sName,"NumChoicesOnPage1"),
|
||||
CURSOR_OFFSET_X_FROM_ICON(m_sName,CURSOR_OFFSET_X_FROM_ICON_NAME,NUM_PLAYERS,NUM_CURSOR_PARTS),
|
||||
CURSOR_OFFSET_Y_FROM_ICON(m_sName,CURSOR_OFFSET_Y_FROM_ICON_NAME,NUM_PLAYERS,NUM_CURSOR_PARTS),
|
||||
CURSOR_OFFSET_X_FROM_ICON(m_sName,CURSOR_OFFSET_X_FROM_ICON_NAME,NUM_PLAYERS),
|
||||
CURSOR_OFFSET_Y_FROM_ICON(m_sName,CURSOR_OFFSET_Y_FROM_ICON_NAME,NUM_PLAYERS),
|
||||
OVERRIDE_LOCK_INPUT_SECONDS(m_sName,"OverrideLockInputSeconds"),
|
||||
LOCK_INPUT_SECONDS(m_sName,"LockInputSeconds"),
|
||||
PRE_SWITCH_PAGE_SECONDS(m_sName,"PreSwitchPageSeconds"),
|
||||
@@ -41,7 +42,6 @@ ScreenSelectMaster::ScreenSelectMaster( CString sClassName ) : ScreenSelect( sCl
|
||||
WRAP_SCROLLER(m_sName,"WrapScroller"),
|
||||
SCROLLER_FAST_CATCHUP(m_sName,"ScrollerFastCatchup"),
|
||||
ALLOW_REPEATING_INPUT(m_sName,"AllowRepeatingInput"),
|
||||
SHOW_SCROLLER(m_sName,"ShowScroller"),
|
||||
SCROLLER_SECONDS_PER_ITEM(m_sName,"ScrollerSecondsPerItem"),
|
||||
SCROLLER_NUM_ITEMS_TO_DRAW(m_sName,"ScrollerNumItemsToDraw"),
|
||||
SCROLLER_TRANSFORM(m_sName,"ScrollerTransform"),
|
||||
@@ -88,13 +88,13 @@ void ScreenSelectMaster::Init()
|
||||
#define APPEND_STRING_NO_SPACE(p) (SHARED_PREVIEW_AND_CURSOR ? CString() : ssprintf("P%d",(p)+1))
|
||||
|
||||
// init cursor
|
||||
for( int i=0; i<NUM_CURSOR_PARTS; i++ )
|
||||
if( SHOW_CURSOR )
|
||||
{
|
||||
FOREACH( PlayerNumber, vpns, p )
|
||||
{
|
||||
m_sprCursor[i][*p].Load( THEME->GetPathG(m_sName,ssprintf("Cursor Part%d",i+1)+APPEND_STRING_WITH_SPACE(*p)) );
|
||||
m_sprCursor[i][*p]->SetName( ssprintf("CursorPart%d",i+1)+APPEND_STRING_NO_SPACE(*p) );
|
||||
this->AddChild( m_sprCursor[i][*p] );
|
||||
m_sprCursor[*p].Load( THEME->GetPathG(m_sName,"Cursor"+APPEND_STRING_WITH_SPACE(*p)) );
|
||||
m_sprCursor[*p]->SetName( "Cursor"+APPEND_STRING_NO_SPACE(*p) );
|
||||
this->AddChild( m_sprCursor[*p] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,21 +137,21 @@ void ScreenSelectMaster::Init()
|
||||
const GameCommand& mc = m_aGameCommands[c];
|
||||
|
||||
// init icon
|
||||
for( int i=0; i<NUM_ICON_PARTS; i++ )
|
||||
if( SHOW_ICON )
|
||||
{
|
||||
m_sprIcon[i][c].Load( THEME->GetPathG(m_sName,ssprintf("Icon Part%d Choice%s",i+1,mc.m_sName.c_str())) );
|
||||
m_sprIcon[i][c]->SetName( ssprintf("IconPart%dChoice%s",i+1,mc.m_sName.c_str()) );
|
||||
this->AddChild( m_sprIcon[i][c] );
|
||||
m_sprIcon[c].Load( THEME->GetPathG(m_sName,ssprintf("Icon Choice%s",mc.m_sName.c_str())) );
|
||||
m_sprIcon[c]->SetName( ssprintf("IconChoice%s",mc.m_sName.c_str()) );
|
||||
this->AddChild( m_sprIcon[c] );
|
||||
}
|
||||
|
||||
// init preview
|
||||
FOREACH( PlayerNumber, vpns, p )
|
||||
if( SHOW_PREVIEW )
|
||||
{
|
||||
for( int i=0; i<NUM_PREVIEW_PARTS; i++ )
|
||||
FOREACH( PlayerNumber, vpns, p )
|
||||
{
|
||||
m_sprPreview[i][c][*p].Load( THEME->GetPathG(m_sName,ssprintf("Preview Part%d Choice%s",i+1,mc.m_sName.c_str())+APPEND_STRING_NO_SPACE(*p)) );
|
||||
m_sprPreview[i][c][*p]->SetName( ssprintf("PreviewPart%d",i+1)+APPEND_STRING_NO_SPACE(*p) );
|
||||
this->AddChild( m_sprPreview[i][c][*p] );
|
||||
m_sprPreview[c][*p].Load( THEME->GetPathG(m_sName,ssprintf("Preview Choice%s",mc.m_sName.c_str())+APPEND_STRING_NO_SPACE(*p)) );
|
||||
m_sprPreview[c][*p]->SetName( "Preview"+APPEND_STRING_NO_SPACE(*p) );
|
||||
this->AddChild( m_sprPreview[c][*p] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -266,21 +266,21 @@ void ScreenSelectMaster::HandleScreenMessage( const ScreenMessage SM )
|
||||
|
||||
if( SM == SM_PlayPostSwitchPage )
|
||||
{
|
||||
for( int i=0; i<NUM_CURSOR_PARTS; i++ )
|
||||
if( SHOW_CURSOR )
|
||||
{
|
||||
FOREACH( PlayerNumber, vpns, p )
|
||||
{
|
||||
m_sprCursor[i][*p]->SetXY( GetCursorX(*p,i), GetCursorY(*p,i) );
|
||||
COMMAND( m_sprCursor[i][*p], "PostSwitchPage" );
|
||||
m_sprCursor[*p]->SetXY( GetCursorX(*p), GetCursorY(*p) );
|
||||
COMMAND( m_sprCursor[*p], "PostSwitchPage" );
|
||||
}
|
||||
}
|
||||
|
||||
for( int i=0; i<NUM_PREVIEW_PARTS; i++ )
|
||||
if( SHOW_PREVIEW )
|
||||
{
|
||||
FOREACH( PlayerNumber, vpns, p )
|
||||
{
|
||||
int iChoice = m_iChoice[*p];
|
||||
COMMAND( m_sprPreview[i][iChoice][*p], "PostSwitchPage" );
|
||||
COMMAND( m_sprPreview[iChoice][*p], "PostSwitchPage" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,8 +339,8 @@ void ScreenSelectMaster::UpdateSelectableChoices()
|
||||
|
||||
for( unsigned c=0; c<m_aGameCommands.size(); c++ )
|
||||
{
|
||||
for( int i=0; i<NUM_ICON_PARTS; i++ )
|
||||
COMMAND( m_sprIcon[i][c], m_aGameCommands[c].IsPlayable()? "Enabled":"Disabled" );
|
||||
if( SHOW_ICON )
|
||||
COMMAND( m_sprIcon[c], m_aGameCommands[c].IsPlayable()? "Enabled":"Disabled" );
|
||||
|
||||
FOREACH( PlayerNumber, vpns, p )
|
||||
if( m_sprScroll[c][*p].IsLoaded() )
|
||||
@@ -472,31 +472,39 @@ bool ScreenSelectMaster::ChangePage( int iNewChoice )
|
||||
}
|
||||
|
||||
|
||||
for( int i=0; i<NUM_CURSOR_PARTS; i++ )
|
||||
if( SHOW_CURSOR )
|
||||
{
|
||||
FOREACH( PlayerNumber, vpns, p )
|
||||
if( GAMESTATE->IsHumanPlayer(*p) )
|
||||
COMMAND( m_sprCursor[i][*p], "PreSwitchPage" );
|
||||
COMMAND( m_sprCursor[*p], "PreSwitchPage" );
|
||||
}
|
||||
|
||||
const CString sIconAndExplanationCommand = ssprintf( "SwitchToPage%d", newPage+1 );
|
||||
|
||||
for( unsigned c=0; c<m_aGameCommands.size(); c++ )
|
||||
for( int i=0; i<NUM_ICON_PARTS; i++ )
|
||||
COMMAND( m_sprIcon[i][c], sIconAndExplanationCommand );
|
||||
if( SHOW_ICON )
|
||||
{
|
||||
for( unsigned c=0; c<m_aGameCommands.size(); c++ )
|
||||
COMMAND( m_sprIcon[c], sIconAndExplanationCommand );
|
||||
}
|
||||
|
||||
if( SHARED_PREVIEW_AND_CURSOR )
|
||||
{
|
||||
int iChoice = m_iChoice[GetSharedPlayer()];
|
||||
for( int i=0; i<NUM_PREVIEW_PARTS; i++ )
|
||||
COMMAND( m_sprPreview[i][iChoice][0], "PreSwitchPage" );
|
||||
if( SHOW_PREVIEW )
|
||||
{
|
||||
int iChoice = m_iChoice[GetSharedPlayer()];
|
||||
COMMAND( m_sprPreview[iChoice][0], "PreSwitchPage" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for( int i=0; i<NUM_PREVIEW_PARTS; i++ )
|
||||
if( SHOW_PREVIEW )
|
||||
{
|
||||
FOREACH_HumanPlayer( p )
|
||||
{
|
||||
int iChoice = m_iChoice[p];
|
||||
COMMAND( m_sprPreview[i][iChoice][p], "PreSwitchPage" );
|
||||
COMMAND( m_sprPreview[iChoice][p], "PreSwitchPage" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for( int page=0; page<NUM_PAGES; page++ )
|
||||
@@ -545,47 +553,39 @@ bool ScreenSelectMaster::ChangeSelection( PlayerNumber pn, MenuDir dir, int iNew
|
||||
if( p!=pn )
|
||||
continue; // skip
|
||||
|
||||
if( SHARED_PREVIEW_AND_CURSOR )
|
||||
if( SHOW_PREVIEW )
|
||||
{
|
||||
for( int i=0; i<NUM_PREVIEW_PARTS; i++ )
|
||||
if( SHARED_PREVIEW_AND_CURSOR )
|
||||
{
|
||||
COMMAND( m_sprPreview[i][iOldChoice][0], "LoseFocus" );
|
||||
COMMAND( m_sprPreview[i][iNewChoice][0], "GainFocus" );
|
||||
COMMAND( m_sprPreview[iOldChoice][0], "LoseFocus" );
|
||||
COMMAND( m_sprPreview[iNewChoice][0], "GainFocus" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for( int i=0; i<NUM_PREVIEW_PARTS; i++ )
|
||||
else
|
||||
{
|
||||
COMMAND( m_sprPreview[i][iOldChoice][p], "LoseFocus" );
|
||||
COMMAND( m_sprPreview[i][iNewChoice][p], "GainFocus" );
|
||||
COMMAND( m_sprPreview[iOldChoice][p], "LoseFocus" );
|
||||
COMMAND( m_sprPreview[iNewChoice][p], "GainFocus" );
|
||||
}
|
||||
}
|
||||
|
||||
if( SHOW_ICON )
|
||||
{
|
||||
/* XXX: If !SharedPreviewAndCursor, this is incorrect. (Nothing uses
|
||||
* both icon focus and !SharedPreviewAndCursor right now.) */
|
||||
for( int i=0; i<NUM_ICON_PARTS; i++ )
|
||||
{
|
||||
COMMAND( m_sprIcon[i][iOldChoice], "LoseFocus" );
|
||||
COMMAND( m_sprIcon[i][iNewChoice], "GainFocus" );
|
||||
}
|
||||
COMMAND( m_sprIcon[iOldChoice], "LoseFocus" );
|
||||
COMMAND( m_sprIcon[iNewChoice], "GainFocus" );
|
||||
}
|
||||
|
||||
if( SHARED_PREVIEW_AND_CURSOR )
|
||||
if( SHOW_PREVIEW )
|
||||
{
|
||||
for( int i=0; i<NUM_CURSOR_PARTS; i++ )
|
||||
if( SHARED_PREVIEW_AND_CURSOR )
|
||||
{
|
||||
COMMAND( m_sprCursor[i][0], "Change" );
|
||||
m_sprCursor[i][0]->SetXY( GetCursorX((PlayerNumber)0,i), GetCursorY((PlayerNumber)0,i) );
|
||||
COMMAND( m_sprCursor[0], "Change" );
|
||||
m_sprCursor[0]->SetXY( GetCursorX((PlayerNumber)0), GetCursorY((PlayerNumber)0) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for( int i=0; i<NUM_CURSOR_PARTS; i++ )
|
||||
else
|
||||
{
|
||||
COMMAND( m_sprCursor[i][p], "Change" );
|
||||
m_sprCursor[i][p]->SetXY( GetCursorX(p,i), GetCursorY(p,i) );
|
||||
COMMAND( m_sprCursor[p], "Change" );
|
||||
m_sprCursor[p]->SetXY( GetCursorX(p), GetCursorY(p) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -673,10 +673,10 @@ float ScreenSelectMaster::DoMenuStart( PlayerNumber pn )
|
||||
|
||||
int iIndex = SHARED_PREVIEW_AND_CURSOR ? 0 : pn;
|
||||
|
||||
for( int i=0; i<NUM_CURSOR_PARTS; i++ )
|
||||
if( SHOW_CURSOR )
|
||||
{
|
||||
COMMAND( m_sprCursor[i][pn], "Choose");
|
||||
fSecs = max( fSecs, m_sprCursor[i][iIndex]->GetTweenTimeLeft() );
|
||||
COMMAND( m_sprCursor[pn], "Choose");
|
||||
fSecs = max( fSecs, m_sprCursor[iIndex]->GetTweenTimeLeft() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -769,31 +769,31 @@ void ScreenSelectMaster::TweenOnScreen()
|
||||
|
||||
for( unsigned c=0; c<m_aGameCommands.size(); c++ )
|
||||
{
|
||||
for( int i=0; i<NUM_ICON_PARTS; i++ )
|
||||
if( SHOW_CURSOR )
|
||||
{
|
||||
COMMAND( m_sprIcon[i][c], (int(c) == m_iChoice[0])? "GainFocus":"LoseFocus" );
|
||||
m_sprIcon[i][c]->FinishTweening();
|
||||
SET_XY_AND_ON_COMMAND( m_sprIcon[i][c] );
|
||||
COMMAND( m_sprIcon[c], (int(c) == m_iChoice[0])? "GainFocus":"LoseFocus" );
|
||||
m_sprIcon[c]->FinishTweening();
|
||||
SET_XY_AND_ON_COMMAND( m_sprIcon[c] );
|
||||
}
|
||||
|
||||
FOREACH( PlayerNumber, vpns, p )
|
||||
if( SHOW_PREVIEW )
|
||||
{
|
||||
for( int i=0; i<NUM_PREVIEW_PARTS; i++ )
|
||||
FOREACH( PlayerNumber, vpns, p )
|
||||
{
|
||||
COMMAND( m_sprPreview[i][c][*p], (int(c) == m_iChoice[*p])? "GainFocus":"LoseFocus" );
|
||||
m_sprPreview[i][c][*p]->FinishTweening();
|
||||
SET_XY_AND_ON_COMMAND( m_sprPreview[i][c][*p] );
|
||||
COMMAND( m_sprPreview[c][*p], (int(c) == m_iChoice[*p])? "GainFocus":"LoseFocus" );
|
||||
m_sprPreview[c][*p]->FinishTweening();
|
||||
SET_XY_AND_ON_COMMAND( m_sprPreview[c][*p] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Need to SetXY of Cursor after Icons since it depends on the Icons' positions.
|
||||
for( int i=0; i<NUM_CURSOR_PARTS; i++ )
|
||||
if( SHOW_CURSOR )
|
||||
{
|
||||
FOREACH( PlayerNumber, vpns, p )
|
||||
{
|
||||
m_sprCursor[i][*p]->SetXY( GetCursorX(*p,i), GetCursorY(*p,i) );
|
||||
ON_COMMAND( m_sprCursor[i][*p] );
|
||||
m_sprCursor[*p]->SetXY( GetCursorX(*p), GetCursorY(*p) );
|
||||
ON_COMMAND( m_sprCursor[*p] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -839,9 +839,11 @@ void ScreenSelectMaster::TweenOffScreen()
|
||||
}
|
||||
|
||||
|
||||
for( int i=0; i<NUM_CURSOR_PARTS; i++ )
|
||||
if( SHOW_CURSOR )
|
||||
{
|
||||
FOREACH( PlayerNumber, vpns, p )
|
||||
OFF_COMMAND( m_sprCursor[i][*p] );
|
||||
OFF_COMMAND( m_sprCursor[*p] );
|
||||
}
|
||||
|
||||
for( unsigned c=0; c<m_aGameCommands.size(); c++ )
|
||||
{
|
||||
@@ -855,19 +857,18 @@ void ScreenSelectMaster::TweenOffScreen()
|
||||
SelectedByEitherPlayer = true;
|
||||
}
|
||||
|
||||
for( int i=0; i<NUM_ICON_PARTS; i++ )
|
||||
if( SHOW_ICON )
|
||||
{
|
||||
OFF_COMMAND( m_sprIcon[i][c] );
|
||||
COMMAND( m_sprIcon[i][c], SelectedByEitherPlayer? "OffFocused":"OffUnfocused" );
|
||||
OFF_COMMAND( m_sprIcon[c] );
|
||||
COMMAND( m_sprIcon[c], SelectedByEitherPlayer? "OffFocused":"OffUnfocused" );
|
||||
}
|
||||
|
||||
|
||||
for( int i=0; i<NUM_PREVIEW_PARTS; i++ )
|
||||
if( SHOW_PREVIEW )
|
||||
{
|
||||
FOREACH( PlayerNumber, vpns, p )
|
||||
{
|
||||
OFF_COMMAND( m_sprPreview[i][c][*p] );
|
||||
COMMAND( m_sprPreview[i][c][*p], SelectedByEitherPlayer? "OffFocused":"OffUnfocused" );
|
||||
OFF_COMMAND( m_sprPreview[c][*p] );
|
||||
COMMAND( m_sprPreview[c][*p], SelectedByEitherPlayer? "OffFocused":"OffUnfocused" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -883,16 +884,16 @@ void ScreenSelectMaster::TweenOffScreen()
|
||||
}
|
||||
|
||||
|
||||
float ScreenSelectMaster::GetCursorX( PlayerNumber pn, int iPartIndex )
|
||||
float ScreenSelectMaster::GetCursorX( PlayerNumber pn )
|
||||
{
|
||||
int iChoice = m_iChoice[pn];
|
||||
return m_sprIcon[0][iChoice]->GetX() + CURSOR_OFFSET_X_FROM_ICON.GetValue(pn, iPartIndex);
|
||||
return m_sprIcon[iChoice]->GetX() + CURSOR_OFFSET_X_FROM_ICON.GetValue(pn);
|
||||
}
|
||||
|
||||
float ScreenSelectMaster::GetCursorY( PlayerNumber pn, int iPartIndex )
|
||||
float ScreenSelectMaster::GetCursorY( PlayerNumber pn )
|
||||
{
|
||||
int iChoice = m_iChoice[pn];
|
||||
return m_sprIcon[0][iChoice]->GetY() + CURSOR_OFFSET_Y_FROM_ICON.GetValue(pn, iPartIndex);
|
||||
return m_sprIcon[iChoice]->GetY() + CURSOR_OFFSET_Y_FROM_ICON.GetValue(pn);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
#include "ActorScroller.h"
|
||||
|
||||
#define MAX_CHOICES 30
|
||||
#define MAX_ICON_PARTS 3
|
||||
#define MAX_PREVIEW_PARTS 3
|
||||
#define MAX_CURSOR_PARTS 3
|
||||
|
||||
class ScreenSelectMaster : public ScreenSelect
|
||||
{
|
||||
@@ -36,13 +33,14 @@ protected:
|
||||
Page GetPage( int iChoiceIndex ) const;
|
||||
Page GetCurrentPage() const;
|
||||
|
||||
ThemeMetric<int> NUM_ICON_PARTS;
|
||||
ThemeMetric<int> NUM_PREVIEW_PARTS;
|
||||
ThemeMetric<int> NUM_CURSOR_PARTS;
|
||||
ThemeMetric<bool> SHOW_ICON;
|
||||
ThemeMetric<bool> SHOW_PREVIEW;
|
||||
ThemeMetric<bool> SHOW_CURSOR;
|
||||
ThemeMetric<bool> SHOW_SCROLLER;
|
||||
ThemeMetric<bool> SHARED_PREVIEW_AND_CURSOR;
|
||||
ThemeMetric<int> NUM_CHOICES_ON_PAGE_1;
|
||||
ThemeMetric2D<float> CURSOR_OFFSET_X_FROM_ICON;
|
||||
ThemeMetric2D<float> CURSOR_OFFSET_Y_FROM_ICON;
|
||||
ThemeMetric1D<float> CURSOR_OFFSET_X_FROM_ICON;
|
||||
ThemeMetric1D<float> CURSOR_OFFSET_Y_FROM_ICON;
|
||||
ThemeMetric<bool> OVERRIDE_LOCK_INPUT_SECONDS;
|
||||
ThemeMetric<float> LOCK_INPUT_SECONDS;
|
||||
ThemeMetric<float> PRE_SWITCH_PAGE_SECONDS;
|
||||
@@ -54,7 +52,6 @@ protected:
|
||||
ThemeMetric<bool> WRAP_SCROLLER;
|
||||
ThemeMetric<bool> SCROLLER_FAST_CATCHUP;
|
||||
ThemeMetric<bool> ALLOW_REPEATING_INPUT;
|
||||
ThemeMetric<bool> SHOW_SCROLLER;
|
||||
ThemeMetric<float> SCROLLER_SECONDS_PER_ITEM;
|
||||
ThemeMetric<float> SCROLLER_NUM_ITEMS_TO_DRAW;
|
||||
ThemeMetric<CString> SCROLLER_TRANSFORM;
|
||||
@@ -72,17 +69,17 @@ protected:
|
||||
float DoMenuStart( PlayerNumber pn );
|
||||
virtual bool ProcessMenuStart( PlayerNumber pn ) { return true; }
|
||||
|
||||
float GetCursorX( PlayerNumber pn, int iPartIndex );
|
||||
float GetCursorY( PlayerNumber pn, int iPartIndex );
|
||||
float GetCursorX( PlayerNumber pn );
|
||||
float GetCursorY( PlayerNumber pn );
|
||||
|
||||
AutoActor m_sprExplanation[NUM_PAGES];
|
||||
AutoActor m_sprMore[NUM_PAGES];
|
||||
// icon is the piece shared, per-choice piece
|
||||
AutoActor m_sprIcon[MAX_ICON_PARTS][MAX_CHOICES];
|
||||
AutoActor m_sprIcon[MAX_CHOICES];
|
||||
// preview is per-choice, per-player piece
|
||||
AutoActor m_sprPreview[MAX_PREVIEW_PARTS][MAX_CHOICES][NUM_PLAYERS];
|
||||
AutoActor m_sprPreview[MAX_CHOICES][NUM_PLAYERS];
|
||||
// cursor is the per-player that's shared by all choices
|
||||
AutoActor m_sprCursor[MAX_CURSOR_PARTS][NUM_PLAYERS];
|
||||
AutoActor m_sprCursor[NUM_PLAYERS];
|
||||
// scroll is the per-player, per-choice piece that's scrolled
|
||||
AutoActor m_sprScroll[MAX_CHOICES][NUM_PLAYERS];
|
||||
ActorScroller m_Scroller[NUM_PLAYERS];
|
||||
|
||||
Reference in New Issue
Block a user