Files
itgmania212121/stepmania/src/MenuElements.h
T

84 lines
2.3 KiB
C++
Raw Normal View History

#ifndef MENUELEMENTS_H
#define MENUELEMENTS_H
/*
-----------------------------------------------------------------------------
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"
2002-07-23 01:41:40 +00:00
#include "TipDisplay.h"
2002-09-29 05:06:18 +00:00
#include "BGAnimation.h"
2002-07-28 20:28:37 +00:00
const float MENU_ELEMENTS_TWEEN_TIME = 0.5f;
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, bool bShowStyleIcon, bool bTimerEnabled, int iTimerSeconds );
2002-07-11 19:02:26 +00:00
void SetTimer( int iTimerSeconds );
void StartTimer();
void StallTimer();
2002-07-11 19:02:26 +00:00
void StopTimer();
void StealthTimer( int iActive );
void DrawTopLayer();
void DrawBottomLayer();
void TweenOnScreenFromMenu( ScreenMessage smSendWhenDone, bool bLeaveKeepAliveOn = false );
2002-05-28 20:01:22 +00:00
void TweenOffScreenToMenu( ScreenMessage smSendWhenDone );
void ImmedOnScreenFromMenu( bool bLeaveKeepAliveOn = false );
2002-09-04 22:56:19 +00:00
void ImmedOffScreenToMenu();
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:
void TweenTopLayerOnScreen(float tm=-1);
2002-12-19 22:09:44 +00:00
void TweenTopLayerOffScreen(float tm=-1);
2002-05-28 20:01:22 +00:00
void TweenBottomLayerOnScreen();
void TweenBottomLayerOffScreen();
2002-09-29 05:06:18 +00:00
public:
Sprite m_sprTopEdge;
Sprite m_sprStyleIcon;
MenuTimer m_MenuTimer;
Sprite m_sprBottomEdge;
2002-09-29 05:06:18 +00:00
BGAnimation m_Background;
Quad m_quadBrightness; // for darkening the background
TipDisplay m_textHelp;
2002-08-27 16:53:25 +00:00
TransitionFadeWipe m_Wipe; // for going back
TransitionKeepAlive m_KeepAlive; // going back and forward
TransitionInvisible m_Invisible; // for going forward to Menu
2002-05-27 08:23:27 +00:00
2002-05-19 01:59:48 +00:00
RageSoundSample m_soundSwoosh;
RageSoundSample m_soundBack;
};
#endif