Files
itgmania212121/stepmania/src/MenuElements.h
T

75 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"
2002-07-23 01:41:40 +00:00
#include "TipDisplay.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();
2002-08-27 16:53:25 +00:00
void Load( CString sBackgroundPath, CString sTopEdgePath, CString sHelpText, bool bTimerEnabled, int iTimerSeconds );
2002-07-11 19:02:26 +00:00
void StallTimer();
void SetTimer( int iTimerSeconds );
void StopTimer();
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
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;
Sprite m_sprBottomEdge;
2002-05-27 18:36:01 +00:00
Sprite m_sprBG;
2002-07-23 01:41:40 +00:00
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;
};