2002-05-27 08:23:27 +00:00
|
|
|
#pragma once
|
2002-03-30 20:00:13 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
File: MenuElements.h
|
|
|
|
|
|
2002-05-27 08:23:27 +00:00
|
|
|
Desc: Displays common components of menu screens:
|
|
|
|
|
Background, Top Bar, Bottom Bar, help message, credits or PlayerOptions, style icon,
|
|
|
|
|
Menu Timer
|
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.
|
2002-03-30 20:00:13 +00:00
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2002-05-19 01:59:48 +00:00
|
|
|
#include "Screen.h"
|
2002-03-30 20:00:13 +00:00
|
|
|
#include "Sprite.h"
|
|
|
|
|
#include "BitmapText.h"
|
|
|
|
|
#include "RandomSample.h"
|
|
|
|
|
#include "TransitionFade.h"
|
2002-05-27 08:23:27 +00:00
|
|
|
#include "MenuTimer.h"
|
2002-05-28 20:01:22 +00:00
|
|
|
#include "TransitionFadeWipe.h"
|
|
|
|
|
#include "TransitionKeepAlive.h"
|
2002-06-27 17:49:10 +00:00
|
|
|
#include "TransitionInvisible.h"
|
2002-03-30 20:00:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
const float MENU_ELEMENTS_TWEEN_TIME = 0.30f;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MenuElements : public ActorFrame
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
MenuElements();
|
|
|
|
|
|
2002-05-19 01:59:48 +00:00
|
|
|
virtual void DrawPrimitives();
|
2002-03-30 20:00:13 +00:00
|
|
|
|
|
|
|
|
void Load( CString sBackgroundPath, CString sTopEdgePath, CString sHelpText );
|
|
|
|
|
|
|
|
|
|
void DrawTopLayer();
|
|
|
|
|
void DrawBottomLayer();
|
|
|
|
|
|
2002-05-28 20:01:22 +00:00
|
|
|
void TweenOnScreenFromMenu( ScreenMessage smSendWhenDone );
|
|
|
|
|
void TweenOffScreenToMenu( ScreenMessage smSendWhenDone );
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2002-05-28 20:01:22 +00:00
|
|
|
void TweenOnScreenFromBlack( ScreenMessage smSendWhenDone );
|
|
|
|
|
void TweenOffScreenToBlack( ScreenMessage smSendWhenDone, bool bPlayBackSound );
|
|
|
|
|
|
|
|
|
|
bool IsClosing() { return m_Wipe.IsClosing() || m_KeepAlive.IsClosing(); };
|
2002-03-30 20:00:13 +00:00
|
|
|
|
|
|
|
|
protected:
|
2002-05-28 20:01:22 +00:00
|
|
|
void TweenTopLayerOnScreen();
|
|
|
|
|
void TweenTopLayerOffScreen();
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2002-05-28 20:01:22 +00:00
|
|
|
void TweenBottomLayerOnScreen();
|
|
|
|
|
void TweenBottomLayerOffScreen();
|
2002-03-30 20:00:13 +00:00
|
|
|
|
|
|
|
|
|
2002-05-27 08:23:27 +00:00
|
|
|
// stuff in the top bar
|
|
|
|
|
ActorFrame m_frameTopBar;
|
|
|
|
|
Sprite m_sprTopEdge;
|
2002-05-27 18:36:01 +00:00
|
|
|
Sprite m_sprStyleIcon;
|
2002-05-27 08:23:27 +00:00
|
|
|
MenuTimer m_MenuTimer;
|
|
|
|
|
|
|
|
|
|
// stuff in the bottom bar
|
|
|
|
|
ActorFrame m_frameBottomBar;
|
|
|
|
|
Sprite m_sprBottomEdge;
|
|
|
|
|
|
|
|
|
|
// stuff in the main frame
|
2002-05-27 18:36:01 +00:00
|
|
|
Sprite m_sprBG;
|
2002-03-30 20:00:13 +00:00
|
|
|
BitmapText m_textHelp;
|
2002-05-28 20:01:22 +00:00
|
|
|
BitmapText m_textCreditInfo[NUM_PLAYERS];
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2002-05-28 20:01:22 +00:00
|
|
|
TransitionFadeWipe m_Wipe;
|
|
|
|
|
TransitionKeepAlive m_KeepAlive;
|
2002-06-27 17:49:10 +00:00
|
|
|
TransitionInvisible m_Invisible;
|
2002-05-27 08:23:27 +00:00
|
|
|
|
2002-05-19 01:59:48 +00:00
|
|
|
RageSoundSample m_soundSwoosh;
|
|
|
|
|
RageSoundSample m_soundBack;
|
2002-03-30 20:00:13 +00:00
|
|
|
};
|