Files
itgmania212121/stepmania/src/PercentageDisplay.h
T

74 lines
2.4 KiB
C++
Raw Normal View History

2005-02-13 03:40:37 +00:00
/* PercentageDisplay - An Actor that displays a percentage. */
#ifndef PERCENTAGE_DISPLAY_H
#define PERCENTAGE_DISPLAY_H
#include "ActorFrame.h"
#include "PlayerNumber.h"
#include "BitmapText.h"
#include "StageStats.h"
2005-02-02 07:14:09 +00:00
#include "ThemeMetric.h"
class PlayerState;
class PercentageDisplay: public ActorFrame
{
public:
PercentageDisplay();
2005-08-30 02:01:05 +00:00
void Load( const PlayerState *pPlayerState, const PlayerStageStats *pPlayerStageStats );
2006-01-22 01:00:06 +00:00
void Load( const PlayerState *pPlayerState, const PlayerStageStats *pPlayerStageStats, const RString &sMetricsGroup, bool bAutoRefresh );
void Update( float fDeltaTime );
virtual void LoadFromNode( const XNode* pNode );
2006-10-20 00:17:51 +00:00
virtual PercentageDisplay *Copy() const;
2008-04-02 14:05:33 +00:00
bool ShowDancePointsNotPercentage() const;
2005-08-30 02:01:05 +00:00
//
// Lua
//
virtual void PushSelf( lua_State *L );
private:
2005-08-30 02:01:05 +00:00
int m_iDancePointsDigits;
bool m_bUseRemainder;
bool m_bApplyScoreDisplayOptions;
2005-02-02 07:14:09 +00:00
2003-10-05 00:30:55 +00:00
void Refresh();
const PlayerState *m_pPlayerState;
const PlayerStageStats *m_pPlayerStageStats;
bool m_bAutoRefresh;
int m_Last;
int m_LastMax;
BitmapText m_textPercent;
2003-10-05 00:30:55 +00:00
BitmapText m_textPercentRemainder;
2006-09-21 02:09:44 +00:00
LuaReference m_Format;
};
#endif
2004-06-08 00:08:04 +00:00
/*
2004-06-08 00:08:04 +00:00
* (c) 2001-2003 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.
*/