EditCoursesSongMenu.h
Go to the documentation of this file.00001
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]; }
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
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
Generated on Thu Jan 27 20:57:20 2005 for StepMania by
1.3.7