Files
itgmania212121/stepmania/src/PaneDisplay.h
T

85 lines
2.5 KiB
C++
Raw Normal View History

2005-02-13 03:40:37 +00:00
/* PaneDisplay - An Actor that displays song information. */
2003-11-17 06:08:30 +00:00
#ifndef PANE_DISPLAY_H
#define PANE_DISPLAY_H
#include "ActorFrame.h"
2006-09-21 02:48:15 +00:00
#include "ActorUtil.h"
2003-11-17 06:08:30 +00:00
#include "PlayerNumber.h"
#include "BitmapText.h"
2005-02-09 05:27:51 +00:00
#include "AutoActor.h"
2003-11-17 06:08:30 +00:00
#include "GameConstantsAndTypes.h"
2005-06-12 00:44:59 +00:00
#include "ThemeMetric.h"
class XNode;
2006-01-07 04:11:29 +00:00
#include "LocalizedString.h"
2003-11-17 06:08:30 +00:00
/* If the same piece of data is in multiple panes, use separate contents entries,
* so it can be themed differently. */
enum PaneContents
{
2003-11-26 05:05:11 +00:00
SONG_NUM_STEPS,
SONG_JUMPS,
SONG_HOLDS,
2005-04-25 11:24:27 +00:00
SONG_ROLLS,
2003-11-26 05:05:11 +00:00
SONG_MINES,
SONG_HANDS,
2003-11-17 06:08:30 +00:00
SONG_MACHINE_HIGH_SCORE,
2003-11-26 05:20:59 +00:00
SONG_MACHINE_HIGH_NAME,
2003-11-17 06:08:30 +00:00
SONG_PROFILE_HIGH_SCORE,
2007-06-09 16:59:19 +00:00
NUM_PaneContents
2003-11-17 06:08:30 +00:00
};
2006-10-07 08:56:58 +00:00
#define FOREACH_PaneContents( p ) FOREACH_ENUM( PaneContents, p )
2003-11-17 06:08:30 +00:00
class PaneDisplay: public ActorFrame
{
public:
2006-10-20 00:17:51 +00:00
virtual PaneDisplay *Copy() const;
2003-11-17 06:08:30 +00:00
2006-01-22 01:00:06 +00:00
void Load( const RString &sMetricsGroup, PlayerNumber pn );
2006-08-10 20:43:49 +00:00
void SetFromGameState();
2003-11-17 06:08:30 +00:00
void LoadFromNode( const XNode *pNode );
2005-12-05 19:09:22 +00:00
2005-07-29 22:59:11 +00:00
// Lua
void PushSelf( lua_State *L );
2003-11-17 06:08:30 +00:00
private:
void SetContent( PaneContents c );
2007-06-09 16:59:19 +00:00
BitmapText m_textContents[NUM_PaneContents];
AutoActor m_Labels[NUM_PaneContents];
2003-11-17 06:08:30 +00:00
ActorFrame m_ContentsFrame;
PlayerNumber m_PlayerNumber;
2006-01-07 04:11:29 +00:00
LocalizedString EMPTY_MACHINE_HIGH_SCORE_NAME;
LocalizedString NOT_AVAILABLE;
2003-11-17 06:08:30 +00:00
};
#endif
2004-06-07 21:14:03 +00:00
/*
* (c) 2003 Glenn Maynard
* 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.
*/