diff --git a/stepmania/src/EditCoursesMenu.cpp b/stepmania/src/EditCoursesMenu.cpp index 6988cf5550..d7e24f72de 100644 --- a/stepmania/src/EditCoursesMenu.cpp +++ b/stepmania/src/EditCoursesMenu.cpp @@ -52,13 +52,13 @@ enum CourseEntryMenuRow lives, }; -Menu g_CourseOptionsMenu -( - "Course Options", - MenuRow( "Repeat", true, 0, "NO","YES" ), - MenuRow( "Randomize", true, 0, "NO","YES" ), - MenuRow( "Lives", true, 4, "Use Bar Life","1","2","3","4","5","6","7","8","9","10" ) -); +static const MenuRow g_CourseOptionsMenuItems[] = +{ + { "Repeat", true, 0, { "NO","YES" } }, + { "Randomize", true, 0, { "NO","YES" } }, + { "Lives", true, 4, { "Use Bar Life","1","2","3","4","5","6","7","8","9","10" } } +}; +static Menu g_CourseOptionsMenu( "Course Options", g_CourseOptionsMenuItems ); enum CourseOptionsMenuRow { @@ -71,16 +71,16 @@ enum CourseOptionsMenuRow NUM_ENTRY_OPTIONS_MENU_ROWS }; -Menu g_CourseEntryMenu -( - "Course Entry Options", - MenuRow( "Song", true, 0 ), - MenuRow( "Group", true, 0 ), - MenuRow( "Difficulty", true, 0 ), - MenuRow( "Low Meter", true, 0 ), - MenuRow( "High Meter", true, 0 ), - MenuRow( "Best/Worst value",true, 0 ) -); +static const MenuRow g_CourseEntryMenuItems[] = +{ + { "Song", true, 0, { } }, + { "Group", true, 0, { } }, + { "Difficulty", true, 0, { } }, + { "Low Meter", true, 0, { } }, + { "High Meter", true, 0, { } }, + { "Best/Worst value",true, 0, { } }, +}; +static Menu g_CourseEntryMenu( "Course Entry Options", g_CourseEntryMenuItems ); const bool g_bRowEnabledForType[NUM_COURSE_ENTRY_TYPES][NUM_ENTRY_OPTIONS_MENU_ROWS] = diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 1a080f1d13..870b6865de 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -102,118 +102,114 @@ const CString HELP_TEXT = "F1:\n Show\n keyboard\n shortcuts\n"; -Menu g_KeyboardShortcuts -( - "Keyboard Shortcuts", - MenuRow( "PgUp/PgDn: jump measure", false ), - MenuRow( "Home/End: jump to first/last beat", false ), - MenuRow( "Ctrl + Up/Down: Change zoom", false ), - MenuRow( "Shift + Up/Down: Drag area marker", false ), - MenuRow( "P: Play selection", false ), - MenuRow( "Ctrl + P: Play whole song", false ), - MenuRow( "Shift + P: Play current beat to end", false ), - MenuRow( "Ctrl + R: Record", false ), - MenuRow( "F4: Toggle assist tick", false ), - MenuRow( "F5/F6: Next/prev steps of same StepsType", false ), - MenuRow( "F7/F8: Decrease/increase BPM at cur beat", false ), - MenuRow( "F9/F10: Decrease/increase stop at cur beat", false ), - MenuRow( "F11/F12: Decrease/increase music offset", false ), +static const MenuRow g_KeyboardShortcutsItems[] = +{ + { "PgUp/PgDn: jump measure", false, 0, { } }, + { "Home/End: jump to first/last beat", false, 0, { } }, + { "Ctrl + Up/Down: Change zoom", false, 0, { } }, + { "Shift + Up/Down: Drag area marker", false, 0, { } }, + { "P: Play selection", false, 0, { } }, + { "Ctrl + P: Play whole song", false, 0, { } }, + { "Shift + P: Play current beat to end", false, 0, { } }, + { "Ctrl + R: Record", false, 0, { } }, + { "F4: Toggle assist tick", false, 0, { } }, + { "F5/F6: Next/prev steps of same StepsType", false, 0, { } }, + { "F7/F8: Decrease/increase BPM at cur beat", false, 0, { } }, + { "F9/F10: Decrease/increase stop at cur beat", false, 0, { } }, + { "F11/F12: Decrease/increase music offset", false, 0, { } }, /* XXX: This would be better as a single submenu, to let people tweak * and play the sample several times (without having to re-enter the * menu each time), so it doesn't use a whole bunch of hotkeys. */ - MenuRow( "[ and ]: Decrease/increase sample music start", false ), - MenuRow( "{ and }: Decrease/increase sample music length", false ), - MenuRow( "M: Play sample music", false ), - MenuRow( "B: Add/Edit Background Change", false ), - MenuRow( "Insert: Insert beat and shift down", false ), - MenuRow( "Delete: Delete beat and shift up", false ), - MenuRow( "Shift + number: Lay mine", false ), - MenuRow( "Alt + number: Add to/remove from right half", false ) -); + { "[ and ]: Decrease/increase sample music start", false, 0, { } }, + { "{ and }: Decrease/increase sample music length", false, 0, { } }, + { "M: Play sample music", false, 0, { } }, + { "B: Add/Edit Background Change", false, 0, { } }, + { "Insert: Insert beat and shift down", false, 0, { } }, + { "Delete: Delete beat and shift up", false, 0, { } }, + { "Shift + number: Lay mine", false, 0, { } }, + { "Alt + number: Add to/remove from right half", false, 0, { } } +}; +static Menu g_KeyboardShortcuts( "Keyboard Shortcuts", g_KeyboardShortcutsItems ); -Menu g_MainMenu -( - "Main Menu", - MenuRow( "Edit Steps Statistics", true ), - MenuRow( "Play Whole Song", true ), - MenuRow( "Play Current Beat To End", true ), - MenuRow( "Save", true ), - MenuRow( "Player Options", true ), - MenuRow( "Song Options", true ), - MenuRow( "Edit Song Info", true ), - MenuRow( "Add/Edit BG Change", true ), - MenuRow( "Play preview music", true ), - MenuRow( "Exit (discards changes since last save)",true ) -); +static const MenuRow g_MainMenuItems[] = +{ + { "Edit Steps Statistics", true, 0, { } }, + { "Play Whole Song", true, 0, { } }, + { "Play Current Beat To End", true, 0, { } }, + { "Save", true, 0, { } }, + { "Player Options", true, 0, { } }, + { "Song Options", true, 0, { } }, + { "Edit Song Info", true, 0, { } }, + { "Add/Edit BG Change", true, 0, { } }, + { "Play preview music", true, 0, { } }, + { "Exit (discards changes since last save)",true, 0, { } } +}; +static Menu g_MainMenu( "Main Menu", g_MainMenuItems ); -Menu g_AreaMenu -( - "Area Menu", - MenuRow( "Cut", true ), - MenuRow( "Copy", true ), - MenuRow( "Paste at current beat", true ), - MenuRow( "Paste at begin marker", true ), - MenuRow( "Clear", true ), - MenuRow( "Quantize", true, 0, "4TH","8TH","12TH","16TH","24TH","32ND","48TH","64TH" ), - MenuRow( "Turn", true, 0, "Left","Right","Mirror","Shuffle","Super Shuffle" ), - MenuRow( "Transform", true, 0, "NoHolds","NoMines","Little","Wide","Big","Quick","Skippy","Mines","Echo","Planted","Stomp","Twister" ), - MenuRow( "Alter", true, 0, "Backwards","Swap Sides","Copy Left To Right","Copy Right To Left","Clear Left","Clear Right","Collapse To One","Shift Left","Shift Right" ), - MenuRow( "Tempo", true, 0, "Compress 2x","Compress 3->2","Compress 4->3","Expand 3->4","Expand 2->3","Expand 2x" ), - MenuRow( "Play selection", true ), - MenuRow( "Record in selection", true ), - MenuRow( "Insert beat and shift down", true ), - MenuRow( "Delete beat and shift up", true ), - MenuRow( "Convert beats to pause", true ), - MenuRow( "Convert pause to beats", true ) -); +static const MenuRow g_AreaMenuItems[] = +{ + { "Cut", true, 0, { } }, + { "Copy", true, 0, { } }, + { "Paste at current beat", true, 0, { } }, + { "Paste at begin marker", true, 0, { } }, + { "Clear", true, 0, { } }, + { "Quantize", true, 0, { "4TH","8TH","12TH","16TH","24TH","32ND","48TH","64TH", 0 } }, + { "Turn", true, 0, { "Left","Right","Mirror","Shuffle","Super Shuffle", 0 } }, + { "Transform", true, 0, { "NoHolds","NoMines","Little","Wide","Big","Quick","Skippy","Mines","Echo","Planted","Stomp","Twister", 0 } }, + { "Alter", true, 0, { "Backwards","Swap Sides","Copy Left To Right","Copy Right To Left","Clear Left","Clear Right","Collapse To One","Shift Left","Shift Right", 0 } }, + { "Tempo", true, 0, { "Compress 2x","Compress 3->2","Compress 4->3","Expand 3->4","Expand 2->3","Expand 2x", 0 } }, + { "Play selection", true, 0, { } }, + { "Record in selection", true, 0, { } }, + { "Insert beat and shift down", true, 0, { } }, + { "Delete beat and shift up", true, 0, { } }, + { "Convert beats to pause", true, 0, { } }, + { "Convert pause to beats", true, 0, { } } +}; +static Menu g_AreaMenu( "Area Menu", g_AreaMenuItems ); +static const MenuRow g_EditNotesStatisticsItems[] = +{ + { "Difficulty", true, 0, { "BEGINNER","EASY","MEDIUM","HARD","CHALLENGE", 0 } }, + { "Meter", true, 0, { "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15", 0 } }, + { "Description", true, 0, { } }, + { "Tap Steps", false, 0, { } }, + { "Hold Steps", false, 0, { } }, + { "Stream", false, 0, { } }, + { "Voltage", false, 0, { } }, + { "Air", false, 0, { } }, + { "Freeze", false, 0, { } }, + { "Chaos", false, 0, { } } +}; +static Menu g_EditNotesStatistics( "Statistics", g_EditNotesStatisticsItems ); -Menu g_EditNotesStatistics -( - "Statistics", - MenuRow( "Difficulty", true, 0, "BEGINNER","EASY","MEDIUM","HARD","CHALLENGE" ), - MenuRow( "Meter", true, 0, "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15" ), - MenuRow( "Description", true ), - MenuRow( "Tap Steps", false ), - MenuRow( "Hold Steps", false ), - MenuRow( "Stream", false ), - MenuRow( "Voltage", false ), - MenuRow( "Air", false ), - MenuRow( "Freeze", false ), - MenuRow( "Chaos", false ) -); - - -Menu g_EditSongInfo -( - "Edit Song Info", - MenuRow( "Main title", true ), - MenuRow( "Sub title", true ), - MenuRow( "Artist", true ), - MenuRow( "Credit", true ), - MenuRow( "Main title transliteration", true ), - MenuRow( "Sub title transliteration", true ), - MenuRow( "Artist transliteration", true ) -); - - -Menu g_BGChange -( - "Background Change", - MenuRow( "Rate (applies to new adds)", true, 15, "-100%","-80%","-60%","-40%","-20%","0%","10%","20%","30%","40%","50%","60%","70%","80%","90%","100%","120%","140%","160%","180%","200%" ), - MenuRow( "Fade Last (applies to new adds)", true, 0, "NO","YES" ), - MenuRow( "Rewind Movie (applies to new adds)", true, 0, "NO","YES" ), - MenuRow( "Loop (applies to new adds)", true, 1, "NO","YES" ), - MenuRow( "Add Change to random", true ), - MenuRow( "Add Change to song BGAnimation", true ), - MenuRow( "Add Change to song Movie", true ), - MenuRow( "Add Change to song Still", true ), - MenuRow( "Add Change to global Random Movie", true ), - MenuRow( "Add Change to global BGAnimation", true ), - MenuRow( "Add Change to global Visualization", true ), - MenuRow( "Remove Change", true ) -); +static const MenuRow g_EditSongInfoItems[] = +{ + { "Main title", true, 0, { } }, + { "Sub title", true, 0, { } }, + { "Artist", true, 0, { } }, + { "Credit", true, 0, { } }, + { "Main title transliteration", true, 0, { } }, + { "Sub title transliteration", true, 0, { } }, + { "Artist transliteration", true, 0, { } } +}; +static Menu g_EditSongInfo( "Edit Song Info", g_EditSongInfoItems ); +static const MenuRow g_BGChangeItems[] = +{ + { "Rate (applies to new adds)", true, 15, { "-100%","-80%","-60%","-40%","-20%","0%","10%","20%","30%","40%","50%","60%","70%","80%","90%","100%","120%","140%","160%","180%","200%", 0 } }, + { "Fade Last (applies to new adds)", true, 0, { "NO","YES", 0 } }, + { "Rewind Movie (applies to new adds)", true, 0, { "NO","YES", 0 } }, + { "Loop (applies to new adds)", true, 1, { "NO","YES", 0 } }, + { "Add Change to random", true, 0, { } }, + { "Add Change to song BGAnimation", true, 0, { } }, + { "Add Change to song Movie", true, 0, { } }, + { "Add Change to song Still", true, 0, { } }, + { "Add Change to global Random Movie", true, 0, { } }, + { "Add Change to global BGAnimation", true, 0, { } }, + { "Add Change to global Visualization", true, 0, { } }, + { "Remove Change", true, 0, { } } +}; +static Menu g_BGChange( "Background Change", g_BGChangeItems ); ScreenEdit::ScreenEdit( CString sName ) : Screen( sName ) { diff --git a/stepmania/src/ScreenEdit.h b/stepmania/src/ScreenEdit.h index ee651a2663..011120b69d 100644 --- a/stepmania/src/ScreenEdit.h +++ b/stepmania/src/ScreenEdit.h @@ -115,7 +115,6 @@ public: }; void HandleMainMenuChoice( MainMenuChoice c, int* iAnswers ); - // MD 11/02/03 - added conversions of beats to pauses and vice-versa enum AreaMenuChoice { cut, copy, diff --git a/stepmania/src/ScreenMiniMenu.cpp b/stepmania/src/ScreenMiniMenu.cpp index 19fe4a0d80..91312c6800 100644 --- a/stepmania/src/ScreenMiniMenu.cpp +++ b/stepmania/src/ScreenMiniMenu.cpp @@ -67,7 +67,7 @@ ScreenMiniMenu::ScreenMiniMenu( Menu* pDef, ScreenMessage SM_SendOnOK, ScreenMes for( unsigned i=0; i choices; - MenuRow() + MenuRowInternal() { enabled = true; defaultChoice = 0; } - MenuRow( const char * n, bool e, int d=0, const char * c0=NULL, const char * c1=NULL, const char * c2=NULL, const char * c3=NULL, const char * c4=NULL, const char * c5=NULL, const char * c6=NULL, const char * c7=NULL, const char * c8=NULL, const char * c9=NULL, const char * c10=NULL, const char * c11=NULL, const char * c12=NULL, const char * c13=NULL, const char * c14=NULL, const char * c15=NULL, const char * c16=NULL, const char * c17=NULL, const char * c18=NULL, const char * c19=NULL, const char * c20=NULL, const char * c21=NULL, const char * c22=NULL, const char * c23=NULL, const char * c24=NULL ) - { - name = n; - enabled = e; - defaultChoice = d; -#define PUSH( c ) if(c!=NULL) choices.push_back(c); - PUSH(c0);PUSH(c1);PUSH(c2);PUSH(c3);PUSH(c4);PUSH(c5);PUSH(c6);PUSH(c7);PUSH(c8);PUSH(c9);PUSH(c10);PUSH(c11);PUSH(c12);PUSH(c13);PUSH(c14);PUSH(c15);PUSH(c16);PUSH(c17);PUSH(c18);PUSH(c19);PUSH(c20);PUSH(c21);PUSH(c22);PUSH(c23);PUSH(c24); -#undef PUSH -// printf( "choices.size = %u", choices.size() ); - } + MenuRowInternal( const MenuRow &r ); }; struct Menu { CString title; - vector rows; + vector rows; Menu() {} - - Menu( CString t, MenuRow r0, MenuRow r1=MenuRow(), MenuRow r2=MenuRow(), MenuRow r3=MenuRow(), MenuRow r4=MenuRow(), MenuRow r5=MenuRow(), MenuRow r6=MenuRow(), MenuRow r7=MenuRow(), MenuRow r8=MenuRow(), MenuRow r9=MenuRow(), MenuRow r10=MenuRow(), MenuRow r11=MenuRow(), MenuRow r12=MenuRow(), MenuRow r13=MenuRow(), MenuRow r14=MenuRow(), MenuRow r15=MenuRow(), MenuRow r16=MenuRow(), MenuRow r17=MenuRow(), MenuRow r18=MenuRow(), MenuRow r19=MenuRow(), MenuRow r20=MenuRow(), MenuRow r21=MenuRow() ) - { - title = t; -#define PUSH( r ) if(r.name!="" || !r.choices.empty()) rows.push_back(r); - PUSH(r0);PUSH(r1);PUSH(r2);PUSH(r3);PUSH(r4);PUSH(r5);PUSH(r6);PUSH(r7);PUSH(r8);PUSH(r9);PUSH(r10);PUSH(r11);PUSH(r12);PUSH(r13);PUSH(r14);PUSH(r15);PUSH(r16);PUSH(r17);PUSH(r18);PUSH(r19);PUSH(r20);PUSH(r21); -#undef PUSH - } + Menu( CString t, const MenuRow *rows ); };