Added description to ScreenOptions. Making a whole separate ScreenPreferences turned out to be a pain.
This commit is contained in:
@@ -35,10 +35,10 @@ enum {
|
||||
};
|
||||
|
||||
OptionRowData g_AppearanceOptionsLines[NUM_APPEARANCE_OPTIONS_LINES] = {
|
||||
{ "Announ\n-cer", 1, {"OFF"} }, // fill this in on ImportOptions()
|
||||
{ "Announcer", 1, {"OFF"} }, // fill this in on ImportOptions()
|
||||
{ "Theme", 0, {""} }, // fill this in on ImportOptions()
|
||||
{ "Note\nSkin", 0, {""} }, // fill this in on ImportOptions()
|
||||
{ "How To\nPlay", 2, {"OFF","ON"} },
|
||||
{ "How To\nPlay", 2, {"SKIP","SHOW"} },
|
||||
};
|
||||
|
||||
ScreenAppearanceOptions::ScreenAppearanceOptions() :
|
||||
@@ -50,6 +50,15 @@ ScreenAppearanceOptions::ScreenAppearanceOptions() :
|
||||
{
|
||||
LOG->Trace( "ScreenAppearanceOptions::ScreenAppearanceOptions()" );
|
||||
|
||||
// fill g_InputOptionsLines with explanation text
|
||||
for( int i=0; i<NUM_APPEARANCE_OPTIONS_LINES; i++ )
|
||||
{
|
||||
CString sLineName = g_AppearanceOptionsLines[i].szTitle;
|
||||
sLineName.Replace("\n","");
|
||||
sLineName.Replace(" ","");
|
||||
strcpy( g_AppearanceOptionsLines[i].szExplanation, THEME->GetMetric("ScreenAppearanceOptions",sLineName) );
|
||||
}
|
||||
|
||||
Init(
|
||||
INPUTMODE_BOTH,
|
||||
g_AppearanceOptionsLines,
|
||||
|
||||
@@ -28,7 +28,6 @@ enum {
|
||||
GO_DISPLAY_RESOLUTION,
|
||||
GO_TEXTURE_RESOLUTION,
|
||||
GO_REFRESH_RATE,
|
||||
GO_SHOWSTATS,
|
||||
GO_BGMODE,
|
||||
GO_BGBRIGHTNESS,
|
||||
GO_MOVIEDECODEMS,
|
||||
@@ -37,16 +36,15 @@ enum {
|
||||
NUM_GRAPHIC_OPTIONS_LINES
|
||||
};
|
||||
OptionRowData g_GraphicOptionsLines[NUM_GRAPHIC_OPTIONS_LINES] = {
|
||||
{ "Display", 2, {"FULLSCREEN", "WINDOWED"} },
|
||||
{ "Display\nRes", 7, {"320","400","512","640","800","1024","1280"} },
|
||||
{ "Texture\nRes", 3, {"256","512","1024"} },
|
||||
{ "Refresh\nRate", 11, {"DEFAULT","MAX","60","70","72","75","80","85","90","100","120"} },
|
||||
{ "Show\nStats", 2, {"OFF","ON"} },
|
||||
{ "BG\nMode", 4, {"OFF","ANIMATIONS","VISUALIZATIONS","RANDOM MOVIES"} },
|
||||
{ "BG\nBrightness", 11, {"0%","10%","20%","30%","40%","50%","60%","70%","80%","90%","100%"} },
|
||||
{ "Movie\nDecode", 4, {"1ms","2ms","3ms","4ms"} },
|
||||
{ "BG For\nBanner", 2, {"NO", "YES (slow)"} },
|
||||
{ "Wait for\nVsync",2, {"NO", "YES"} },
|
||||
{ "Display\nMode", 2, {"FULLSCREEN", "WINDOWED"} },
|
||||
{ "Display\nResolution", 7, {"320","400","512","640","800","1024","1280"} },
|
||||
{ "Texture\nResolution", 3, {"256","512","1024"} },
|
||||
{ "Refresh\nRate", 11, {"DEFAULT","MAX","60","70","72","75","80","85","90","100","120"} },
|
||||
{ "Background\nMode", 4, {"OFF","ANIMATIONS","VISUALIZATIONS","RANDOM MOVIES"} },
|
||||
{ "Background\nBrightness", 11, {"0%","10%","20%","30%","40%","50%","60%","70%","80%","90%","100%"} },
|
||||
{ "Movie\nDecode", 4, {"1ms","2ms","3ms","4ms"} },
|
||||
{ "BG For\nBanner", 2, {"NO", "YES (slow)"} },
|
||||
{ "Wait For\nVsync", 2, {"NO", "YES"} },
|
||||
};
|
||||
|
||||
static const int HorizRes[] = {
|
||||
@@ -65,6 +63,15 @@ ScreenGraphicOptions::ScreenGraphicOptions() :
|
||||
{
|
||||
LOG->Trace( "ScreenGraphicOptions::ScreenGraphicOptions()" );
|
||||
|
||||
// fill g_InputOptionsLines with explanation text
|
||||
for( int i=0; i<NUM_GRAPHIC_OPTIONS_LINES; i++ )
|
||||
{
|
||||
CString sLineName = g_GraphicOptionsLines[i].szTitle;
|
||||
sLineName.Replace("\n","");
|
||||
sLineName.Replace(" ","");
|
||||
strcpy( g_GraphicOptionsLines[i].szExplanation, THEME->GetMetric("ScreenGraphicOptions",sLineName) );
|
||||
}
|
||||
|
||||
Init(
|
||||
INPUTMODE_BOTH,
|
||||
g_GraphicOptionsLines,
|
||||
@@ -168,7 +175,6 @@ void ScreenGraphicOptions::ImportOptions()
|
||||
default: m_iSelectedOption[0][GO_REFRESH_RATE] = 1; break;
|
||||
}
|
||||
|
||||
m_iSelectedOption[0][GO_SHOWSTATS] = PREFSMAN->m_bShowStats ? 1:0;
|
||||
m_iSelectedOption[0][GO_BGMODE] = PREFSMAN->m_BackgroundMode;
|
||||
m_iSelectedOption[0][GO_BGBRIGHTNESS] = roundf( PREFSMAN->m_fBGBrightness*10 );
|
||||
m_iSelectedOption[0][GO_MOVIEDECODEMS] = PREFSMAN->m_iMovieDecodeMS-1;
|
||||
@@ -211,7 +217,6 @@ void ScreenGraphicOptions::ExportOptions()
|
||||
default: ASSERT(0); PREFSMAN->m_iRefreshRate = 0; break;
|
||||
}
|
||||
|
||||
PREFSMAN->m_bShowStats = m_iSelectedOption[0][GO_SHOWSTATS] == 1;
|
||||
PREFSMAN->m_BackgroundMode = PrefsManager::BackgroundMode( m_iSelectedOption[0][GO_BGMODE] );
|
||||
PREFSMAN->m_fBGBrightness = m_iSelectedOption[0][GO_BGBRIGHTNESS] / 10.0f;
|
||||
PREFSMAN->m_iMovieDecodeMS = m_iSelectedOption[0][GO_MOVIEDECODEMS]+1;
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "RageLog.h"
|
||||
|
||||
|
||||
|
||||
enum {
|
||||
IO_IGNORE_AXES = 0,
|
||||
IO_DEDICATED_MENU_BUTTONS,
|
||||
@@ -31,10 +30,11 @@ enum {
|
||||
IO_OPTIONS_NAVIGATION,
|
||||
NUM_INPUT_OPTIONS_LINES
|
||||
};
|
||||
|
||||
/* Hmm. Ignore JoyAxes and Back Delayed probably belong in "input options",
|
||||
* preferably alongside button configuration. */
|
||||
OptionRowData g_InputOptionsLines[NUM_INPUT_OPTIONS_LINES] = {
|
||||
{ "Ignore\nJoyAxes", 2, {"OFF","ON (for NTPad or DirectPad)"} },
|
||||
{ "Ignore\nJoy Axes", 2, {"OFF","ON (for NTPad or DirectPad)"} },
|
||||
{ "Menu\nButtons", 2, {"USE GAMEPLAY BUTTONS","ONLY DEDICATED BUTTONS"} },
|
||||
{ "AutoPlay", 2, {"OFF","ON"} },
|
||||
{ "Back\nDelayed", 2, {"INSTANT","HOLD"} },
|
||||
@@ -50,6 +50,15 @@ ScreenInputOptions::ScreenInputOptions() :
|
||||
{
|
||||
LOG->Trace( "ScreenInputOptions::ScreenInputOptions()" );
|
||||
|
||||
// fill g_InputOptionsLines with explanation text
|
||||
for( int i=0; i<NUM_INPUT_OPTIONS_LINES; i++ )
|
||||
{
|
||||
CString sLineName = g_InputOptionsLines[i].szTitle;
|
||||
sLineName.Replace("\n","");
|
||||
sLineName.Replace(" ","");
|
||||
strcpy( g_InputOptionsLines[i].szExplanation, THEME->GetMetric("ScreenInputOptions",sLineName) );
|
||||
}
|
||||
|
||||
Init(
|
||||
INPUTMODE_BOTH,
|
||||
g_InputOptionsLines,
|
||||
|
||||
@@ -30,6 +30,7 @@ enum {
|
||||
MO_JUDGE_DIFFICULTY,
|
||||
MO_LIFE_DIFFICULTY,
|
||||
MO_HIDDEN_SONGS,
|
||||
MO_SHOWSTATS,
|
||||
NUM_MACHINE_OPTIONS_LINES
|
||||
};
|
||||
/* Hmm. Ignore JoyAxes and Back Delayed probably belong in "input options",
|
||||
@@ -41,6 +42,7 @@ OptionRowData g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = {
|
||||
{ "Judge\nDifficulty", 8, {"1","2","3","4","5","6","7","8"} },
|
||||
{ "Life\nDifficulty", 7, {"1","2","3","4","5","6","7"} },
|
||||
{ "Hidden\nSongs", 2, {"OFF","ON"} },
|
||||
{ "Show\nStats", 2, {"OFF","ON"} },
|
||||
};
|
||||
|
||||
ScreenMachineOptions::ScreenMachineOptions() :
|
||||
@@ -52,6 +54,15 @@ ScreenMachineOptions::ScreenMachineOptions() :
|
||||
{
|
||||
LOG->Trace( "ScreenMachineOptions::ScreenMachineOptions()" );
|
||||
|
||||
// fill g_InputOptionsLines with explanation text
|
||||
for( int i=0; i<NUM_MACHINE_OPTIONS_LINES; i++ )
|
||||
{
|
||||
CString sLineName = g_MachineOptionsLines[i].szTitle;
|
||||
sLineName.Replace("\n","");
|
||||
sLineName.Replace(" ","");
|
||||
strcpy( g_MachineOptionsLines[i].szExplanation, THEME->GetMetric("ScreenMachineOptions",sLineName) );
|
||||
}
|
||||
|
||||
Init(
|
||||
INPUTMODE_BOTH,
|
||||
g_MachineOptionsLines,
|
||||
@@ -96,6 +107,8 @@ void ScreenMachineOptions::ImportOptions()
|
||||
else if( PREFSMAN->m_fLifeDifficultyScale == 0.60f ) m_iSelectedOption[0][MO_LIFE_DIFFICULTY] = 5;
|
||||
else if( PREFSMAN->m_fLifeDifficultyScale == 0.40f ) m_iSelectedOption[0][MO_LIFE_DIFFICULTY] = 6;
|
||||
else m_iSelectedOption[0][MO_LIFE_DIFFICULTY] = 3;
|
||||
|
||||
m_iSelectedOption[0][MO_SHOWSTATS] = PREFSMAN->m_bShowStats ? 1:0;
|
||||
}
|
||||
|
||||
void ScreenMachineOptions::ExportOptions()
|
||||
@@ -132,6 +145,7 @@ void ScreenMachineOptions::ExportOptions()
|
||||
default: ASSERT(0);
|
||||
}
|
||||
|
||||
PREFSMAN->m_bShowStats = m_iSelectedOption[0][MO_SHOWSTATS] == 1;
|
||||
}
|
||||
|
||||
void ScreenMachineOptions::GoToPrevState()
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
#define ITEMS_GAP_X THEME->GetMetricF("ScreenOptions","ItemsGapX")
|
||||
#define ITEMS_START_Y THEME->GetMetricF("ScreenOptions","ItemsStartY")
|
||||
#define ITEMS_SPACING_Y THEME->GetMetricF("ScreenOptions","ItemsSpacingY")
|
||||
#define EXPLANATION_X THEME->GetMetricF("ScreenOptions","ExplanationX")
|
||||
#define EXPLANATION_Y THEME->GetMetricF("ScreenOptions","ExplanationY")
|
||||
#define EXPLANATION_ZOOM THEME->GetMetricF("ScreenOptions","ExplanationZoom")
|
||||
#define HELP_TEXT THEME->GetMetric("ScreenOptions","HelpText")
|
||||
#define TIMER_SECONDS THEME->GetMetricI("ScreenOptions","TimerSeconds")
|
||||
#define COLOR_SELECTED THEME->GetMetricC("ScreenOptions","ColorSelected")
|
||||
@@ -66,7 +69,6 @@ ScreenOptions::ScreenOptions( CString sBackgroundPath, CString sPagePath, CStrin
|
||||
m_sprPage.SetXY( CENTER_X, CENTER_Y );
|
||||
m_framePage.AddChild( &m_sprPage );
|
||||
|
||||
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
m_iCurrentRow[p] = 0;
|
||||
@@ -137,6 +139,13 @@ void ScreenOptions::Init( InputMode im, OptionRowData OptionRowData[], int iNumO
|
||||
// TRICKY: Add one more item. This will be "EXIT"
|
||||
m_framePage.AddChild( &m_textOptions[i][0] );
|
||||
|
||||
// add explanation here so it appears on top
|
||||
m_textExplanation.LoadFromFont( THEME->GetPathTo("Fonts","options explanation") );
|
||||
m_textExplanation.SetXY( EXPLANATION_X, EXPLANATION_Y );
|
||||
m_textExplanation.SetZoom( EXPLANATION_ZOOM );
|
||||
m_textExplanation.SetShadowLength( 2 );
|
||||
m_framePage.AddChild( &m_textExplanation );
|
||||
|
||||
|
||||
InitOptionsText();
|
||||
PositionUnderlines();
|
||||
@@ -144,12 +153,12 @@ void ScreenOptions::Init( InputMode im, OptionRowData OptionRowData[], int iNumO
|
||||
RefreshIcons();
|
||||
PositionCursors();
|
||||
UpdateEnabledDisabled();
|
||||
OnChange();
|
||||
}
|
||||
|
||||
ScreenOptions::~ScreenOptions()
|
||||
{
|
||||
LOG->Trace( "ScreenOptions::~ScreenOptions()" );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -363,12 +372,12 @@ void ScreenOptions::UpdateEnabledDisabled()
|
||||
m_textOptions[i][j].SetDiffuse( bThisRowIsSelected ? colorSelected : colorNotSelected );
|
||||
}
|
||||
|
||||
bool bThisRowIsSelected = false;
|
||||
bool bThisRowIsSelectedByBoth = true;
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
if( GAMESTATE->IsPlayerEnabled(p) && m_iCurrentRow[p] == i )
|
||||
bThisRowIsSelected = true;
|
||||
m_textOptions[i][0].SetDiffuse( bThisRowIsSelected ? colorSelected : colorNotSelected );
|
||||
if( bThisRowIsSelected )
|
||||
if( GAMESTATE->IsPlayerEnabled(p) && m_iCurrentRow[p] != i )
|
||||
bThisRowIsSelectedByBoth = false;
|
||||
m_textOptions[i][0].SetDiffuse( bThisRowIsSelectedByBoth ? colorNotSelected : colorSelected );
|
||||
if( bThisRowIsSelectedByBoth )
|
||||
m_textOptions[i][0].SetEffectCamelion( 2.5, colorSelected, colorNotSelected );
|
||||
else
|
||||
m_textOptions[i][0].SetEffectNone();
|
||||
@@ -430,6 +439,12 @@ void ScreenOptions::OnChange()
|
||||
PositionUnderlines();
|
||||
RefreshIcons();
|
||||
UpdateEnabledDisabled();
|
||||
|
||||
int iCurRow = m_iCurrentRow[PLAYER_1];
|
||||
if( iCurRow < m_iNumOptionRows )
|
||||
m_textExplanation.SetText( m_OptionRowData[iCurRow].szExplanation );
|
||||
else
|
||||
m_textExplanation.SetText( "" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ struct OptionRowData {
|
||||
char szTitle[30];
|
||||
int iNumOptions;
|
||||
char szOptionsText[MAX_OPTIONS_PER_LINE][60];
|
||||
char szExplanation[2048];
|
||||
};
|
||||
|
||||
enum InputMode
|
||||
@@ -102,6 +103,8 @@ protected:
|
||||
OptionIcon m_OptionIcons[NUM_PLAYERS][MAX_OPTION_LINES];
|
||||
OptionsCursor m_Highlight[NUM_PLAYERS];
|
||||
|
||||
BitmapText m_textExplanation;
|
||||
|
||||
RageSoundSample m_SoundChangeCol;
|
||||
RageSoundSample m_SoundNextRow;
|
||||
RageSoundSample m_SoundPrevRow;
|
||||
|
||||
@@ -38,6 +38,7 @@ const CString CHOICE_TEXT[ScreenTitleMenu::NUM_TITLE_MENU_CHOICES] = {
|
||||
#define CHOICES_X THEME->GetMetricF("ScreenTitleMenu","ChoicesX")
|
||||
#define CHOICES_START_Y THEME->GetMetricF("ScreenTitleMenu","ChoicesStartY")
|
||||
#define CHOICES_SPACING_Y THEME->GetMetricF("ScreenTitleMenu","ChoicesSpacingY")
|
||||
#define CHOICES_SHADOW_LENGTH THEME->GetMetricF("ScreenTitleMenu","ChoicesShadowLength")
|
||||
#define HELP_X THEME->GetMetricF("ScreenTitleMenu","HelpX")
|
||||
#define HELP_Y THEME->GetMetricF("ScreenTitleMenu","HelpY")
|
||||
#define LOGO_X THEME->GetMetricF("ScreenTitleMenu","LogoX")
|
||||
@@ -144,7 +145,7 @@ ScreenTitleMenu::ScreenTitleMenu()
|
||||
m_textChoice[i].LoadFromFont( THEME->GetPathTo("Fonts","titlemenu") );
|
||||
m_textChoice[i].SetText( CHOICE_TEXT[i] );
|
||||
m_textChoice[i].SetXY( CHOICES_X, CHOICES_START_Y + i*CHOICES_SPACING_Y );
|
||||
m_textChoice[i].SetShadowLength( 5 );
|
||||
m_textChoice[i].SetShadowLength( CHOICES_SHADOW_LENGTH );
|
||||
this->AddChild( &m_textChoice[i] );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user