Files
itgmania212121/stepmania/src/EditMenu.h
T

150 lines
4.4 KiB
C++
Raw Normal View History

2004-06-07 21:14:03 +00:00
/* EditMenu - UI on Edit Menu screen. Create Steps, delete Steps, or launch Steps in editor. */
2004-01-01 01:21:59 +00:00
2004-06-07 21:14:03 +00:00
#ifndef EDIT_MENU_H
#define EDIT_MENU_H
#include "ActorFrame.h"
2005-03-07 07:26:18 +00:00
#include "FadingBanner.h"
#include "TextBanner.h"
#include "GameConstantsAndTypes.h"
2003-03-09 00:55:49 +00:00
#include "DifficultyMeter.h"
2003-02-11 02:20:38 +00:00
#include "RandomSample.h"
2003-01-30 07:18:33 +00:00
2003-02-11 02:20:38 +00:00
class EditMenu: public ActorFrame
2003-01-30 07:18:33 +00:00
{
public:
2003-02-11 02:20:38 +00:00
EditMenu();
~EditMenu();
virtual void DrawPrimitives();
2003-01-30 07:18:33 +00:00
bool CanGoUp();
bool CanGoDown();
bool CanGoLeft();
bool CanGoRight();
void Up();
void Down();
void Left();
void Right();
2003-01-30 07:18:33 +00:00
enum Row
{
ROW_GROUP,
ROW_SONG,
2004-07-12 02:19:24 +00:00
ROW_STEPS_TYPE,
2005-03-05 21:35:30 +00:00
ROW_STEPS,
2004-07-12 02:19:24 +00:00
ROW_SOURCE_STEPS_TYPE,
2005-03-05 21:35:30 +00:00
ROW_SOURCE_STEPS,
2003-01-30 07:18:33 +00:00
ROW_ACTION,
NUM_ROWS
} m_SelectedRow;
CString RowToString( Row r )
{
const CString s[NUM_ROWS] =
{
"Group",
"Song",
2003-08-07 06:16:17 +00:00
"StepsType",
2005-03-05 21:35:30 +00:00
"Steps",
2003-08-07 06:16:17 +00:00
"Source StepsType",
2005-03-05 21:35:30 +00:00
"Source Steps",
2003-01-30 07:18:33 +00:00
"Action"
};
return s[r];
}
enum Action
{
ACTION_EDIT,
ACTION_DELETE,
ACTION_COPY,
ACTION_AUTOGEN,
ACTION_BLANK,
NUM_ACTIONS
};
CString ActionToString( Action a )
{
const CString s[NUM_ACTIONS] =
{
"Edit Existing",
"Delete Existing",
"Create new from Source by Copy",
"Create new from Source by AutoGen",
"Create new empty"
2003-01-30 07:18:33 +00:00
};
return s[a];
}
2005-03-06 00:08:48 +00:00
void RefreshAll();
2003-01-30 07:18:33 +00:00
2005-03-05 21:35:30 +00:00
CString GetSelectedGroup() const { ASSERT(m_iSelection[ROW_GROUP] < (int)m_sGroups.size()); return m_sGroups[m_iSelection[ROW_GROUP]]; }
Song* GetSelectedSong() const { ASSERT(m_iSelection[ROW_SONG] < (int)m_pSongs.size()); return m_pSongs[m_iSelection[ROW_SONG]]; }
StepsType GetSelectedStepsType() const { ASSERT(m_iSelection[ROW_STEPS_TYPE] < (int)m_StepsTypes.size()); return m_StepsTypes[m_iSelection[ROW_STEPS_TYPE]]; }
Steps* GetSelectedSteps() const { ASSERT(m_iSelection[ROW_STEPS] < (int)m_vpSteps.size()); return m_vpSteps[m_iSelection[ROW_STEPS]]; }
2004-07-12 02:19:24 +00:00
StepsType GetSelectedSourceStepsType() const { ASSERT(m_iSelection[ROW_SOURCE_STEPS_TYPE] < (int)m_StepsTypes.size()); return m_StepsTypes[m_iSelection[ROW_SOURCE_STEPS_TYPE]]; }
2005-03-05 21:35:30 +00:00
Steps* GetSelectedSourceSteps() const { ASSERT(m_iSelection[ROW_SOURCE_STEPS] < (int)m_vpSourceSteps.size()); return m_vpSourceSteps[m_iSelection[ROW_SOURCE_STEPS]]; }
Action GetSelectedAction() const { ASSERT(m_iSelection[ROW_ACTION] < (int)m_Actions.size()); return m_Actions[m_iSelection[ROW_ACTION]]; }
2003-01-30 07:18:33 +00:00
Difficulty GetSelectedDifficulty();
Difficulty GetSelectedSourceDifficulty();
private:
2003-01-30 07:18:33 +00:00
Sprite m_sprArrows[2];
2003-01-30 07:18:33 +00:00
int m_iSelection[NUM_ROWS];
BitmapText m_textLabel[NUM_ROWS];
BitmapText m_textValue[NUM_ROWS];
2005-03-07 07:26:18 +00:00
FadingBanner m_GroupBanner;
FadingBanner m_SongBanner;
TextBanner m_SongTextBanner;
2003-03-09 00:55:49 +00:00
DifficultyMeter m_Meter;
DifficultyMeter m_SourceMeter;
vector<Difficulty> m_vDifficulties;
vector<Difficulty> m_vSourceDifficulties;
CStringArray m_sGroups;
vector<Song*> m_pSongs;
vector<StepsType> m_StepsTypes;
vector<Steps*> m_vpSteps;
vector<Steps*> m_vpSourceSteps;
vector<Action> m_Actions;
2003-01-30 07:18:33 +00:00
void OnRowValueChanged( Row row );
void ChangeToRow( Row newRow );
2003-01-30 07:18:33 +00:00
RandomSample m_soundChangeRow;
RandomSample m_soundChangeValue;
};
#endif
2004-06-07 21:14:03 +00:00
/*
* (c) 2001-2004 Chris Danford
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, and/or sell copies of the Software, and to permit persons to
* whom the Software is furnished to do so, provided that the above
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/