Files
itgmania212121/stepmania/src/DifficultyMeter.h
T

90 lines
2.9 KiB
C++
Raw Normal View History

/* DifficultyDisplay - A graphical representation of a Steps or a Trail - has a difficulty number, meter, text, edit description. */
2002-01-16 10:01:32 +00:00
2004-06-07 21:14:03 +00:00
#ifndef DIFFICULTY_METER_H
#define DIFFICULTY_METER_H
2002-01-16 10:01:32 +00:00
#include "BitmapText.h"
2003-07-21 22:38:41 +00:00
#include "PlayerNumber.h"
2005-02-09 05:27:51 +00:00
#include "AutoActor.h"
2003-11-15 00:26:30 +00:00
#include "GameConstantsAndTypes.h"
#include "ActorUtil.h"
2005-01-22 19:36:39 +00:00
#include "Difficulty.h"
2005-02-09 05:27:51 +00:00
#include "ActorFrame.h"
#include "ThemeMetric.h"
2003-08-03 00:13:55 +00:00
class Steps;
class Trail;
2002-01-16 10:01:32 +00:00
class DifficultyDisplay : public ActorFrame
2002-01-16 10:01:32 +00:00
{
public:
DifficultyDisplay();
2002-01-16 10:01:32 +00:00
2006-01-22 01:00:06 +00:00
void Load( const RString &sType );
void LoadFromNode( const XNode* pNode );
virtual DifficultyDisplay *Copy() const;
2003-07-21 22:38:41 +00:00
void SetFromGameState( PlayerNumber pn );
2007-02-22 00:39:52 +00:00
void SetFromStepsTypeAndMeterAndDifficulty( StepsType st, int iMeter, Difficulty dc );
void SetFromStepsTypeAndMeterAndCourseDifficulty( StepsType st, int iMeter, CourseDifficulty cd );
2004-05-29 04:50:47 +00:00
void SetFromSteps( const Steps* pSteps );
void SetFromTrail( const Trail* pTrail );
2003-07-21 22:38:41 +00:00
void Unset();
2002-01-16 10:01:32 +00:00
// Lua
void PushSelf( lua_State *L );
2002-01-16 10:01:32 +00:00
private:
2007-02-22 00:39:52 +00:00
struct SetParams
{
const Steps *pSteps;
const Trail *pTrail;
2007-02-22 00:39:52 +00:00
int iMeter;
StepsType st;
Difficulty dc;
bool bIsCourseDifficulty;
RString sEditDescription;
};
void SetInternal( const SetParams &params );
AutoActor m_sprFrame;
BitmapText m_textTicks; /* 111100000 */
BitmapText m_textMeter; /* 3, 9 */
BitmapText m_textEditDescription;
2003-11-15 00:26:30 +00:00
2007-02-22 00:39:52 +00:00
ThemeMetric<int> m_iNumTicks;
ThemeMetric<int> m_iMaxTicks;
ThemeMetric<bool> m_bShowTicks;
ThemeMetric<bool> m_bShowMeter;
ThemeMetric<bool> m_bShowEditDescription;
2006-01-22 01:00:06 +00:00
ThemeMetric<RString> m_sZeroMeterString;
2002-01-16 10:01:32 +00:00
};
#endif
2004-06-07 21:14:03 +00:00
/*
* (c) 2001-2004 Chris Danford, 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.
*/