2002-03-30 20:00:13 +00:00
|
|
|
#include "stdafx.h"
|
|
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
File: MenuElements.h
|
|
|
|
|
|
2002-05-19 01:59:48 +00:00
|
|
|
Desc: Base class for menu Screens.
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2002-05-19 01:59:48 +00:00
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
|
|
|
|
Chris Danford
|
2002-03-30 20:00:13 +00:00
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "MenuElements.h"
|
|
|
|
|
#include "RageTextureManager.h"
|
|
|
|
|
#include "RageUtil.h"
|
2003-01-02 07:54:28 +00:00
|
|
|
#include "RageSoundManager.h"
|
2002-05-19 01:59:48 +00:00
|
|
|
#include "ScreenManager.h"
|
2002-05-01 19:14:55 +00:00
|
|
|
#include "GameConstantsAndTypes.h"
|
2002-07-23 01:41:40 +00:00
|
|
|
#include "PrefsManager.h"
|
2002-05-01 19:14:55 +00:00
|
|
|
#include "RageLog.h"
|
2002-05-28 20:01:22 +00:00
|
|
|
#include "RageLog.h"
|
|
|
|
|
#include "GameManager.h"
|
2002-07-23 01:41:40 +00:00
|
|
|
#include "GameState.h"
|
2002-11-11 04:53:31 +00:00
|
|
|
#include "ThemeManager.h"
|
2002-03-30 20:00:13 +00:00
|
|
|
|
|
|
|
|
|
2002-08-27 16:53:25 +00:00
|
|
|
#define TOP_EDGE_X THEME->GetMetricF("MenuElements","TopEdgeX")
|
|
|
|
|
#define TOP_EDGE_Y THEME->GetMetricF("MenuElements","TopEdgeY")
|
|
|
|
|
#define BOTTOM_EDGE_X THEME->GetMetricF("MenuElements","BottomEdgeX")
|
|
|
|
|
#define BOTTOM_EDGE_Y THEME->GetMetricF("MenuElements","BottomEdgeY")
|
|
|
|
|
#define STYLE_ICON_X THEME->GetMetricF("MenuElements","StyleIconX")
|
|
|
|
|
#define STYLE_ICON_Y THEME->GetMetricF("MenuElements","StyleIconY")
|
|
|
|
|
#define TIMER_X THEME->GetMetricF("MenuElements","TimerX")
|
|
|
|
|
#define TIMER_Y THEME->GetMetricF("MenuElements","TimerY")
|
|
|
|
|
#define HELP_X THEME->GetMetricF("MenuElements","HelpX")
|
|
|
|
|
#define HELP_Y THEME->GetMetricF("MenuElements","HelpY")
|
2002-05-27 18:36:01 +00:00
|
|
|
|
|
|
|
|
|
2002-03-30 20:00:13 +00:00
|
|
|
MenuElements::MenuElements()
|
|
|
|
|
{
|
2002-09-02 21:59:58 +00:00
|
|
|
this->AddChild( &m_sprTopEdge );
|
|
|
|
|
this->AddChild( &m_sprStyleIcon );
|
|
|
|
|
this->AddChild( &m_MenuTimer );
|
|
|
|
|
this->AddChild( &m_sprBottomEdge );
|
2002-09-23 07:35:47 +00:00
|
|
|
this->AddChild( &m_Background );
|
|
|
|
|
this->AddChild( &m_quadBrightness );
|
2002-09-02 21:59:58 +00:00
|
|
|
this->AddChild( &m_textHelp );
|
2002-05-28 20:01:22 +00:00
|
|
|
|
|
|
|
|
m_KeepAlive.SetOpened();
|
2002-09-02 21:59:58 +00:00
|
|
|
this->AddChild( &m_KeepAlive );
|
2002-05-28 20:01:22 +00:00
|
|
|
|
|
|
|
|
m_Wipe.SetOpened();
|
2002-09-02 21:59:58 +00:00
|
|
|
this->AddChild( &m_Wipe );
|
2002-06-27 17:49:10 +00:00
|
|
|
|
2002-09-02 21:59:58 +00:00
|
|
|
this->AddChild( &m_Invisible );
|
2002-03-30 20:00:13 +00:00
|
|
|
}
|
|
|
|
|
|
2002-09-13 18:06:36 +00:00
|
|
|
void MenuElements::StealthTimer( int iActive )
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
m_MenuTimer.StealthTimer( iActive ); // go a bit deeper... get rid of the sound...
|
|
|
|
|
|
|
|
|
|
if (iActive == 0) // if we wanna hide the timer...
|
|
|
|
|
{
|
|
|
|
|
m_MenuTimer.SetXY( TIMER_X, TIMER_Y ); // set it off-screen
|
|
|
|
|
}
|
|
|
|
|
else if (iActive == 1) // we wanna hide the timer
|
|
|
|
|
{
|
|
|
|
|
m_MenuTimer.SetXY( 999.0f, 999.0f ); // otherwise position it off-screen
|
|
|
|
|
}
|
|
|
|
|
// else... take no action :)
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-03 22:31:06 +00:00
|
|
|
void MenuElements::Load( CString sBackgroundPath, CString sTopEdgePath, CString sHelpText, bool bShowStyleIcon, bool bTimerEnabled, int iTimerSeconds )
|
2002-03-30 20:00:13 +00:00
|
|
|
{
|
2002-07-31 19:40:40 +00:00
|
|
|
LOG->Trace( "MenuElements::MenuElements()" );
|
2002-03-30 20:00:13 +00:00
|
|
|
|
|
|
|
|
|
2002-09-23 07:35:47 +00:00
|
|
|
m_Background.LoadFromAniDir( sBackgroundPath );
|
|
|
|
|
|
2002-10-28 05:30:45 +00:00
|
|
|
m_quadBrightness.SetDiffuse( RageColor(0,0,0,0) );
|
2002-10-31 05:52:12 +00:00
|
|
|
m_quadBrightness.StretchTo( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
|
2002-03-30 20:00:13 +00:00
|
|
|
|
|
|
|
|
m_sprTopEdge.Load( sTopEdgePath );
|
2002-08-27 16:53:25 +00:00
|
|
|
m_sprTopEdge.SetXY( TOP_EDGE_X, TOP_EDGE_Y );
|
2002-05-27 18:36:01 +00:00
|
|
|
|
2002-09-15 03:50:57 +00:00
|
|
|
m_sprStyleIcon.Load( THEME->GetPathTo("Graphics",ssprintf("menu style icons %s",GAMESTATE->GetCurrentGameDef()->m_szName)) );
|
2002-05-27 18:36:01 +00:00
|
|
|
m_sprStyleIcon.StopAnimating();
|
2002-08-27 16:53:25 +00:00
|
|
|
m_sprStyleIcon.SetXY( STYLE_ICON_X, STYLE_ICON_Y );
|
2003-01-30 07:18:33 +00:00
|
|
|
if( GAMESTATE->m_CurStyle == STYLE_INVALID || !bShowStyleIcon )
|
2002-10-28 05:30:45 +00:00
|
|
|
m_sprStyleIcon.SetDiffuse( RageColor(1,1,1,0) );
|
2002-05-28 20:01:22 +00:00
|
|
|
else
|
2002-08-27 23:31:41 +00:00
|
|
|
{
|
|
|
|
|
int iRowNum = GetStyleIndexRelativeToGame( GAMESTATE->m_CurGame, GAMESTATE->m_CurStyle );
|
|
|
|
|
m_sprStyleIcon.SetState( iRowNum*2+GAMESTATE->m_MasterPlayerNumber );
|
|
|
|
|
}
|
2002-05-27 08:23:27 +00:00
|
|
|
|
2002-08-27 16:53:25 +00:00
|
|
|
m_MenuTimer.SetXY( TIMER_X, TIMER_Y );
|
2002-07-11 19:02:26 +00:00
|
|
|
if( !bTimerEnabled || !PREFSMAN->m_bMenuTimer )
|
|
|
|
|
{
|
|
|
|
|
m_MenuTimer.SetTimer( 99 );
|
2002-07-27 19:29:51 +00:00
|
|
|
m_MenuTimer.Update( 0 );
|
2002-07-11 19:02:26 +00:00
|
|
|
m_MenuTimer.StopTimer();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
m_MenuTimer.SetTimer( iTimerSeconds );
|
2002-05-27 08:23:27 +00:00
|
|
|
|
2002-08-13 23:26:46 +00:00
|
|
|
m_sprBottomEdge.Load( THEME->GetPathTo("Graphics","menu bottom edge") );
|
2002-08-27 16:53:25 +00:00
|
|
|
m_sprBottomEdge.SetXY( BOTTOM_EDGE_X, BOTTOM_EDGE_Y );
|
2002-03-30 20:00:13 +00:00
|
|
|
|
|
|
|
|
m_textHelp.SetXY( HELP_X, HELP_Y );
|
2002-07-23 01:41:40 +00:00
|
|
|
CStringArray asHelpTips;
|
2002-09-03 22:31:06 +00:00
|
|
|
split( sHelpText, "\n", asHelpTips );
|
2002-07-23 01:41:40 +00:00
|
|
|
m_textHelp.SetTips( asHelpTips );
|
2002-03-30 20:00:13 +00:00
|
|
|
m_textHelp.SetZoom( 0.5f );
|
|
|
|
|
|
|
|
|
|
|
2002-08-13 23:26:46 +00:00
|
|
|
m_soundSwoosh.Load( THEME->GetPathTo("Sounds","menu swoosh") );
|
|
|
|
|
m_soundBack.Load( THEME->GetPathTo("Sounds","menu back") );
|
2002-05-28 20:01:22 +00:00
|
|
|
}
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2002-12-19 22:24:13 +00:00
|
|
|
void MenuElements::TweenTopLayerOnScreen(float tm)
|
2002-05-28 20:01:22 +00:00
|
|
|
{
|
2002-12-19 22:24:13 +00:00
|
|
|
if(tm == -1)
|
|
|
|
|
tm = MENU_ELEMENTS_TWEEN_TIME;
|
|
|
|
|
|
2003-01-03 05:56:28 +00:00
|
|
|
vector<Actor*> apActorsInTopFrame;
|
2002-10-31 04:23:39 +00:00
|
|
|
apActorsInTopFrame.push_back( &m_sprTopEdge );
|
|
|
|
|
apActorsInTopFrame.push_back( &m_sprStyleIcon );
|
|
|
|
|
apActorsInTopFrame.push_back( &m_MenuTimer );
|
2002-10-31 03:16:02 +00:00
|
|
|
for( unsigned i=0; i<apActorsInTopFrame.size(); i++ )
|
2002-08-27 16:53:25 +00:00
|
|
|
{
|
|
|
|
|
float fOriginalX = apActorsInTopFrame[i]->GetX();
|
|
|
|
|
apActorsInTopFrame[i]->SetX( fOriginalX+SCREEN_WIDTH );
|
2002-12-19 22:24:13 +00:00
|
|
|
apActorsInTopFrame[i]->BeginTweening( tm, TWEEN_SPRING );
|
2002-08-27 16:53:25 +00:00
|
|
|
apActorsInTopFrame[i]->SetTweenX( fOriginalX );
|
|
|
|
|
}
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2002-05-28 20:01:22 +00:00
|
|
|
float fOriginalZoom = m_textHelp.GetZoomY();
|
2002-03-30 20:00:13 +00:00
|
|
|
m_textHelp.SetZoomY( 0 );
|
2002-12-19 22:24:13 +00:00
|
|
|
m_textHelp.BeginTweening( tm/2 );
|
2002-05-28 20:01:22 +00:00
|
|
|
m_textHelp.SetTweenZoomY( fOriginalZoom );
|
|
|
|
|
}
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2002-09-09 22:11:34 +00:00
|
|
|
void MenuElements::TweenOnScreenFromMenu( ScreenMessage smSendWhenDone, bool bLeaveKeepAliveOn )
|
2002-05-28 20:01:22 +00:00
|
|
|
{
|
|
|
|
|
TweenTopLayerOnScreen();
|
2002-09-09 22:11:34 +00:00
|
|
|
if( !bLeaveKeepAliveOn )
|
|
|
|
|
m_KeepAlive.OpenWipingRight( smSendWhenDone );
|
|
|
|
|
else
|
|
|
|
|
m_KeepAlive.SetClosed();
|
2002-05-19 01:59:48 +00:00
|
|
|
m_soundSwoosh.Play();
|
2002-03-30 20:00:13 +00:00
|
|
|
}
|
|
|
|
|
|
2002-12-19 22:09:44 +00:00
|
|
|
void MenuElements::TweenTopLayerOffScreen(float tm)
|
2002-03-30 20:00:13 +00:00
|
|
|
{
|
2002-09-04 03:28:02 +00:00
|
|
|
/*
|
|
|
|
|
This trick is neat, but there's a problem: fOriginalX may not be the settled
|
|
|
|
|
position--we might still be tweening, and if it's a bounce tween, it might be
|
|
|
|
|
left of center, which means fOriginalX+SCREEN_WIDTH won't actually take it
|
|
|
|
|
completely off-screen. fOriginalX+SCREEN_WIDTH*2 would, but that'd make the
|
|
|
|
|
bounce faster. SCREEN_WIDTH+SCREEN_WIDTH/2 would, but ignoring fOriginalX
|
|
|
|
|
will make each component tween off at a different rate ...
|
|
|
|
|
-glenn
|
2003-01-03 05:56:28 +00:00
|
|
|
vector<Actor*> apActorsInTopFrame;
|
2002-10-31 04:23:39 +00:00
|
|
|
apActorsInTopFrame.push_back( &m_sprTopEdge );
|
|
|
|
|
apActorsInTopFrame.push_back( &m_sprStyleIcon );
|
|
|
|
|
apActorsInTopFrame.push_back( &m_MenuTimer );
|
2002-10-31 03:16:02 +00:00
|
|
|
for( unsigned i=0; i<apActorsInTopFrame.size(); i++ )
|
2002-08-27 16:53:25 +00:00
|
|
|
{
|
|
|
|
|
float fOriginalX = apActorsInTopFrame[i]->GetX();
|
|
|
|
|
apActorsInTopFrame[i]->BeginTweening( MENU_ELEMENTS_TWEEN_TIME, TWEEN_BOUNCE_BEGIN );
|
|
|
|
|
apActorsInTopFrame[i]->SetTweenX( fOriginalX+SCREEN_WIDTH );
|
|
|
|
|
}
|
2002-09-04 03:28:02 +00:00
|
|
|
*/
|
|
|
|
|
|
2002-12-19 22:09:44 +00:00
|
|
|
if(tm == -1)
|
|
|
|
|
tm = MENU_ELEMENTS_TWEEN_TIME;
|
|
|
|
|
|
2002-09-04 03:28:02 +00:00
|
|
|
m_sprTopEdge.StopTweening();
|
2002-12-19 22:09:44 +00:00
|
|
|
m_sprTopEdge.BeginTweening( tm, TWEEN_BOUNCE_BEGIN );
|
2002-09-04 03:28:02 +00:00
|
|
|
m_sprTopEdge.SetTweenX( TOP_EDGE_X+SCREEN_WIDTH );
|
|
|
|
|
|
|
|
|
|
m_sprStyleIcon.StopTweening();
|
2002-12-19 22:09:44 +00:00
|
|
|
m_sprStyleIcon.BeginTweening( tm, TWEEN_BOUNCE_BEGIN );
|
2002-09-04 03:28:02 +00:00
|
|
|
m_sprStyleIcon.SetTweenX( STYLE_ICON_X+SCREEN_WIDTH );
|
|
|
|
|
|
|
|
|
|
m_MenuTimer.StopTweening();
|
2002-12-19 22:09:44 +00:00
|
|
|
m_MenuTimer.BeginTweening( tm, TWEEN_BOUNCE_BEGIN );
|
2002-09-04 03:28:02 +00:00
|
|
|
m_MenuTimer.SetTweenX( TIMER_X+SCREEN_WIDTH );
|
2002-04-16 17:31:00 +00:00
|
|
|
|
2002-09-04 03:28:02 +00:00
|
|
|
m_textHelp.StopTweening();
|
2002-12-19 22:09:44 +00:00
|
|
|
m_textHelp.BeginTweening( tm/2 );
|
2002-03-30 20:00:13 +00:00
|
|
|
m_textHelp.SetTweenZoomY( 0 );
|
2002-05-28 20:01:22 +00:00
|
|
|
}
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2002-05-28 20:01:22 +00:00
|
|
|
void MenuElements::TweenOffScreenToMenu( ScreenMessage smSendWhenDone )
|
|
|
|
|
{
|
2002-08-29 20:18:41 +00:00
|
|
|
m_MenuTimer.StopTimer();
|
2002-05-28 20:01:22 +00:00
|
|
|
TweenTopLayerOffScreen();
|
2002-09-09 22:11:34 +00:00
|
|
|
if( !m_KeepAlive.IsClosed() )
|
|
|
|
|
m_KeepAlive.CloseWipingRight( smSendWhenDone );
|
|
|
|
|
else
|
|
|
|
|
SCREENMAN->SendMessageToTopScreen( smSendWhenDone, m_KeepAlive.GetTransitionTime() );
|
2002-05-19 01:59:48 +00:00
|
|
|
m_soundSwoosh.Play();
|
2002-03-30 20:00:13 +00:00
|
|
|
}
|
|
|
|
|
|
2002-12-19 22:24:13 +00:00
|
|
|
void MenuElements::ImmedOnScreenFromMenu( bool bLeaveKeepAliveOn )
|
|
|
|
|
{
|
|
|
|
|
TweenTopLayerOnScreen(0);
|
|
|
|
|
Update(0);
|
|
|
|
|
|
|
|
|
|
if( !bLeaveKeepAliveOn )
|
|
|
|
|
m_KeepAlive.SetOpened();
|
|
|
|
|
else
|
|
|
|
|
m_KeepAlive.SetClosed();
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-04 22:56:19 +00:00
|
|
|
void MenuElements::ImmedOffScreenToMenu()
|
|
|
|
|
{
|
|
|
|
|
m_MenuTimer.StopTimer();
|
|
|
|
|
m_KeepAlive.SetClosed();
|
|
|
|
|
|
2002-12-19 22:09:44 +00:00
|
|
|
/* Remove the top layer immediately. */
|
|
|
|
|
TweenTopLayerOffScreen(0);
|
2002-09-04 22:56:19 +00:00
|
|
|
|
2002-12-19 22:09:44 +00:00
|
|
|
/* We need to do a null update after doing null tweens (tweens with zero time),
|
|
|
|
|
* or they'll show up in their default positions for a frame (since screens
|
|
|
|
|
* draw once before they're updated for the first time). */
|
|
|
|
|
Update(0);
|
2002-09-04 22:56:19 +00:00
|
|
|
}
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2002-05-28 20:01:22 +00:00
|
|
|
void MenuElements::TweenBottomLayerOnScreen()
|
|
|
|
|
{
|
2002-08-27 16:53:25 +00:00
|
|
|
float fOriginalY = m_sprBottomEdge.GetY();
|
|
|
|
|
m_sprBottomEdge.SetY( fOriginalY + 100 );
|
|
|
|
|
m_sprBottomEdge.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 );
|
|
|
|
|
m_sprBottomEdge.SetTweenY( fOriginalY );
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2002-10-28 05:30:45 +00:00
|
|
|
m_quadBrightness.SetDiffuse( RageColor(0,0,0,1) );
|
2002-09-23 07:35:47 +00:00
|
|
|
m_quadBrightness.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 );
|
2002-10-28 05:30:45 +00:00
|
|
|
m_quadBrightness.SetTweenDiffuse( RageColor(0,0,0,0) );
|
2002-03-30 20:00:13 +00:00
|
|
|
}
|
|
|
|
|
|
2002-05-28 20:01:22 +00:00
|
|
|
void MenuElements::TweenBottomLayerOffScreen()
|
2002-03-30 20:00:13 +00:00
|
|
|
{
|
2002-08-27 16:53:25 +00:00
|
|
|
float fOriginalY = m_sprBottomEdge.GetY();
|
2002-09-04 03:28:02 +00:00
|
|
|
m_sprBottomEdge.StopTweening();
|
2002-08-27 16:53:25 +00:00
|
|
|
m_sprBottomEdge.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 );
|
|
|
|
|
m_sprBottomEdge.SetTweenY( fOriginalY + 100 );
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2002-10-28 05:30:45 +00:00
|
|
|
m_quadBrightness.SetDiffuse( RageColor(0,0,0,0) );
|
2002-09-23 07:35:47 +00:00
|
|
|
m_quadBrightness.StopTweening();
|
|
|
|
|
m_quadBrightness.BeginTweening( MENU_ELEMENTS_TWEEN_TIME*3/2.0f ); // sleep
|
|
|
|
|
m_quadBrightness.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 ); // fade
|
2002-10-28 05:30:45 +00:00
|
|
|
m_quadBrightness.SetTweenDiffuse( RageColor(0,0,0,1) );
|
2002-03-30 20:00:13 +00:00
|
|
|
}
|
|
|
|
|
|
2002-05-28 20:01:22 +00:00
|
|
|
void MenuElements::TweenOnScreenFromBlack( ScreenMessage smSendWhenDone )
|
2002-03-30 20:00:13 +00:00
|
|
|
{
|
2002-05-28 20:01:22 +00:00
|
|
|
TweenTopLayerOnScreen();
|
|
|
|
|
TweenBottomLayerOnScreen();
|
2002-05-29 09:47:24 +00:00
|
|
|
//m_Wipe.OpenWipingRight( smSendWhenDone );
|
2002-05-28 20:01:22 +00:00
|
|
|
m_soundSwoosh.Play();
|
2002-03-30 20:00:13 +00:00
|
|
|
}
|
|
|
|
|
|
2002-05-28 20:01:22 +00:00
|
|
|
void MenuElements::TweenOffScreenToBlack( ScreenMessage smSendWhenDone, bool bPlayBackSound )
|
2002-03-30 20:00:13 +00:00
|
|
|
{
|
2002-08-29 20:18:41 +00:00
|
|
|
m_MenuTimer.StopTimer();
|
|
|
|
|
|
2002-05-28 20:01:22 +00:00
|
|
|
if( !bPlayBackSound )
|
|
|
|
|
{
|
|
|
|
|
TweenTopLayerOffScreen();
|
|
|
|
|
TweenBottomLayerOffScreen();
|
2002-07-28 20:28:37 +00:00
|
|
|
m_Invisible.SetTransitionTime( MENU_ELEMENTS_TWEEN_TIME*2 );
|
2002-06-27 17:49:10 +00:00
|
|
|
m_Invisible.CloseWipingRight( smSendWhenDone );
|
2002-05-28 20:01:22 +00:00
|
|
|
}
|
2002-05-29 09:47:24 +00:00
|
|
|
else
|
|
|
|
|
{
|
2002-05-28 20:01:22 +00:00
|
|
|
m_soundBack.Play();
|
2002-05-29 09:47:24 +00:00
|
|
|
m_Wipe.CloseWipingLeft( smSendWhenDone );
|
|
|
|
|
}
|
2002-03-30 20:00:13 +00:00
|
|
|
}
|
|
|
|
|
|
2002-05-19 01:59:48 +00:00
|
|
|
void MenuElements::DrawPrimitives()
|
2002-03-30 20:00:13 +00:00
|
|
|
{
|
|
|
|
|
// do nothing. Call DrawBottomLayer() and DrawTopLayer() instead.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MenuElements::DrawTopLayer()
|
|
|
|
|
{
|
2002-08-19 20:02:30 +00:00
|
|
|
BeginDraw();
|
2002-08-27 16:53:25 +00:00
|
|
|
|
|
|
|
|
m_sprTopEdge.Draw();
|
|
|
|
|
m_sprStyleIcon.Draw();
|
|
|
|
|
m_MenuTimer.Draw();
|
|
|
|
|
m_sprBottomEdge.Draw();
|
2002-03-30 20:00:13 +00:00
|
|
|
m_textHelp.Draw();
|
2002-05-28 20:01:22 +00:00
|
|
|
m_KeepAlive.Draw();
|
|
|
|
|
m_Wipe.Draw();
|
2002-08-27 16:53:25 +00:00
|
|
|
|
2002-08-19 20:02:30 +00:00
|
|
|
EndDraw();
|
2002-03-30 20:00:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MenuElements::DrawBottomLayer()
|
|
|
|
|
{
|
2002-08-19 20:02:30 +00:00
|
|
|
BeginDraw();
|
2002-08-27 16:53:25 +00:00
|
|
|
|
2002-09-23 07:35:47 +00:00
|
|
|
m_Background.Draw();
|
|
|
|
|
m_quadBrightness.Draw();
|
2002-08-27 16:53:25 +00:00
|
|
|
|
2002-08-19 20:02:30 +00:00
|
|
|
EndDraw();
|
2002-03-30 20:00:13 +00:00
|
|
|
}
|
|
|
|
|
|
2002-08-27 23:31:41 +00:00
|
|
|
void MenuElements::SetTimer( int iTimerSeconds )
|
2002-07-11 19:02:26 +00:00
|
|
|
{
|
2002-08-27 23:31:41 +00:00
|
|
|
m_MenuTimer.SetTimer( iTimerSeconds );
|
2002-07-11 19:02:26 +00:00
|
|
|
}
|
|
|
|
|
|
2002-08-27 23:31:41 +00:00
|
|
|
void MenuElements::StartTimer()
|
2002-08-20 21:00:56 +00:00
|
|
|
{
|
2002-08-27 23:31:41 +00:00
|
|
|
m_MenuTimer.StartTimer();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MenuElements::StopTimer()
|
|
|
|
|
{
|
|
|
|
|
m_MenuTimer.StopTimer();
|
2002-08-20 21:00:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MenuElements::StallTimer()
|
|
|
|
|
{
|
|
|
|
|
m_MenuTimer.StallTimer();
|
|
|
|
|
}
|
|
|
|
|
|