per-player explanation text on options screens
This commit is contained in:
@@ -1768,8 +1768,12 @@ ItemsStartX=160
|
|||||||
ItemsGapX=14
|
ItemsGapX=14
|
||||||
ItemsStartY=88
|
ItemsStartY=88
|
||||||
ItemsSpacingY=34
|
ItemsSpacingY=34
|
||||||
ExplanationX=320
|
ExplanationP1X=180
|
||||||
ExplanationY=412
|
ExplanationP1Y=412
|
||||||
|
ExplanationP2X=460
|
||||||
|
ExplanationP2Y=412
|
||||||
|
ExplanationTogetherX=320
|
||||||
|
ExplanationTogetherY=412
|
||||||
ExplanationZoom=0.5
|
ExplanationZoom=0.5
|
||||||
ColorSelected=1,1,1,1 // normal
|
ColorSelected=1,1,1,1 // normal
|
||||||
ColorNotSelected=0.5,0.5,0.5,1 // grayed
|
ColorNotSelected=0.5,0.5,0.5,1 // grayed
|
||||||
@@ -2728,6 +2732,23 @@ Line13=list,Profile Options;title,;
|
|||||||
Line14=list,Reload Songs/Courses;title,;
|
Line14=list,Reload Songs/Courses;title,;
|
||||||
Line15=list,Test Input;title,;
|
Line15=list,Test Input;title,;
|
||||||
|
|
||||||
|
AppearanceOptions=
|
||||||
|
AutogenOptions=
|
||||||
|
BackgroundOptions=
|
||||||
|
Bookkeeping=
|
||||||
|
CenterImage=
|
||||||
|
CoinOptions=
|
||||||
|
ConfigKey/JoyMappings=
|
||||||
|
InputOptions=
|
||||||
|
GameplayOptions=
|
||||||
|
GraphicOptions=
|
||||||
|
MachineOptions=
|
||||||
|
SoundOptions=
|
||||||
|
ProfileOptions=
|
||||||
|
ReloadSongs/Courses=
|
||||||
|
TestInput=
|
||||||
|
|
||||||
|
|
||||||
[TextBanner]
|
[TextBanner]
|
||||||
TitleHorizX=-90
|
TitleHorizX=-90
|
||||||
SubTitleHorizX=-90
|
SubTitleHorizX=-90
|
||||||
@@ -2784,6 +2805,20 @@ OptionMenuFlags=rows,1;together
|
|||||||
Line1=conf,Game
|
Line1=conf,Game
|
||||||
|
|
||||||
[ScreenPlayerOptions]
|
[ScreenPlayerOptions]
|
||||||
|
Speed=
|
||||||
|
Acceleration=
|
||||||
|
Effect=
|
||||||
|
Appearance=
|
||||||
|
Turn=
|
||||||
|
Transform=
|
||||||
|
Scroll=
|
||||||
|
NoteSkins=
|
||||||
|
Holds=
|
||||||
|
Hide=
|
||||||
|
Persp=
|
||||||
|
Steps=
|
||||||
|
Characters=
|
||||||
|
|
||||||
PrevScreenArcade=ScreenSelectMusic
|
PrevScreenArcade=ScreenSelectMusic
|
||||||
PrevScreenNonstop=ScreenSelectCourse
|
PrevScreenNonstop=ScreenSelectCourse
|
||||||
PrevScreenOni=ScreenSelectCourse
|
PrevScreenOni=ScreenSelectCourse
|
||||||
|
|||||||
@@ -23,22 +23,25 @@
|
|||||||
|
|
||||||
const float ITEM_X[NUM_PLAYERS] = { 260, 420 };
|
const float ITEM_X[NUM_PLAYERS] = { 260, 420 };
|
||||||
|
|
||||||
#define ICONS_X( p ) THEME->GetMetricF("ScreenOptions",ssprintf("IconsP%dX",p+1))
|
#define ICONS_X( p ) THEME->GetMetricF("ScreenOptions",ssprintf("IconsP%dX",p+1))
|
||||||
#define ARROWS_X THEME->GetMetricF("ScreenOptions","ArrowsX")
|
#define ARROWS_X THEME->GetMetricF("ScreenOptions","ArrowsX")
|
||||||
#define LABELS_X THEME->GetMetricF("ScreenOptions","LabelsX")
|
#define LABELS_X THEME->GetMetricF("ScreenOptions","LabelsX")
|
||||||
#define LABELS_ZOOM THEME->GetMetricF("ScreenOptions","LabelsZoom")
|
#define LABELS_ZOOM THEME->GetMetricF("ScreenOptions","LabelsZoom")
|
||||||
#define LABELS_H_ALIGN THEME->GetMetricI("ScreenOptions","LabelsHAlign")
|
#define LABELS_H_ALIGN THEME->GetMetricI("ScreenOptions","LabelsHAlign")
|
||||||
#define ITEMS_ZOOM THEME->GetMetricF("ScreenOptions","ItemsZoom")
|
#define ITEMS_ZOOM THEME->GetMetricF("ScreenOptions","ItemsZoom")
|
||||||
#define ITEMS_START_X THEME->GetMetricF("ScreenOptions","ItemsStartX")
|
#define ITEMS_START_X THEME->GetMetricF("ScreenOptions","ItemsStartX")
|
||||||
#define ITEMS_GAP_X THEME->GetMetricF("ScreenOptions","ItemsGapX")
|
#define ITEMS_GAP_X THEME->GetMetricF("ScreenOptions","ItemsGapX")
|
||||||
#define ITEMS_START_Y THEME->GetMetricF("ScreenOptions","ItemsStartY")
|
#define ITEMS_START_Y THEME->GetMetricF("ScreenOptions","ItemsStartY")
|
||||||
#define ITEMS_SPACING_Y THEME->GetMetricF("ScreenOptions","ItemsSpacingY")
|
#define ITEMS_SPACING_Y THEME->GetMetricF("ScreenOptions","ItemsSpacingY")
|
||||||
#define EXPLANATION_X THEME->GetMetricF("ScreenOptions","ExplanationX")
|
#define EXPLANATION_X(p) THEME->GetMetricF("ScreenOptions",ssprintf("ExplanationP%dX",p+1))
|
||||||
#define EXPLANATION_Y THEME->GetMetricF("ScreenOptions","ExplanationY")
|
#define EXPLANATION_Y(p) THEME->GetMetricF("ScreenOptions",ssprintf("ExplanationP%dY",p+1))
|
||||||
#define EXPLANATION_ZOOM THEME->GetMetricF("ScreenOptions","ExplanationZoom")
|
#define EXPLANATION_TOGETHER_X THEME->GetMetricF("ScreenOptions","ExplanationTogetherX")
|
||||||
#define COLOR_SELECTED THEME->GetMetricC("ScreenOptions","ColorSelected")
|
#define EXPLANATION_TOGETHER_Y THEME->GetMetricF("ScreenOptions","ExplanationTogetherY")
|
||||||
#define COLOR_NOT_SELECTED THEME->GetMetricC("ScreenOptions","ColorNotSelected")
|
#define ITEMS_SPACING_Y THEME->GetMetricF("ScreenOptions","ItemsSpacingY")
|
||||||
#define NUM_SHOWN_ITEMS THEME->GetMetricI("ScreenOptions","NumShownItems")
|
#define EXPLANATION_ZOOM THEME->GetMetricF("ScreenOptions","ExplanationZoom")
|
||||||
|
#define COLOR_SELECTED THEME->GetMetricC("ScreenOptions","ColorSelected")
|
||||||
|
#define COLOR_NOT_SELECTED THEME->GetMetricC("ScreenOptions","ColorNotSelected")
|
||||||
|
#define NUM_SHOWN_ITEMS THEME->GetMetricI("ScreenOptions","NumShownItems")
|
||||||
|
|
||||||
ScreenOptions::ScreenOptions( CString sClassName ) : Screen(sClassName)
|
ScreenOptions::ScreenOptions( CString sClassName ) : Screen(sClassName)
|
||||||
{
|
{
|
||||||
@@ -73,14 +76,13 @@ ScreenOptions::ScreenOptions( CString sClassName ) : Screen(sClassName)
|
|||||||
memset(&m_bRowIsLong, 0, sizeof(m_bRowIsLong));
|
memset(&m_bRowIsLong, 0, sizeof(m_bRowIsLong));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenOptions::Init( InputMode im, OptionRow OptionRows[], int iNumOptionLines, bool bLoadExplanations )
|
void ScreenOptions::Init( InputMode im, OptionRow OptionRows[], int iNumOptionLines )
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenOptions::Set()" );
|
LOG->Trace( "ScreenOptions::Set()" );
|
||||||
|
|
||||||
m_InputMode = im;
|
m_InputMode = im;
|
||||||
m_OptionRow = OptionRows;
|
m_OptionRow = OptionRows;
|
||||||
m_iNumOptionRows = iNumOptionLines;
|
m_iNumOptionRows = iNumOptionLines;
|
||||||
m_bLoadExplanations = bLoadExplanations;
|
|
||||||
|
|
||||||
this->ImportOptions();
|
this->ImportOptions();
|
||||||
|
|
||||||
@@ -206,11 +208,41 @@ void ScreenOptions::Init( InputMode im, OptionRow OptionRows[], int iNumOptionLi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add explanation here so it appears on top
|
// add explanation here so it appears on top
|
||||||
m_textExplanation.LoadFromFont( THEME->GetPathToF("ScreenOptions explanation") );
|
switch( m_InputMode )
|
||||||
m_textExplanation.SetXY( EXPLANATION_X, EXPLANATION_Y );
|
{
|
||||||
m_textExplanation.SetZoom( EXPLANATION_ZOOM );
|
case INPUTMODE_INDIVIDUAL:
|
||||||
m_textExplanation.SetShadowLength( 0 );
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
m_framePage.AddChild( &m_textExplanation );
|
{
|
||||||
|
m_textExplanation[p].LoadFromFont( THEME->GetPathToF("ScreenOptions explanation") );
|
||||||
|
m_textExplanation[p].SetXY( EXPLANATION_X(p), EXPLANATION_Y(p) );
|
||||||
|
m_textExplanation[p].SetZoom( EXPLANATION_ZOOM );
|
||||||
|
m_textExplanation[p].SetShadowLength( 0 );
|
||||||
|
m_framePage.AddChild( &m_textExplanation[p] );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case INPUTMODE_TOGETHER:
|
||||||
|
m_textExplanation[0].LoadFromFont( THEME->GetPathToF("ScreenOptions explanation") );
|
||||||
|
m_textExplanation[0].SetXY( EXPLANATION_TOGETHER_X, EXPLANATION_TOGETHER_Y );
|
||||||
|
m_textExplanation[0].SetZoom( EXPLANATION_ZOOM );
|
||||||
|
m_textExplanation[0].SetShadowLength( 0 );
|
||||||
|
m_framePage.AddChild( &m_textExplanation[0] );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// poke once at all the explanation metrics so that we catch missing ones early
|
||||||
|
for( r=0; r<m_iNumOptionRows; r++ ) // foreach line
|
||||||
|
{
|
||||||
|
CString sLineName = m_OptionRow[r].name;
|
||||||
|
if( sLineName=="" )
|
||||||
|
sLineName = m_OptionRow[r].choices[0];
|
||||||
|
sLineName.Replace("\n-","");
|
||||||
|
sLineName.Replace("\n","");
|
||||||
|
sLineName.Replace(" ","");
|
||||||
|
CString sExplanation = THEME->GetMetric(m_sName,sLineName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
|
|
||||||
@@ -728,24 +760,40 @@ void ScreenOptions::OnChange()
|
|||||||
PositionIcons();
|
PositionIcons();
|
||||||
UpdateEnabledDisabled();
|
UpdateEnabledDisabled();
|
||||||
|
|
||||||
for( int pn=0; pn<NUM_PLAYERS; pn++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
TweenCursor( (PlayerNumber)pn );
|
|
||||||
|
|
||||||
int iCurRow = m_iCurrentRow[PLAYER_1];
|
|
||||||
|
|
||||||
bool bIsExitRow = iCurRow == m_iNumOptionRows;
|
|
||||||
|
|
||||||
if( !bIsExitRow && m_bLoadExplanations )
|
|
||||||
{
|
{
|
||||||
CString sLineName = m_OptionRow[iCurRow].name;
|
TweenCursor( (PlayerNumber)p );
|
||||||
if( sLineName=="" )
|
|
||||||
sLineName = m_OptionRow[iCurRow].choices[0];
|
int iCurRow = m_iCurrentRow[p];
|
||||||
sLineName.Replace("\n","");
|
|
||||||
sLineName.Replace(" ","");
|
bool bIsExitRow = iCurRow == m_iNumOptionRows;
|
||||||
m_textExplanation.SetText( THEME->GetMetric(m_sName,sLineName) );
|
|
||||||
|
BitmapText *pText = NULL;
|
||||||
|
switch( m_InputMode )
|
||||||
|
{
|
||||||
|
case INPUTMODE_INDIVIDUAL:
|
||||||
|
pText = &m_textExplanation[p];
|
||||||
|
break;
|
||||||
|
case INPUTMODE_TOGETHER:
|
||||||
|
pText = &m_textExplanation[0];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( bIsExitRow )
|
||||||
|
{
|
||||||
|
pText->SetText( "" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CString sLineName = m_OptionRow[iCurRow].name;
|
||||||
|
if( sLineName=="" )
|
||||||
|
sLineName = m_OptionRow[iCurRow].choices[0];
|
||||||
|
sLineName.Replace("\n-","");
|
||||||
|
sLineName.Replace("\n","");
|
||||||
|
sLineName.Replace(" ","");
|
||||||
|
pText->SetText( THEME->GetMetric(m_sName,sLineName) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
m_textExplanation.SetText( "" );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class ScreenOptions : public Screen
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenOptions( CString sClassName );
|
ScreenOptions( CString sClassName );
|
||||||
void Init( InputMode im, OptionRow OptionRow[], int iNumOptionLines, bool bLoadExplanations );
|
void Init( InputMode im, OptionRow OptionRow[], int iNumOptionLines );
|
||||||
virtual ~ScreenOptions();
|
virtual ~ScreenOptions();
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
@@ -101,7 +101,6 @@ protected: // derived classes need access to these
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
InputMode m_InputMode;
|
InputMode m_InputMode;
|
||||||
bool m_bLoadExplanations;
|
|
||||||
|
|
||||||
int m_iNumOptionRows;
|
int m_iNumOptionRows;
|
||||||
|
|
||||||
@@ -122,7 +121,7 @@ private:
|
|||||||
OptionIcon m_OptionIcons[NUM_PLAYERS][MAX_OPTION_LINES];
|
OptionIcon m_OptionIcons[NUM_PLAYERS][MAX_OPTION_LINES];
|
||||||
OptionsCursor m_Highlight[NUM_PLAYERS];
|
OptionsCursor m_Highlight[NUM_PLAYERS];
|
||||||
|
|
||||||
BitmapText m_textExplanation;
|
BitmapText m_textExplanation[NUM_PLAYERS];
|
||||||
|
|
||||||
RageSound m_SoundChangeCol;
|
RageSound m_SoundChangeCol;
|
||||||
RageSound m_SoundNextRow;
|
RageSound m_SoundNextRow;
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ):
|
|||||||
|
|
||||||
ASSERT( (int) OptionRowHandlers.size() == NumRows );
|
ASSERT( (int) OptionRowHandlers.size() == NumRows );
|
||||||
|
|
||||||
Init( im, m_OptionRowAlloc, NumRows, Explanations );
|
Init( im, m_OptionRowAlloc, NumRows );
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenOptionsMaster::~ScreenOptionsMaster()
|
ScreenOptionsMaster::~ScreenOptionsMaster()
|
||||||
|
|||||||
@@ -68,20 +68,19 @@ ScreenProfileOptions::ScreenProfileOptions( CString sClassName ) : ScreenOptions
|
|||||||
PROFILEMAN->GetMachineProfileNames( g_ProfileOptionsLines[PO_RENAME_].choices );
|
PROFILEMAN->GetMachineProfileNames( g_ProfileOptionsLines[PO_RENAME_].choices );
|
||||||
|
|
||||||
if( PREFSMAN->m_sMemoryCardDir[PLAYER_1].empty() )
|
if( PREFSMAN->m_sMemoryCardDir[PLAYER_1].empty() )
|
||||||
g_ProfileOptionsLines[PO_CARD_DIR_1].choices[0] = "-NONE. SPECIFY IN INI-";
|
g_ProfileOptionsLines[PO_CARD_DIR_1].choices[0] = "-NOT SET IN INI-";
|
||||||
else
|
else
|
||||||
g_ProfileOptionsLines[PO_CARD_DIR_1].choices[0] = PREFSMAN->m_sMemoryCardDir[PLAYER_1];
|
g_ProfileOptionsLines[PO_CARD_DIR_1].choices[0] = PREFSMAN->m_sMemoryCardDir[PLAYER_1];
|
||||||
|
|
||||||
if( PREFSMAN->m_sMemoryCardDir[PLAYER_2].empty() )
|
if( PREFSMAN->m_sMemoryCardDir[PLAYER_2].empty() )
|
||||||
g_ProfileOptionsLines[PO_CARD_DIR_2].choices[0] = "-NONE. SPECIFY IN INI-";
|
g_ProfileOptionsLines[PO_CARD_DIR_2].choices[0] = "-NOT SET IN INI-";
|
||||||
else
|
else
|
||||||
g_ProfileOptionsLines[PO_CARD_DIR_2].choices[0] = PREFSMAN->m_sMemoryCardDir[PLAYER_2];
|
g_ProfileOptionsLines[PO_CARD_DIR_2].choices[0] = PREFSMAN->m_sMemoryCardDir[PLAYER_2];
|
||||||
|
|
||||||
Init(
|
Init(
|
||||||
INPUTMODE_TOGETHER,
|
INPUTMODE_TOGETHER,
|
||||||
g_ProfileOptionsLines,
|
g_ProfileOptionsLines,
|
||||||
NUM_PROFILE_OPTIONS_LINES,
|
NUM_PROFILE_OPTIONS_LINES );
|
||||||
true );
|
|
||||||
m_Menu.m_MenuTimer.Disable();
|
m_Menu.m_MenuTimer.Disable();
|
||||||
|
|
||||||
SOUND->PlayMusic( THEME->GetPathToS("ScreenMachineOptions music") );
|
SOUND->PlayMusic( THEME->GetPathToS("ScreenMachineOptions music") );
|
||||||
|
|||||||
@@ -43,8 +43,7 @@ ScreenRaveOptions::ScreenRaveOptions( CString sClassName ): ScreenOptions( sClas
|
|||||||
Init(
|
Init(
|
||||||
INPUTMODE_TOGETHER,
|
INPUTMODE_TOGETHER,
|
||||||
g_RaveOptionsLines,
|
g_RaveOptionsLines,
|
||||||
GAMESTATE->AnyPlayersAreCpu()? 2 : 1,
|
GAMESTATE->AnyPlayersAreCpu()? 2 : 1 );
|
||||||
false );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenRaveOptions::ImportOptions()
|
void ScreenRaveOptions::ImportOptions()
|
||||||
|
|||||||
@@ -243,11 +243,9 @@ try_element_again:
|
|||||||
"'%s/%s/%s'. Please remove all but one of these matches.",
|
"'%s/%s/%s'. Please remove all but one of these matches.",
|
||||||
sThemeName.c_str(), sCategory.c_str(), sFileName.c_str() );
|
sThemeName.c_str(), sCategory.c_str(), sFileName.c_str() );
|
||||||
|
|
||||||
#if defined(WIND32)
|
|
||||||
if( DISPLAY->IsWindowed() )
|
if( DISPLAY->IsWindowed() )
|
||||||
if( ArchHooks::retry == HOOKS->MessageBoxAbortRetryIgnore(message) )
|
if( ArchHooks::retry == HOOKS->MessageBoxRetryCancel(message) )
|
||||||
goto try_element_again;
|
goto try_element_again;
|
||||||
#endif
|
|
||||||
|
|
||||||
RageException::Throw( message );
|
RageException::Throw( message );
|
||||||
}
|
}
|
||||||
@@ -399,8 +397,8 @@ void ThemeManager::ReloadMetricsIfNecessary()
|
|||||||
if( m_uHashForCurThemeMetrics != GetHashForFile(sCurMetricPath) ||
|
if( m_uHashForCurThemeMetrics != GetHashForFile(sCurMetricPath) ||
|
||||||
m_uHashForBaseThemeMetrics != GetHashForFile(sDefaultMetricPath) )
|
m_uHashForBaseThemeMetrics != GetHashForFile(sDefaultMetricPath) )
|
||||||
{
|
{
|
||||||
SCREENMAN->SystemMessage( "Reloading metrics" );
|
|
||||||
SwitchThemeAndLanguage(m_sCurThemeName, m_sCurLanguage); // force a reload of the metrics cache
|
SwitchThemeAndLanguage(m_sCurThemeName, m_sCurLanguage); // force a reload of the metrics cache
|
||||||
|
SCREENMAN->SystemMessage( "Reloaded metrics" );
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -428,6 +426,7 @@ try_metric_again:
|
|||||||
switch( HOOKS->MessageBoxRetryCancel(sMessage) )
|
switch( HOOKS->MessageBoxRetryCancel(sMessage) )
|
||||||
{
|
{
|
||||||
case ArchHooks::retry:
|
case ArchHooks::retry:
|
||||||
|
FlushDirCache();
|
||||||
ReloadMetricsIfNecessary();
|
ReloadMetricsIfNecessary();
|
||||||
goto try_metric_again;
|
goto try_metric_again;
|
||||||
case ArchHooks::cancel:
|
case ArchHooks::cancel:
|
||||||
|
|||||||
Reference in New Issue
Block a user