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

EditCoursesMenu.h

Go to the documentation of this file.
00001 /* EditCoursesMenu - UI on Edit Courses screen. */ 00002 00003 #ifndef EDIT_COURSES_MENU_H 00004 #define EDIT_COURSES_MENU_H 00005 00006 #include "ActorFrame.h" 00007 #include "Banner.h" 00008 #include "TextBanner.h" 00009 #include "GameConstantsAndTypes.h" 00010 #include "RageSound.h" 00011 #include "Course.h" 00012 #include "ScreenMessage.h" 00013 #include "EditCoursesSongMenu.h" 00014 00015 class EditCoursesMenu: public ActorFrame 00016 { 00017 public: 00018 EditCoursesMenu(); 00019 ~EditCoursesMenu(); 00020 virtual void DrawPrimitives(); 00021 virtual void Update( float fDeltaTime ); 00022 00023 bool CanGoUp(); 00024 bool CanGoDown(); 00025 bool CanGoLeft(); 00026 bool CanGoRight(); 00027 00028 void Up(); 00029 void Down(); 00030 void Left(); 00031 void Right(); 00032 void Start(); 00033 void HandleScreenMessage( const ScreenMessage SM ); 00034 00035 enum Row 00036 { 00037 ROW_COURSE, 00038 ROW_COURSE_OPTIONS, 00039 ROW_ACTION, 00040 ROW_ENTRY, 00041 ROW_ENTRY_TYPE, 00042 ROW_ENTRY_OPTIONS, 00043 ROW_ENTRY_PLAYER_OPTIONS, 00044 ROW_ENTRY_SONG_OPTIONS, 00045 NUM_ROWS 00046 } m_SelectedRow; 00047 CString RowToString( Row r ) 00048 { 00049 const CString s[NUM_ROWS] = 00050 { 00051 "Course", 00052 "Course Options", 00053 "Action", 00054 "Entry", 00055 "Entry Type", 00056 "Entry Options", 00057 "Entry Player Options", 00058 "Entry Song Options" 00059 }; 00060 return s[r]; 00061 } 00062 00063 enum Action 00064 { 00065 save, 00066 add_entry, 00067 delete_selected_entry, 00068 NUM_ACTIONS 00069 }; 00070 CString ActionToString( Action a ) 00071 { 00072 switch( a ) 00073 { 00074 case save: return "Save Current Course"; 00075 case add_entry: return "Duplicate Current Entry/Add Entry"; 00076 case delete_selected_entry: return "Delete Selected Entry"; 00077 default: ASSERT(0); return ""; 00078 } 00079 } 00080 00081 Course* GetSelectedCourse() { return m_pCourses[m_iSelection[ROW_COURSE]]; } 00082 CourseEntry* GetSelectedEntry(); 00083 Action GetSelectedAction() { return (Action)m_iSelection[ROW_ACTION]; } 00084 CourseEntryType GetSelectedEntryType() { return (CourseEntryType)m_iSelection[ROW_ENTRY_TYPE]; } 00085 00086 private: 00087 Sprite m_sprArrows[2]; 00088 00089 int m_iSelection[NUM_ROWS]; 00090 BitmapText m_textLabel[NUM_ROWS]; 00091 BitmapText m_textValue[NUM_ROWS]; 00092 00093 Banner m_CourseBanner; 00094 Banner m_EntryBanner; 00095 TextBanner m_EntryTextBanner; 00096 00097 vector<Course*> m_pCourses; 00098 00099 void OnRowValueChanged( Row row ); 00100 void ChangeToRow( Row newRow ); 00101 00102 RageSound m_soundChangeRow; 00103 RageSound m_soundChangeValue; 00104 RageSound m_soundSave; 00105 00106 EditCoursesSongMenu m_SongMenu; 00107 bool m_bInSongMenu; 00108 }; 00109 00110 #endif 00111 00112 /* 00113 * (c) 2003-2004 Chris Danford 00114 * All rights reserved. 00115 * 00116 * Permission is hereby granted, free of charge, to any person obtaining a 00117 * copy of this software and associated documentation files (the 00118 * "Software"), to deal in the Software without restriction, including 00119 * without limitation the rights to use, copy, modify, merge, publish, 00120 * distribute, and/or sell copies of the Software, and to permit persons to 00121 * whom the Software is furnished to do so, provided that the above 00122 * copyright notice(s) and this permission notice appear in all copies of 00123 * the Software and that both the above copyright notice(s) and this 00124 * permission notice appear in supporting documentation. 00125 * 00126 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00127 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00128 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00129 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00130 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00131 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00132 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00133 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00134 * PERFORMANCE OF THIS SOFTWARE. 00135 */

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