Files
itgmania212121/stepmania/src/MenuElements.h
T

79 lines
1.9 KiB
C++
Raw Normal View History

2002-05-27 08:23:27 +00:00
#pragma once
/*
-----------------------------------------------------------------------------
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-05-19 01:59:48 +00:00
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
-----------------------------------------------------------------------------
*/
2002-05-19 01:59:48 +00:00
#include "Screen.h"
#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"
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();
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-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(); };
protected:
2002-05-28 20:01:22 +00:00
void TweenTopLayerOnScreen();
void TweenTopLayerOffScreen();
2002-05-28 20:01:22 +00:00
void TweenBottomLayerOnScreen();
void TweenBottomLayerOffScreen();
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;
BitmapText m_textHelp;
2002-05-28 20:01:22 +00:00
BitmapText m_textCreditInfo[NUM_PLAYERS];
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;
};