2004-05-01 23:19:33 +00:00
|
|
|
#ifndef ScreenWithMenuElements_H
|
|
|
|
|
#define ScreenWithMenuElements_H
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2002-05-19 01:59:48 +00:00
|
|
|
#include "Screen.h"
|
2003-04-13 01:09:19 +00:00
|
|
|
#include "Transition.h"
|
2003-11-04 21:49:38 +00:00
|
|
|
#include "ActorUtil.h"
|
2005-02-17 06:13:23 +00:00
|
|
|
#include "ThemeMetric.h"
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2003-11-07 20:10:38 +00:00
|
|
|
class MenuTimer;
|
2005-09-07 22:25:10 +00:00
|
|
|
class MemoryCardDisplay;
|
2004-05-01 23:19:33 +00:00
|
|
|
|
|
|
|
|
class ScreenWithMenuElements : public Screen
|
2002-03-30 20:00:13 +00:00
|
|
|
{
|
|
|
|
|
public:
|
2006-01-15 18:54:03 +00:00
|
|
|
ScreenWithMenuElements();
|
2005-02-23 06:29:05 +00:00
|
|
|
virtual void Init();
|
2005-07-15 01:18:42 +00:00
|
|
|
virtual void BeginScreen();
|
2004-05-01 23:19:33 +00:00
|
|
|
virtual ~ScreenWithMenuElements();
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2006-11-21 20:04:51 +00:00
|
|
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
2005-02-17 06:13:23 +00:00
|
|
|
void Update( float fDeltaTime );
|
2005-10-13 22:17:13 +00:00
|
|
|
void StartTransitioningScreen( ScreenMessage smSendWhenDone );
|
2005-09-10 20:02:56 +00:00
|
|
|
virtual void Cancel( ScreenMessage smSendWhenDone );
|
2003-03-09 00:55:49 +00:00
|
|
|
bool IsTransitioning();
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2003-11-07 20:10:38 +00:00
|
|
|
void StopTimer();
|
2004-05-08 06:42:23 +00:00
|
|
|
void ResetTimer();
|
2003-11-07 20:10:38 +00:00
|
|
|
|
2008-11-24 04:44:12 +00:00
|
|
|
// Sub-classes can hook these and do special actions that won't be triggered automatically by an "On"/"Off" command
|
2005-07-14 22:36:50 +00:00
|
|
|
virtual void TweenOnScreen();
|
|
|
|
|
virtual void TweenOffScreen();
|
2005-04-02 02:45:17 +00:00
|
|
|
|
2005-07-12 05:44:54 +00:00
|
|
|
//
|
|
|
|
|
// Lua
|
|
|
|
|
//
|
|
|
|
|
virtual void PushSelf( lua_State *L );
|
|
|
|
|
|
2004-05-01 23:19:33 +00:00
|
|
|
protected:
|
2005-03-22 22:53:39 +00:00
|
|
|
virtual void StartPlayingMusic();
|
2007-03-05 23:27:15 +00:00
|
|
|
void SetHelpText( RString s );
|
2005-03-22 22:53:39 +00:00
|
|
|
|
2005-02-12 20:31:15 +00:00
|
|
|
AutoActor m_sprUnderlay;
|
2006-03-13 23:10:22 +00:00
|
|
|
MemoryCardDisplay *m_MemoryCardDisplay[NUM_PLAYERS];
|
2003-11-07 20:10:38 +00:00
|
|
|
MenuTimer *m_MenuTimer;
|
2005-01-05 04:32:12 +00:00
|
|
|
AutoActor m_sprOverlay;
|
2009-10-26 04:33:38 +00:00
|
|
|
vector<Actor*> m_vDecorations;
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2006-03-13 23:10:22 +00:00
|
|
|
Transition m_In;
|
|
|
|
|
Transition m_Out;
|
|
|
|
|
Transition m_Cancel;
|
2005-03-21 01:14:30 +00:00
|
|
|
|
2006-03-13 23:10:22 +00:00
|
|
|
ThemeMetric<bool> PLAY_MUSIC;
|
2008-08-09 22:47:58 +00:00
|
|
|
ThemeMetric<bool> MUSIC_ALIGN_BEAT;
|
2006-03-13 23:10:22 +00:00
|
|
|
ThemeMetric<bool> CANCEL_TRANSITIONS_OUT;
|
|
|
|
|
ThemeMetric<float> TIMER_SECONDS;
|
2008-03-26 06:06:00 +00:00
|
|
|
ThemeMetric<RString> TIMER_METRICS_GROUP;
|
2008-09-24 16:46:34 +00:00
|
|
|
ThemeMetric<bool> RESET_GAMESTATE;
|
2005-09-07 22:25:10 +00:00
|
|
|
|
2005-09-22 01:17:35 +00:00
|
|
|
private:
|
2006-03-13 23:10:22 +00:00
|
|
|
RString m_sPathToMusic;
|
2002-03-30 20:00:13 +00:00
|
|
|
};
|
2002-11-16 08:07:38 +00:00
|
|
|
|
2006-06-24 18:06:05 +00:00
|
|
|
class ScreenWithMenuElementsSimple: public ScreenWithMenuElements
|
|
|
|
|
{
|
|
|
|
|
public:
|
2006-09-15 01:47:24 +00:00
|
|
|
void MenuStart( const InputEventPlus &input );
|
|
|
|
|
void MenuBack( const InputEventPlus &input );
|
2006-06-24 18:06:05 +00:00
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Lua
|
|
|
|
|
//
|
|
|
|
|
virtual void PushSelf( lua_State *L );
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
};
|
|
|
|
|
|
2004-05-02 01:36:28 +00:00
|
|
|
#endif
|
|
|
|
|
|
2004-06-08 05:22:33 +00:00
|
|
|
/*
|
|
|
|
|
* (c) 2004 Chris Danford
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
|
* distribute, and/or sell copies of the Software, and to permit persons to
|
|
|
|
|
* whom the Software is furnished to do so, provided that the above
|
|
|
|
|
* copyright notice(s) and this permission notice appear in all copies of
|
|
|
|
|
* the Software and that both the above copyright notice(s) and this
|
|
|
|
|
* permission notice appear in supporting documentation.
|
|
|
|
|
*
|
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
|
|
|
|
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
|
|
|
|
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
|
|
|
|
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
|
|
|
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
|
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
*/
|