remove hard-coded cursor tween seconds

This commit is contained in:
Chris Danford
2005-04-20 23:02:37 +00:00
parent 6640b3fed6
commit e8ca958503
3 changed files with 5 additions and 4 deletions
+1
View File
@@ -2517,6 +2517,7 @@ ThemeTitles=1
ThemeItems=1 ThemeItems=1
IconsOnCommand=x,-30 IconsOnCommand=x,-30
AllowRepeatingChangeValueInput=0 AllowRepeatingChangeValueInput=0
CursorTweenSeconds=0.3
IconsP1X=SCREEN_CENTER_X-280 IconsP1X=SCREEN_CENTER_X-280
IconsP2X=SCREEN_CENTER_X+280 IconsP2X=SCREEN_CENTER_X+280
+3 -4
View File
@@ -60,8 +60,6 @@
* in player options menus, but it should in the options menu. * in player options menus, but it should in the options menu.
*/ */
const float TWEEN_SECONDS = 0.3f;
static CString ROW_Y_NAME( size_t r ) { return ssprintf("Row%dY",int(r+1)); } static CString ROW_Y_NAME( size_t r ) { return ssprintf("Row%dY",int(r+1)); }
static CString EXPLANATION_X_NAME( size_t p ) { return ssprintf("ExplanationP%dX",int(p+1)); } static CString EXPLANATION_X_NAME( size_t p ) { return ssprintf("ExplanationP%dX",int(p+1)); }
static CString EXPLANATION_Y_NAME( size_t p ) { return ssprintf("ExplanationP%dY",int(p+1)); } static CString EXPLANATION_Y_NAME( size_t p ) { return ssprintf("ExplanationP%dY",int(p+1)); }
@@ -93,7 +91,8 @@ ScreenOptions::ScreenOptions( CString sClassName ) : ScreenWithMenuElements(sCla
SEPARATE_EXIT_ROW (m_sName,"SeparateExitRow"), SEPARATE_EXIT_ROW (m_sName,"SeparateExitRow"),
SEPARATE_EXIT_ROW_Y (m_sName,"SeparateExitRowY"), SEPARATE_EXIT_ROW_Y (m_sName,"SeparateExitRowY"),
SHOW_EXPLANATIONS (m_sName,"ShowExplanations"), SHOW_EXPLANATIONS (m_sName,"ShowExplanations"),
ALLOW_REPEATING_CHANGE_VALUE_INPUT(m_sName,"AllowRepeatingChangeValueInput") ALLOW_REPEATING_CHANGE_VALUE_INPUT(m_sName,"AllowRepeatingChangeValueInput"),
CURSOR_TWEEN_SECONDS (m_sName,"CursorTweenSeconds")
{ {
m_fLockInputSecs = 0.0001f; // always lock for a tiny amount of time so that we throw away any queued inputs during the load. m_fLockInputSecs = 0.0001f; // always lock for a tiny amount of time so that we throw away any queued inputs during the load.
@@ -414,7 +413,7 @@ void ScreenOptions::TweenCursor( PlayerNumber pn )
if( cursor.GetDestX() != (float) iX || cursor.GetDestY() != (float) iY ) if( cursor.GetDestX() != (float) iX || cursor.GetDestY() != (float) iY )
{ {
cursor.StopTweening(); cursor.StopTweening();
cursor.BeginTweening( TWEEN_SECONDS ); cursor.BeginTweening( CURSOR_TWEEN_SECONDS );
cursor.SetXY( (float)iX, (float)iY ); cursor.SetXY( (float)iX, (float)iY );
} }
+1
View File
@@ -140,6 +140,7 @@ protected:
ThemeMetric<float> SEPARATE_EXIT_ROW_Y; ThemeMetric<float> SEPARATE_EXIT_ROW_Y;
ThemeMetric<bool> SHOW_EXPLANATIONS; ThemeMetric<bool> SHOW_EXPLANATIONS;
ThemeMetric<bool> ALLOW_REPEATING_CHANGE_VALUE_INPUT; ThemeMetric<bool> ALLOW_REPEATING_CHANGE_VALUE_INPUT;
ThemeMetric<float> CURSOR_TWEEN_SECONDS;
float m_fLockInputSecs; float m_fLockInputSecs;
}; };