Files
itgmania212121/stepmania/src/BPMDisplay.h
T

78 lines
2.4 KiB
C++
Raw Normal View History

2004-06-07 21:14:03 +00:00
/* BPMDisplay - displays a BPM or a range of BPMs. */
2001-12-28 10:15:59 +00:00
2004-06-07 21:14:03 +00:00
#ifndef BPM_DISPLAY_H
#define BPM_DISPLAY_H
2001-12-28 10:15:59 +00:00
#include "BitmapText.h"
2005-02-09 05:27:51 +00:00
#include "AutoActor.h"
2005-02-02 03:58:41 +00:00
#include "ThemeMetric.h"
2006-01-07 04:11:29 +00:00
#include "LocalizedString.h"
class Song;
2003-07-20 04:22:25 +00:00
class Course;
2005-09-03 06:13:30 +00:00
struct DisplayBpms;
2001-12-28 10:15:59 +00:00
2006-08-16 07:20:45 +00:00
class BPMDisplay : public BitmapText
2001-12-28 10:15:59 +00:00
{
public:
BPMDisplay();
2006-10-20 00:17:51 +00:00
virtual BPMDisplay *Copy() const;
void Load();
2002-02-24 01:43:11 +00:00
virtual void Update( float fDeltaTime );
void LoadFromNode( const XNode *pNode );
2005-07-07 10:48:02 +00:00
void SetBpmFromSong( const Song* pSong );
void SetBpmFromCourse( const Course* pCourse );
void SetConstantBpm( float fBPM );
2003-03-30 19:30:54 +00:00
void CycleRandomly();
void NoBPM();
void SetVarious();
2006-08-16 07:02:46 +00:00
void SetFromGameState();
// Lua
virtual void PushSelf( lua_State *L );
2001-12-28 10:15:59 +00:00
protected:
2003-07-20 04:22:25 +00:00
float GetActiveBPM() const;
void SetBPMRange( const DisplayBpms &bpms );
2003-07-20 04:22:25 +00:00
2005-02-02 03:58:41 +00:00
ThemeMetric<RageColor> NORMAL_COLOR;
ThemeMetric<RageColor> CHANGE_COLOR;
ThemeMetric<RageColor> EXTRA_COLOR;
ThemeMetric<bool> CYCLE;
2006-06-24 05:13:54 +00:00
ThemeMetric<RString> SEPARATOR;
ThemeMetric<RString> NO_BPM_TEXT;
2005-02-02 03:58:41 +00:00
2003-07-20 04:22:25 +00:00
float m_fBPMFrom, m_fBPMTo;
int m_iCurrentBPM;
vector<float> m_BPMS;
float m_fPercentInState;
float m_fCycleTime;
2001-12-28 10:15:59 +00:00
};
2002-11-16 08:55:46 +00:00
#endif
2004-06-07 21:14:03 +00:00
/*
* (c) 2001-2002 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.
*/