Files
itgmania212121/src/MusicWheelItem.h
T

104 lines
3.3 KiB
C++
Raw Normal View History

2004-06-07 21:14:03 +00:00
/* MusicWheelItem - An item on the music wheel. */
2006-08-10 00:04:14 +00:00
#ifndef MUSIC_WHEEL_ITEM_H
#define MUSIC_WHEEL_ITEM_H
2003-03-31 23:06:15 +00:00
#include "ActorFrame.h"
#include "BitmapText.h"
#include "WheelNotifyIcon.h"
#include "TextBanner.h"
2003-06-16 17:28:58 +00:00
#include "GameConstantsAndTypes.h"
2004-12-02 06:29:20 +00:00
#include "GameCommand.h"
#include "WheelItemBase.h"
2006-12-07 07:46:27 +00:00
#include "AutoActor.h"
2007-05-03 23:26:22 +00:00
#include "ThemeMetric.h"
2003-03-31 23:06:15 +00:00
class Course;
class Song;
2003-03-31 03:11:31 +00:00
2008-02-15 09:51:56 +00:00
struct MusicWheelItemData;
enum MusicWheelItemType
{
MusicWheelItemType_Song,
MusicWheelItemType_SectionExpanded,
MusicWheelItemType_SectionCollapsed,
MusicWheelItemType_Roulette,
MusicWheelItemType_Course,
MusicWheelItemType_Sort,
MusicWheelItemType_Mode,
NUM_MusicWheelItemType,
MusicWheelItemType_Invalid,
};
const RString& MusicWheelItemTypeToString( MusicWheelItemType i );
class MusicWheelItem : public WheelItemBase
{
public:
2006-01-22 01:00:06 +00:00
MusicWheelItem(RString sType = "MusicWheelItem");
2005-09-09 03:23:10 +00:00
MusicWheelItem( const MusicWheelItem &cpy );
virtual ~MusicWheelItem();
2006-10-20 00:17:51 +00:00
virtual MusicWheelItem *Copy() const { return new MusicWheelItem(*this); }
virtual void LoadFromWheelItemData( const WheelItemBaseData* pWID, int iIndex, bool bHasFocus, int iDrawIndex );
2006-11-13 23:11:25 +00:00
virtual void HandleMessage( const Message &msg );
void RefreshGrades();
2005-09-09 04:02:05 +00:00
private:
2007-05-03 23:26:22 +00:00
ThemeMetric<bool> GRADES_SHOW_MACHINE;
2008-02-15 09:51:56 +00:00
AutoActor m_sprColorPart[NUM_MusicWheelItemType];
AutoActor m_sprNormalPart[NUM_MusicWheelItemType];
TextBanner m_TextBanner; // used by Type_Song instead of m_pText
BitmapText *m_pText[NUM_MusicWheelItemType];
BitmapText *m_pTextSectionCount;
2003-03-31 03:11:31 +00:00
WheelNotifyIcon m_WheelNotifyIcon;
2007-05-03 23:13:32 +00:00
AutoActor m_pGradeDisplay[NUM_PLAYERS];
};
2008-02-15 09:51:56 +00:00
struct MusicWheelItemData : public WheelItemBaseData
2003-03-31 23:06:15 +00:00
{
2008-02-15 09:51:56 +00:00
MusicWheelItemData() : m_iSectionCount(0) { }
MusicWheelItemData( WheelItemDataType type, Song* pSong, RString sSectionName, Course* pCourse, RageColor color, int iSectionCount );
2003-03-31 23:06:15 +00:00
Course* m_pCourse;
Song* m_pSong;
2007-05-03 17:24:37 +00:00
WheelNotifyIcon::Flags m_Flags;
2008-02-15 09:51:56 +00:00
// for TYPE_SORT
int m_iSectionCount;
// for TYPE_SORT
2006-01-22 01:00:06 +00:00
RString m_sLabel;
2006-10-01 20:13:27 +00:00
HiddenPtr<GameCommand> m_pAction;
2003-03-31 23:06:15 +00:00
};
#endif
2004-06-07 21:14:03 +00:00
/*
* (c) 2001-2004 Chris Danford, Chris Gomez, 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.
*/