EditMenu.h
Go to the documentation of this file.00001
00002
00003
#ifndef EDIT_MENU_H
00004
#define EDIT_MENU_H
00005
00006
#include "ActorFrame.h"
00007
#include "Banner.h"
00008
#include "TextBanner.h"
00009
#include "GameConstantsAndTypes.h"
00010
#include "DifficultyMeter.h"
00011
#include "RandomSample.h"
00012
00013
00014 class EditMenu:
public ActorFrame
00015 {
00016
public:
00017
EditMenu();
00018
~EditMenu();
00019
virtual void DrawPrimitives();
00020
00021
bool CanGoUp();
00022
bool CanGoDown();
00023
bool CanGoLeft();
00024
bool CanGoRight();
00025
00026
void Up();
00027
void Down();
00028
void Left();
00029
void Right();
00030
00031 enum Row
00032 {
00033
ROW_GROUP,
00034
ROW_SONG,
00035
ROW_STEPS_TYPE,
00036
ROW_DIFFICULTY,
00037
ROW_SOURCE_STEPS_TYPE,
00038
ROW_SOURCE_DIFFICULTY,
00039
ROW_ACTION,
00040
NUM_ROWS
00041 } m_SelectedRow;
00042 CString RowToString( Row r )
00043 {
00044
const CString s[
NUM_ROWS] =
00045 {
00046
"Group",
00047
"Song",
00048
"StepsType",
00049
"Difficulty",
00050
"Source StepsType",
00051
"Source Difficulty",
00052
"Action"
00053 };
00054
return s[r];
00055 }
00056
00057 enum Action
00058 {
00059
ACTION_EDIT,
00060
ACTION_DELETE,
00061
ACTION_COPY,
00062
ACTION_AUTOGEN,
00063
ACTION_BLANK,
00064
NUM_ACTIONS
00065 };
00066 CString ActionToString( Action a )
00067 {
00068
const CString s[
NUM_ACTIONS] =
00069 {
00070
"Edit Existing",
00071
"Delete Existing",
00072
"Create from Source by Copy",
00073
"Create from Souce by AutoGen",
00074
"Create with Blank"
00075 };
00076
return s[a];
00077 }
00078
00079
void RefreshNotes();
00080
00081
00082 CString GetSelectedGroup()
const {
ASSERT(
m_iSelection[
ROW_GROUP] < (
int)
m_sGroups.size());
return m_sGroups[
m_iSelection[
ROW_GROUP]]; }
00083 Song*
GetSelectedSong()
const {
ASSERT(
m_iSelection[
ROW_SONG] < (
int)
m_pSongs.size());
return m_pSongs[
m_iSelection[
ROW_SONG]]; }
00084 StepsType GetSelectedStepsType()
const {
ASSERT(
m_iSelection[
ROW_STEPS_TYPE] < (
int)
m_StepsTypes.size());
return m_StepsTypes[
m_iSelection[
ROW_STEPS_TYPE]]; }
00085 Difficulty GetSelectedDifficulty()
const {
return (
Difficulty)
m_iSelection[
ROW_DIFFICULTY]; }
00086 StepsType GetSelectedSourceStepsType()
const {
ASSERT(
m_iSelection[
ROW_SOURCE_STEPS_TYPE] < (
int)
m_StepsTypes.size());
return m_StepsTypes[
m_iSelection[
ROW_SOURCE_STEPS_TYPE]]; }
00087 Difficulty GetSelectedSourceDifficulty()
const {
return (
Difficulty)
m_iSelection[
ROW_SOURCE_DIFFICULTY]; }
00088 Action GetSelectedAction()
const {
ASSERT(
m_iSelection[
ROW_ACTION] < (
int)
m_Actions.size());
return m_Actions[
m_iSelection[
ROW_ACTION]]; }
00089
00090
Steps*
GetSelectedNotes();
00091
Steps*
GetSelectedSourceNotes();
00092
00093
private:
00094 Sprite m_sprArrows[2];
00095
00096 int m_iSelection[
NUM_ROWS];
00097 BitmapText m_textLabel[
NUM_ROWS];
00098 BitmapText m_textValue[
NUM_ROWS];
00099
00100 Banner m_GroupBanner;
00101 Banner m_SongBanner;
00102 TextBanner m_SongTextBanner;
00103 DifficultyMeter m_Meter;
00104 DifficultyMeter m_SourceMeter;
00105
00106 CStringArray m_sGroups;
00107 vector<StepsType>
m_StepsTypes;
00108 vector<Song*>
m_pSongs;
00109 vector<Action>
m_Actions;
00110
00111
void OnRowValueChanged( Row row );
00112
void ChangeToRow( Row newRow );
00113
00114 RandomSample m_soundChangeRow;
00115 RandomSample m_soundChangeValue;
00116 };
00117
00118
#endif
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
Generated on Thu Jan 27 20:57:20 2005 for StepMania by
1.3.7