Para Theme Changes, Style Select Now Looks Cool :) Also added a Horizontal Scrolling Element for BGA's that will stretch the width but not the height of the graphic, and will allow the user to set it's Y postion in a metric.

This commit is contained in:
Andrew Livy
2002-12-21 20:33:10 +00:00
parent 49f05c9ab8
commit 73e02a6d1a
6 changed files with 53 additions and 2 deletions
+2 -2
View File
@@ -21,10 +21,10 @@ TODO As of: 07:30:PM 28/10/02
X Networking Assignment X Networking Assignment
X Integrating Assignment 1 X Integrating Assignment 1
- Update Menu Graphics for Para X Update Menu Graphics for Para
H Update Menu Graphics for Ez2 H Update Menu Graphics for Ez2
H Finish The PUMP Graphics H Finish The PUMP Graphics
* Work on Beatmania Support - Work on Beatmania Support
TODO As of: 07:47:PM 12/09/02 TODO As of: 07:47:PM 12/09/02
+18
View File
@@ -120,6 +120,7 @@ void BGAnimationLayer::LoadFromAniLayerFile( CString sPath, CString sSongBGPath
"tileflipx", "tileflipx",
"tileflipy", "tileflipy",
"tilepulse", "tilepulse",
"stretchscrollhorizontal"
}; };
for( int i=0; i<NUM_EFFECTS; i++ ) for( int i=0; i<NUM_EFFECTS; i++ )
@@ -180,6 +181,18 @@ found_effect:
} }
} }
break; break;
case EFFECT_STRETCH_SCROLL_H:
{
m_iNumSprites = 1;
RageTexturePrefs prefs;
prefs.bStretch = true;
m_Sprites[0].Load( sPath, prefs );
m_Sprites[0].StretchTo( RectI(SCREEN_LEFT,0,SCREEN_RIGHT,m_Sprites[0].GetUnzoomedHeight()) );
m_Sprites[0].SetCustomTextureRect( RectF(0,0,1,1) );
m_vTexCoordVelocity = RageVector2(+0.5f,0);
m_Sprites[0].SetY(m_fStretchScrollH_Y);
}
break;
case EFFECT_STRETCH_SPIN: case EFFECT_STRETCH_SPIN:
m_iNumSprites = 1; m_iNumSprites = 1;
m_Sprites[0].Load( sPath ); m_Sprites[0].Load( sPath );
@@ -295,6 +308,7 @@ found_effect:
ini.GetValueF( "BGAnimationLayer", "TexCoordVelocityX", m_vTexCoordVelocity.x ); ini.GetValueF( "BGAnimationLayer", "TexCoordVelocityX", m_vTexCoordVelocity.x );
ini.GetValueF( "BGAnimationLayer", "TexCoordVelocityY", m_vTexCoordVelocity.y ); ini.GetValueF( "BGAnimationLayer", "TexCoordVelocityY", m_vTexCoordVelocity.y );
ini.GetValueF( "BGAnimationLayer", "RotationalVelocity", m_fRotationalVelocity ); ini.GetValueF( "BGAnimationLayer", "RotationalVelocity", m_fRotationalVelocity );
ini.GetValueF( "BGAnimationLayer", "SetY", m_fStretchScrollH_Y );
} }
} }
@@ -333,6 +347,9 @@ void BGAnimationLayer::Update( float fDeltaTime )
m_Sprites[i].Update( fDeltaTime ); m_Sprites[i].Update( fDeltaTime );
} }
if(m_Effect == EFFECT_STRETCH_SCROLL_H)
m_Sprites[0].SetY(m_fStretchScrollH_Y);
switch( m_Effect ) switch( m_Effect )
{ {
case EFFECT_CENTER: case EFFECT_CENTER:
@@ -342,6 +359,7 @@ void BGAnimationLayer::Update( float fDeltaTime )
case EFFECT_STRETCH_SCROLL_RIGHT: case EFFECT_STRETCH_SCROLL_RIGHT:
case EFFECT_STRETCH_SCROLL_UP: case EFFECT_STRETCH_SCROLL_UP:
case EFFECT_STRETCH_SCROLL_DOWN: case EFFECT_STRETCH_SCROLL_DOWN:
case EFFECT_STRETCH_SCROLL_H:
float fTexCoords[8]; float fTexCoords[8];
m_Sprites[0].GetCustomTextureCoords( fTexCoords ); m_Sprites[0].GetCustomTextureCoords( fTexCoords );
+2
View File
@@ -72,6 +72,7 @@ protected:
EFFECT_TILE_FLIP_X, EFFECT_TILE_FLIP_X,
EFFECT_TILE_FLIP_Y, EFFECT_TILE_FLIP_Y,
EFFECT_TILE_PULSE, EFFECT_TILE_PULSE,
EFFECT_STRETCH_SCROLL_H,
NUM_EFFECTS // leave this at the end NUM_EFFECTS // leave this at the end
}; };
Effect m_Effect; Effect m_Effect;
@@ -80,6 +81,7 @@ protected:
RageVector2 m_vTexCoordVelocity; RageVector2 m_vTexCoordVelocity;
float m_fRotationalVelocity; float m_fRotationalVelocity;
float m_fStretchScrollH_Y;
}; };
#endif #endif
Binary file not shown.
+29
View File
@@ -130,6 +130,21 @@ ScreenSelectMode::ScreenSelectMode()
RefreshModeChoices(); RefreshModeChoices();
if( SELECTION_SPECIFIC_BG_ANIMATIONS )
{
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
for( unsigned i=0; i<m_apPossibleModeChoices.size(); i++ )
{
CString sChoiceName = m_apPossibleModeChoices[i]->name;
m_Infotext[i].Load( THEME->GetPathTo("Graphics",ssprintf("select mode infotext %s %s", sGameName.GetString(), sChoiceName.GetString())) );
m_Infotext[i].SetXY( GUIDE_X, GUIDE_Y );
this->AddChild( &m_Infotext[i] );
m_Infotext[i].SetDiffuse( RageColor(0,0,0,0));
}
}
AfterChange();
TweenOnScreen(); TweenOnScreen();
m_Menu.TweenOnScreenFromBlack( SM_None ); m_Menu.TweenOnScreenFromBlack( SM_None );
@@ -281,6 +296,20 @@ void ScreenSelectMode::MenuBack( PlayerNumber pn )
void ScreenSelectMode::AfterChange() void ScreenSelectMode::AfterChange()
{ {
if( SELECTION_SPECIFIC_BG_ANIMATIONS )
{
for( unsigned i=0; i<m_apPossibleModeChoices.size(); i++ )
{
if(i == m_ScrollingList.GetSelection())
{
m_Infotext[i].SetDiffuse(RageColor(1,1,1,1));
}
else
{
m_Infotext[i].SetDiffuse(RageColor(0,0,0,0));
}
}
}
// CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName; // CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
// const ModeChoice& choice = m_aPossibleModeChoices[ m_ScrollingList.GetSelection() ]; // const ModeChoice& choice = m_aPossibleModeChoices[ m_ScrollingList.GetSelection() ];
} }
+2
View File
@@ -56,6 +56,8 @@ protected:
Sprite m_ChoiceListHighlight; Sprite m_ChoiceListHighlight;
Sprite m_Guide; Sprite m_Guide;
Sprite m_Infotext[MAX_MODE_CHOICES];
CArray<ModeChoice*,ModeChoice*> m_apPossibleModeChoices; CArray<ModeChoice*,ModeChoice*> m_apPossibleModeChoices;
ScrollingList m_ScrollingList; ScrollingList m_ScrollingList;