add separate explanation name so that rows with no title can still have an explanation
This commit is contained in:
@@ -37,6 +37,7 @@ LayoutType StringToLayoutType( const CString& s );
|
|||||||
struct OptionRowDefinition
|
struct OptionRowDefinition
|
||||||
{
|
{
|
||||||
CString m_sName;
|
CString m_sName;
|
||||||
|
CString m_sExplanationName;
|
||||||
bool m_bOneChoiceForAllPlayers;
|
bool m_bOneChoiceForAllPlayers;
|
||||||
SelectType m_selectType;
|
SelectType m_selectType;
|
||||||
LayoutType m_layoutType;
|
LayoutType m_layoutType;
|
||||||
@@ -57,6 +58,7 @@ struct OptionRowDefinition
|
|||||||
void Init()
|
void Init()
|
||||||
{
|
{
|
||||||
m_sName = "";
|
m_sName = "";
|
||||||
|
m_sExplanationName = "";
|
||||||
m_bOneChoiceForAllPlayers = false;
|
m_bOneChoiceForAllPlayers = false;
|
||||||
m_selectType = SELECT_ONE;
|
m_selectType = SELECT_ONE;
|
||||||
m_layoutType = LAYOUT_SHOW_ALL_IN_ROW;
|
m_layoutType = LAYOUT_SHOW_ALL_IN_ROW;
|
||||||
|
|||||||
@@ -389,10 +389,12 @@ CString ScreenOptions::GetExplanationText( int iRow ) const
|
|||||||
if( !bShowExplanations )
|
if( !bShowExplanations )
|
||||||
return CString();
|
return CString();
|
||||||
|
|
||||||
CString sLineName = row.GetRowDef().m_sName;
|
CString sExplanationName = row.GetRowDef().m_sExplanationName;
|
||||||
ASSERT( !sLineName.empty() );
|
if( sExplanationName.empty() )
|
||||||
|
sExplanationName = row.GetRowDef().m_sName;
|
||||||
|
ASSERT( !sExplanationName.empty() );
|
||||||
|
|
||||||
return OPTION_EXPLANATION(sLineName);
|
return OPTION_EXPLANATION(sExplanationName);
|
||||||
}
|
}
|
||||||
|
|
||||||
BitmapText &ScreenOptions::GetTextItemForRow( PlayerNumber pn, int iRow, int iChoiceOnRow )
|
BitmapText &ScreenOptions::GetTextItemForRow( PlayerNumber pn, int iRow, int iChoiceOnRow )
|
||||||
|
|||||||
@@ -66,8 +66,6 @@ ScreenOptionsManageEditSteps::ScreenOptionsManageEditSteps( CString sName ) : Sc
|
|||||||
void ScreenOptionsManageEditSteps::Init()
|
void ScreenOptionsManageEditSteps::Init()
|
||||||
{
|
{
|
||||||
ScreenOptions::Init();
|
ScreenOptions::Init();
|
||||||
|
|
||||||
EDIT_MODE.Load(m_sName,"EditMode");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenOptionsManageEditSteps::BeginScreen()
|
void ScreenOptionsManageEditSteps::BeginScreen()
|
||||||
@@ -83,8 +81,9 @@ void ScreenOptionsManageEditSteps::BeginScreen()
|
|||||||
{
|
{
|
||||||
def.m_sName = "";
|
def.m_sName = "";
|
||||||
def.m_bAllowThemeTitle = false;
|
def.m_bAllowThemeTitle = false;
|
||||||
|
def.m_sExplanationName = "Create New Edit Steps";
|
||||||
def.m_vsChoices.clear();
|
def.m_vsChoices.clear();
|
||||||
def.m_vsChoices.push_back( "Create New" );
|
def.m_vsChoices.push_back( "Create New Edit Steps" );
|
||||||
vDefs.push_back( def );
|
vDefs.push_back( def );
|
||||||
vHands.push_back( NULL );
|
vHands.push_back( NULL );
|
||||||
iIndex++;
|
iIndex++;
|
||||||
@@ -94,11 +93,12 @@ void ScreenOptionsManageEditSteps::BeginScreen()
|
|||||||
|
|
||||||
FOREACH_CONST( Steps*, m_vpSteps, s )
|
FOREACH_CONST( Steps*, m_vpSteps, s )
|
||||||
{
|
{
|
||||||
def.m_sName = GAMEMAN->StepsTypeToThemedString( (*s)->m_StepsType );
|
CString sType = GAMEMAN->StepsTypeToThemedString( (*s)->m_StepsType );
|
||||||
def.m_bAllowThemeTitle = false;
|
def.m_sName = sType;
|
||||||
|
def.m_sExplanationName = "Edit Steps";
|
||||||
|
def.m_bAllowThemeItems = false;
|
||||||
def.m_vsChoices.clear();
|
def.m_vsChoices.clear();
|
||||||
def.m_vsChoices.push_back( (*s)->GetDescription() );
|
def.m_vsChoices.push_back( (*s)->GetDescription() );
|
||||||
def.m_bAllowThemeItems = false;
|
|
||||||
vDefs.push_back( def );
|
vDefs.push_back( def );
|
||||||
vHands.push_back( NULL );
|
vHands.push_back( NULL );
|
||||||
iIndex++;
|
iIndex++;
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ protected:
|
|||||||
Steps *GetStepsWithFocus() const;
|
Steps *GetStepsWithFocus() const;
|
||||||
|
|
||||||
vector<Steps*> m_vpSteps;
|
vector<Steps*> m_vpSteps;
|
||||||
|
|
||||||
ThemeMetricEnum<EditMode> EDIT_MODE;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user