2005-02-13 03:40:37 +00:00
|
|
|
/* PercentageDisplay - An Actor that displays a percentage. */
|
|
|
|
|
|
2003-10-04 08:20:37 +00:00
|
|
|
#ifndef PERCENTAGE_DISPLAY_H
|
|
|
|
|
#define PERCENTAGE_DISPLAY_H
|
|
|
|
|
|
|
|
|
|
#include "ActorFrame.h"
|
|
|
|
|
#include "PlayerNumber.h"
|
|
|
|
|
#include "BitmapText.h"
|
2004-03-24 01:11:16 +00:00
|
|
|
#include "StageStats.h"
|
2005-02-02 07:14:09 +00:00
|
|
|
#include "ThemeMetric.h"
|
2003-10-04 08:20:37 +00:00
|
|
|
|
2005-08-23 21:04:35 +00:00
|
|
|
class PlayerState;
|
2005-04-05 08:50:55 +00:00
|
|
|
|
2003-10-04 08:20:37 +00:00
|
|
|
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 );
|
2003-10-04 08:20:37 +00:00
|
|
|
void Update( float fDeltaTime );
|
2006-10-09 08:24:10 +00:00
|
|
|
virtual void LoadFromNode( const XNode* pNode );
|
2006-10-20 00:17:51 +00:00
|
|
|
virtual PercentageDisplay *Copy() const;
|
2003-10-04 08:20:37 +00:00
|
|
|
|
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 );
|
|
|
|
|
|
2003-10-04 08:20:37 +00:00
|
|
|
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();
|
2005-08-23 21:04:35 +00:00
|
|
|
const PlayerState *m_pPlayerState;
|
|
|
|
|
const PlayerStageStats *m_pPlayerStageStats;
|
2004-03-24 02:22:11 +00:00
|
|
|
bool m_bAutoRefresh;
|
2003-10-04 08:20:37 +00:00
|
|
|
int m_Last;
|
2005-04-05 08:50:55 +00:00
|
|
|
int m_LastMax;
|
2003-10-04 08:20:37 +00:00
|
|
|
BitmapText m_textPercent;
|
2003-10-05 00:30:55 +00:00
|
|
|
BitmapText m_textPercentRemainder;
|
2006-07-05 03:18:26 +00:00
|
|
|
|
2006-09-21 02:09:44 +00:00
|
|
|
LuaReference m_Format;
|
2003-10-04 08:20:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|
2004-06-08 00:08:04 +00:00
|
|
|
|
2003-10-04 08:20:37 +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.
|
2003-10-04 08:20:37 +00:00
|
|
|
*/
|