Files
itgmania212121/stepmania/src/DifficultyList.h
T

97 lines
2.5 KiB
C++
Raw Normal View History

2004-06-07 21:14:03 +00:00
#ifndef DIFFICULTY_LIST_H
#define DIFFICULTY_LIST_H
2003-11-17 04:19:29 +00:00
#include "ActorFrame.h"
#include "ActorUtil.h"
#include "PlayerNumber.h"
2004-01-11 07:12:53 +00:00
#include "BitmapText.h"
2004-04-23 00:25:42 +00:00
#include "DifficultyMeter.h"
#include "ThemeMetric.h"
2004-01-11 07:12:53 +00:00
2003-11-17 04:19:29 +00:00
class Song;
class Steps;
class DifficultyList: public ActorFrame
{
public:
DifficultyList();
2005-02-02 05:07:49 +00:00
virtual ~DifficultyList();
2005-05-31 08:03:18 +00:00
virtual void SetName( const CString &sName );
2003-11-17 04:19:29 +00:00
void Load();
void SetFromGameState();
void TweenOnScreen();
void TweenOffScreen();
void Hide();
void Show();
private:
2004-01-11 07:12:53 +00:00
void UpdatePositions();
2004-02-18 23:58:33 +00:00
void PositionItems();
int GetCurrentRowIndex( PlayerNumber pn ) const;
2004-02-18 23:58:33 +00:00
void HideRows();
2003-11-17 04:19:29 +00:00
2005-02-02 05:07:49 +00:00
ThemeMetric<float> ITEMS_SPACING_Y;
2005-02-03 03:10:27 +00:00
ThemeMetric<int> NUM_SHOWN_ITEMS;
2005-02-02 05:07:49 +00:00
ThemeMetric<bool> CAPITALIZE_DIFFICULTY_NAMES;
ThemeMetric<apActorCommands> MOVE_COMMAND;
2003-11-17 04:19:29 +00:00
AutoActor m_Cursors[NUM_PLAYERS];
2003-11-18 16:40:01 +00:00
ActorFrame m_CursorFrames[NUM_PLAYERS];
2004-04-23 00:25:42 +00:00
struct Line
{
DifficultyMeter m_Meter;
};
vector<Line> m_Lines;
2003-11-17 04:19:29 +00:00
Song *m_CurSong;
2004-01-11 07:12:53 +00:00
bool m_bShown;
struct Row
{
Row()
{
m_Steps = NULL;
m_dc = DIFFICULTY_INVALID;
m_fY = 0;
m_bHidden = false;
}
2004-01-11 07:12:53 +00:00
Steps *m_Steps;
Difficulty m_dc;
2004-01-11 07:12:53 +00:00
float m_fY;
bool m_bHidden; // currently off screen
};
vector<Row> m_Rows;
2003-11-17 04:19:29 +00:00
};
#endif
2004-06-07 21:14:03 +00:00
2004-01-11 07:12:53 +00:00
/*
2004-06-07 21:14:03 +00:00
* (c) 2003-2004 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.
2004-01-11 07:12:53 +00:00
*/