Transition to sprites from quads
This commit is contained in:
@@ -714,20 +714,20 @@ TitleBGY=420
|
||||
TitleBGX=120
|
||||
TitleBGOnCommand=diffusealpha,0;linear,1;diffusealpha,1.0
|
||||
TitleBGOffCommand=linear,0.5;zoomx,0.0;zoomy,0.0
|
||||
RoomsBGColor=0.5,0.0,0.5,0.7
|
||||
RoomsBGWidth=250
|
||||
RoomsBGHeight=400
|
||||
RoomsBGY=240
|
||||
RoomsBGY=235
|
||||
RoomsBGX=500
|
||||
RoomsBGOnCommand=diffusealpha,0;linear,1;diffusealpha,1.0;linear,1;diffusealpha,0.6
|
||||
RoomsBGOnCommand=diffusealpha,0;linear,1;diffusealpha,1.0;linear,1;diffusealpha,0.8
|
||||
RoomsBGOffCommand=linear,0.5;zoomx,0.0;zoomy,0.0
|
||||
SelColor=0.0,1.0,0.2,0.4
|
||||
SelHeight=30
|
||||
SelWidth=250
|
||||
SelY=240
|
||||
SelX=530
|
||||
SelOnCommand=zoomx,0.0;zoomy,0.0;linear,0.5;zoomy,1.0;zoomx,1.0
|
||||
SelOffCommand=linear,0.5;zoomx,0.0;zoomy,0.0
|
||||
SelectionY=240
|
||||
SelectionX=500
|
||||
SelectionWidth=150
|
||||
SelectionHeight=30
|
||||
SelectionTo1Command=linear,0.3;zoomy,1.0;zoomx,1.0;x,500;y,240
|
||||
SelectionTo2Command=linear,0.3;zoomy,1.7;zoomx,0.6;x,252;y,400
|
||||
SelectionOnCommand=diffusealpha,0.7;zoomx,0.0;zoomy,0.0;linear,0.5;zoomy,1.0;zoomx,1.0
|
||||
SelectionOffCommand=linear,0.5;zoomx,0.0;zoomy,0.0
|
||||
TitleY=420
|
||||
TitleX=120
|
||||
TitleOnCommand=diffusealpha,0;linear,1;diffusealpha,1.0
|
||||
@@ -767,11 +767,11 @@ ChatOutputBoxHeight=200
|
||||
ChatOutputBoxColor=1.0,0.5,0.5,0.7 //transparent reddish
|
||||
ChatInputY=SCREEN_CENTER_Y+70
|
||||
ChatInputX=SCREEN_CENTER_X-300
|
||||
ChatInputOnCommand=zoomx,0.0;zoomy,0.0;diffusealpha,0;linear,0.5;diffusealpha,1;zoomx,0.5;zoomy,0.5
|
||||
ChatInputOnCommand=zoomx,0.0;zoomy,0.0;diffusealpha,0;linear,0.5;diffusealpha,0.8;zoomx,0.5;zoomy,0.5
|
||||
ChatInputOffCommand=diffusealpha,1;linear,0.5;diffusealpha,0;zoomx,0.25;zoomy,0.25
|
||||
ChatOutputY=SCREEN_CENTER_Y+64
|
||||
ChatOutputX=SCREEN_CENTER_X-300
|
||||
ChatOutputOnCommand=zoomx,1.0;zoomy,1.0;diffusealpha,0;linear,0.5;diffusealpha,1;zoomx,0.5;zoomy,0.5
|
||||
ChatOutputOnCommand=zoomx,1.0;zoomy,1.0;diffusealpha,0;linear,0.5;diffusealpha,0.8;zoomx,0.5;zoomy,0.5
|
||||
ChatOutputOffCommand=diffusealpha,1;linear,0.5;diffusealpha,0;zoomx,0.25;zoomy,0.25
|
||||
GroupsListY=SCREEN_CENTER_Y-90
|
||||
GroupsListX=SCREEN_CENTER_X+160
|
||||
@@ -813,17 +813,17 @@ Users1Color=1.0,1.0,1.0,1.0 //Inactive; Undefined
|
||||
Users2Color=0.5,0.5,1.0,1.0 //Active, In NetScreen
|
||||
Users3Color=0.5,1.0,0.5,1.0 //Active, In Options
|
||||
Users4Color=1.0,0.5,0.5,1.0 //Active, in Evaluation
|
||||
SelColor=0.0,1.0,0.2,0.4
|
||||
SelHeight=30
|
||||
SelWidth=300
|
||||
SelY=SCREEN_CENTER_Y-90
|
||||
SelX=SCREEN_CENTER_X+160
|
||||
SelOnCommand=zoomx,0.0;zoomy,0.0;linear,0.5;zoomy,1.0;zoomx,1.0
|
||||
SelOffCommand=linear,0.5;zoomx,0.0;zoomy,0.0
|
||||
SelTo1Command=linear,0.3;zoomy,1.0;zoomx,1.0;x,480;y,150
|
||||
SelTo2Command=linear,0.3;zoomy,1.0;zoomx,1.0;x,480;y,350
|
||||
SelTo3Command=linear,0.3;x,260;y,400;zoomx,0.3;zoomy,2.0
|
||||
SelTo4Command=linear,0.3;x,80;y,70;zoomx,0.4;zoomy,2.2
|
||||
SelectionColor=0.0,1.0,0.2,0.4
|
||||
SelectionHeight=30
|
||||
SelectionWidth=300
|
||||
SelectionY=SCREEN_CENTER_Y-90
|
||||
SelectionX=SCREEN_CENTER_X+160
|
||||
SelectionOnCommand=zoomx,0.0;zoomy,0.0;linear,0.5;zoomy,1.0;zoomx,1.0;diffusealpha,0.7
|
||||
SelectionOffCommand=linear,0.5;zoomx,0.0;zoomy,0.0
|
||||
SelectionTo1Command=linear,0.3;zoomy,1.0;zoomx,1.0;x,480;y,150
|
||||
SelectionTo2Command=linear,0.3;zoomy,1.0;zoomx,1.0;x,480;y,350
|
||||
SelectionTo3Command=linear,0.3;x,260;y,400;zoomx,0.4;zoomy,2.0
|
||||
SelectionTo4Command=linear,0.3;x,80;y,70;zoomx,0.4;zoomy,2.2
|
||||
optionsY=SCREEN_CENTER_Y-170
|
||||
optionsX=SCREEN_CENTER_X-240
|
||||
optionsOnCommand=zoomx,0.0;zoomy,0.0;linear,0.5;zoomy,0.7;zoomx,0.7
|
||||
|
||||
@@ -26,26 +26,26 @@
|
||||
#define USERS_X THEME->GetMetricF(m_sName,"UsersX")
|
||||
|
||||
const ScreenMessage SM_AddToChat = ScreenMessage(SM_User+4);
|
||||
const ScreenMessage SM_UsersUpdate = ScreenMessage(SM_User+7);
|
||||
const ScreenMessage SM_UsersUpdate = ScreenMessage(SM_User+7);
|
||||
const ScreenMessage SM_SMOnlinePack = ScreenMessage(SM_User+8); //Unused, but should be known
|
||||
|
||||
REGISTER_SCREEN_CLASS( ScreenNetSelectBase );
|
||||
ScreenNetSelectBase::ScreenNetSelectBase( const CString& sName ) : ScreenWithMenuElements( sName )
|
||||
{
|
||||
//ChatBox
|
||||
m_rectChatInputBox.SetDiffuse( CHATINPUT_COLOR );
|
||||
m_rectChatInputBox.SetName( "ChatInputBox" );
|
||||
m_rectChatInputBox.SetWidth( CHATINPUT_WIDTH );
|
||||
m_rectChatInputBox.SetHeight( CHATINPUT_HEIGHT );
|
||||
SET_XY_AND_ON_COMMAND( m_rectChatInputBox );
|
||||
this->AddChild( &m_rectChatInputBox );
|
||||
m_sprChatInputBox.SetName( "ChatInputBox" );
|
||||
m_sprChatInputBox.Load( THEME->GetPathG( m_sName, "ChatInputBox" ) );
|
||||
m_sprChatInputBox.SetWidth( CHATINPUT_WIDTH );
|
||||
m_sprChatInputBox.SetHeight( CHATINPUT_HEIGHT );
|
||||
SET_XY_AND_ON_COMMAND( m_sprChatInputBox );
|
||||
this->AddChild( &m_sprChatInputBox );
|
||||
|
||||
m_rectChatOutputBox.SetDiffuse( CHATOUTPUT_COLOR );
|
||||
m_rectChatOutputBox.SetName( "ChatOutputBox" );
|
||||
m_rectChatOutputBox.SetWidth( CHATOUTPUT_WIDTH );
|
||||
m_rectChatOutputBox.SetHeight( CHATOUTPUT_HEIGHT );
|
||||
SET_XY_AND_ON_COMMAND( m_rectChatOutputBox );
|
||||
this->AddChild( &m_rectChatOutputBox );
|
||||
m_sprChatOutputBox.SetName( "ChatOutputBox" );
|
||||
m_sprChatOutputBox.Load( THEME->GetPathG( m_sName, "ChatOutputBox" ) );
|
||||
m_sprChatOutputBox.SetWidth( CHATOUTPUT_WIDTH );
|
||||
m_sprChatOutputBox.SetHeight( CHATOUTPUT_HEIGHT );
|
||||
SET_XY_AND_ON_COMMAND( m_sprChatOutputBox );
|
||||
this->AddChild( &m_sprChatOutputBox );
|
||||
|
||||
m_textChatInput.LoadFromFont( THEME->GetPathF(m_sName,"chat") );
|
||||
m_textChatInput.SetHorizAlign( align_left );
|
||||
@@ -201,8 +201,8 @@ void ScreenNetSelectBase::HandleScreenMessage( const ScreenMessage SM )
|
||||
|
||||
void ScreenNetSelectBase::TweenOffScreen()
|
||||
{
|
||||
OFF_COMMAND( m_rectChatInputBox );
|
||||
OFF_COMMAND( m_rectChatOutputBox );
|
||||
OFF_COMMAND( m_sprChatInputBox );
|
||||
OFF_COMMAND( m_sprChatOutputBox );
|
||||
OFF_COMMAND( m_textChatInput );
|
||||
OFF_COMMAND( m_textChatOutput );
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ private:
|
||||
BitmapText m_textChatInput;
|
||||
BitmapText m_textChatOutput;
|
||||
BitmapText m_textOutHidden;
|
||||
Quad m_rectChatInputBox;
|
||||
Quad m_rectChatOutputBox;
|
||||
Sprite m_sprChatInputBox;
|
||||
Sprite m_sprChatOutputBox;
|
||||
CString m_sTextInput;
|
||||
CString m_actualText;
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
#define GROUPSBG_WIDTH THEME->GetMetricF(m_sName,"GroupsBGWidth")
|
||||
#define SONGSBG_WIDTH THEME->GetMetricF(m_sName,"SongsBGWidth")
|
||||
#define SELECTION_WIDTH THEME->GetMetricF(m_sName,"SelectionWidth")
|
||||
#define SELECTION_HEIGHT THEME->GetMetricF(m_sName,"SelectionHeight")
|
||||
|
||||
const ScreenMessage SM_NoSongs = ScreenMessage(SM_User+3);
|
||||
const ScreenMessage SM_ChangeSong = ScreenMessage(SM_User+5);
|
||||
@@ -120,9 +122,12 @@ ScreenNetSelectMusic::ScreenNetSelectMusic( const CString& sName ) : ScreenNetSe
|
||||
}
|
||||
|
||||
m_SelectMode = SelectGroup;
|
||||
m_rectSelection.SetName( "Sel" );
|
||||
SET_QUAD_INIT( m_rectSelection );
|
||||
this->AddChild( &m_rectSelection );
|
||||
m_sprSelection.Load( THEME->GetPathG( m_sName, "Selection" ) );
|
||||
m_sprSelection.SetName( "Selection" );
|
||||
m_sprSelection.SetWidth( SELECTION_WIDTH );
|
||||
m_sprSelection.SetHeight( SELECTION_HEIGHT );
|
||||
SET_XY_AND_ON_COMMAND( m_sprSelection );
|
||||
this->AddChild( &m_sprSelection );
|
||||
|
||||
|
||||
SONGMAN->GetGroupNames( m_vGroups );
|
||||
@@ -413,16 +418,16 @@ void ScreenNetSelectMusic::MenuUp( PlayerNumber pn, const InputEventType type )
|
||||
m_SelectMode = (NetScreenSelectModes) ( ( (int)m_SelectMode - 1) % (int)SelectModes);
|
||||
if ( (int) m_SelectMode < 0)
|
||||
m_SelectMode = (NetScreenSelectModes) (SelectModes - 1);
|
||||
m_rectSelection.StopTweening( );
|
||||
COMMAND( m_rectSelection, ssprintf("To%d", m_SelectMode+1 ) );
|
||||
m_sprSelection.StopTweening( );
|
||||
COMMAND( m_sprSelection, ssprintf("To%d", m_SelectMode+1 ) );
|
||||
}
|
||||
|
||||
void ScreenNetSelectMusic::MenuDown( PlayerNumber pn, const InputEventType type )
|
||||
{
|
||||
m_soundChangeSel.Play();
|
||||
m_SelectMode = (NetScreenSelectModes) ( ( (int)m_SelectMode + 1) % (int)SelectModes);
|
||||
m_rectSelection.StopTweening( );
|
||||
COMMAND( m_rectSelection, ssprintf("To%d", m_SelectMode+1 ) );
|
||||
m_sprSelection.StopTweening( );
|
||||
COMMAND( m_sprSelection, ssprintf("To%d", m_SelectMode+1 ) );
|
||||
}
|
||||
|
||||
void ScreenNetSelectMusic::MenuStart( PlayerNumber pn )
|
||||
@@ -453,7 +458,7 @@ void ScreenNetSelectMusic::TweenOffScreen()
|
||||
{
|
||||
ScreenNetSelectBase::TweenOffScreen();
|
||||
|
||||
OFF_COMMAND( m_rectSelection );
|
||||
OFF_COMMAND( m_sprSelection );
|
||||
OFF_COMMAND( m_textGroups );
|
||||
OFF_COMMAND( m_rectGroupsBackground );
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ protected:
|
||||
void TweenOffScreen();
|
||||
private:
|
||||
//Selection
|
||||
Quad m_rectSelection;
|
||||
Sprite m_sprSelection;
|
||||
|
||||
//Groups
|
||||
BitmapText m_textGroups;
|
||||
|
||||
Reference in New Issue
Block a user