Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

EditCoursesSongMenu.h

Go to the documentation of this file.
00001 /* Class: EditCoursesSongMenu - Song selection subscreen for EditCoursesMenu */ 00002 00003 #ifndef EDIT_COURSES_SONG_MENU_H 00004 #define EDIT_COURSES_SONG_MENU_H 00005 00006 #include "ActorFrame.h" 00007 #include "BitmapText.h" 00008 #include "GameConstantsAndTypes.h" 00009 #include "RageSound.h" 00010 #include "Course.h" 00011 #include "ScreenMessage.h" 00012 #include "song.h" 00013 #include "Sprite.h" 00014 00015 00016 class EditCoursesSongMenu: public ActorFrame 00017 { 00018 public: 00019 EditCoursesSongMenu(); 00020 ~EditCoursesSongMenu(); 00021 void SaveToCourseEntry( CourseEntry *pEntry ); 00022 void LoadFromCourseEntry( const CourseEntry *pEntry ); 00023 00024 bool CanGoLeft(); 00025 bool CanGoRight(); 00026 00027 void Up(); 00028 void Down(); 00029 void Left(); 00030 void Right(); 00031 void Start(); 00032 void HandleScreenMessage( const ScreenMessage SM ); 00033 00034 enum Row 00035 { 00036 ROW_GROUP, 00037 ROW_SONG, 00038 ROW_TYPE, 00039 ROW_DIFFICULTY, 00040 ROW_LOW_METER, 00041 ROW_HIGH_METER, 00042 ROW_BEST_WORST_VALUE, 00043 NUM_ROWS 00044 } m_SelectedRow; 00045 CString RowToString( Row r ) 00046 { 00047 const CString s[NUM_ROWS] = 00048 { 00049 "Group", 00050 "Song", 00051 "Type", 00052 "Difficulty", 00053 "Low Meter", 00054 "High Meter", 00055 "Best/Worst Value", 00056 }; 00057 return s[r]; 00058 } 00059 00060 CString GetSelectedGroup() const { return m_aGroups[ m_iSelection[ROW_GROUP] ]; } 00061 Song *GetSelectedSong() const; 00062 Difficulty GetSelectedDifficulty() const { if( m_iSelection[ROW_DIFFICULTY] == 0 ) return DIFFICULTY_INVALID; else return (Difficulty) (m_iSelection[ROW_DIFFICULTY]-1); } 00063 CourseEntryType GetSelectedType() const { return (CourseEntryType) m_iSelection[ROW_TYPE]; } 00064 int GetLowMeter() const { return m_iSelection[ROW_LOW_METER] == 0? -1:m_iSelection[ROW_LOW_METER]; } // any, 1, 2, 3 ... 00065 int GetHighMeter() const { return m_iSelection[ROW_HIGH_METER] == 0? -1:m_iSelection[ROW_HIGH_METER]; } 00066 int GetBestWorst() const { return m_iSelection[ROW_BEST_WORST_VALUE]; } 00067 00068 private: 00069 void SetGroupByName( CString sGroup ); 00070 void UpdateSongList(); 00071 bool ChangeRow( int add ); 00072 Sprite m_sprArrows[2]; 00073 00074 int m_iSelection[NUM_ROWS]; 00075 BitmapText m_textLabel[NUM_ROWS]; 00076 BitmapText m_textValue[NUM_ROWS]; 00077 00078 vector<Song*> m_aSongs; 00079 vector<CString> m_aGroups; 00080 00081 void OnRowValueChanged( Row row ); 00082 void ChangeToRow( Row newRow ); 00083 00084 RageSound m_soundChangeRow; 00085 RageSound m_soundChangeValue; 00086 }; 00087 00088 #endif 00089 00090 /* 00091 * (c) 2001-2004 Chris Danford, Glenn Maynard 00092 * All rights reserved. 00093 * 00094 * Permission is hereby granted, free of charge, to any person obtaining a 00095 * copy of this software and associated documentation files (the 00096 * "Software"), to deal in the Software without restriction, including 00097 * without limitation the rights to use, copy, modify, merge, publish, 00098 * distribute, and/or sell copies of the Software, and to permit persons to 00099 * whom the Software is furnished to do so, provided that the above 00100 * copyright notice(s) and this permission notice appear in all copies of 00101 * the Software and that both the above copyright notice(s) and this 00102 * permission notice appear in supporting documentation. 00103 * 00104 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00105 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00106 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00107 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00108 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00109 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00110 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00111 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00112 * PERFORMANCE OF THIS SOFTWARE. 00113 */

Generated on Thu Jan 27 20:57:20 2005 for StepMania by doxygen 1.3.7