Files
itgmania212121/stepmania/src/DifficultyMeter.h
T

83 lines
2.8 KiB
C++
Raw Normal View History

2004-06-07 21:14:03 +00:00
/* DifficultyMeter - A meter represention of how hard a Steps is. */
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
2003-11-14 23:05:03 +00:00
class DifficultyMeter: public ActorFrame
2002-01-16 10:01:32 +00:00
{
public:
2003-03-09 00:55:49 +00:00
DifficultyMeter();
2002-01-16 10:01:32 +00:00
2006-01-22 01:00:06 +00:00
void Load( const RString &sType );
2006-01-22 01:00:06 +00:00
void LoadFromNode( const RString& sDir, const XNode* pNode );
2005-07-18 22:00:19 +00:00
virtual Actor *Copy() const;
2003-07-21 22:38:41 +00:00
void SetFromGameState( PlayerNumber pn );
void SetFromMeterAndDifficulty( int iMeter, Difficulty dc );
void SetFromMeterAndCourseDifficulty( 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:
2006-01-22 01:00:06 +00:00
void SetInternal( int iMeter, Difficulty dc, const RString &sDifficultyCommand, const RString &sDescription );
2005-02-23 22:14:31 +00:00
BitmapText m_textFeet; // bar
2006-01-22 01:00:06 +00:00
RString m_sCurDifficultyCommand;
AutoActor m_Difficulty; /* "easy", "hard" */
BitmapText m_textMeter; /* 3, 9 */
BitmapText m_textEditDescription;
2003-11-15 00:26:30 +00:00
ThemeMetric<int> m_iNumFeetInMeter;
ThemeMetric<int> m_iMaxFeetInMeter;
ThemeMetric<bool> m_bShowFeet;
ThemeMetric<bool> m_bShowDifficulty;
ThemeMetric<bool> m_bShowMeter;
ThemeMetric<bool> m_bShowEditDescription;
2005-04-13 10:49:59 +00:00
ThemeMetric<bool> m_bAutoColorFeet;
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.
*/