Files
itgmania212121/stepmania/src/ScreenNameEntryTraditional.h
T

136 lines
4.2 KiB
C++
Raw Normal View History

2004-06-08 05:22:33 +00:00
/* ScreenNameEntryTraditional - Enter a name for a new high score. */
2003-10-14 09:51:16 +00:00
2004-06-08 05:22:33 +00:00
#ifndef SCREEN_NAME_ENTRY_TRADITIONAL_H
#define SCREEN_NAME_ENTRY_TRADITIONAL_H
2003-10-14 09:51:16 +00:00
#include "ScreenWithMenuElements.h"
2003-10-14 09:51:16 +00:00
#include "BitmapText.h"
#include "GradeDisplay.h"
2003-10-15 04:29:06 +00:00
#include "Banner.h"
#include "HighScore.h"
#include "DifficultyIcon.h"
#include "PercentageDisplay.h"
2005-07-01 05:11:39 +00:00
#include "ActorScroller.h"
2005-02-03 02:40:40 +00:00
#include "ThemeMetric.h"
#include "DifficultyMeter.h"
class HighScoreWheelItem : public ActorFrame
{
public:
void Load( int iRankIndex, const HighScore& hs );
2004-03-08 02:50:46 +00:00
void LoadBlank( int iRankIndex );
void ShowFocus();
BitmapText m_textRank;
BitmapText m_textName;
BitmapText m_textScore;
2005-04-29 07:11:20 +00:00
BitmapText m_textDate;
};
class HighScoreWheel : public ActorScroller
{
public:
void Load( const HighScoreList& hsl, int iIndexToFocus );
float Scroll(); // return seconds until done scrolling
vector<HighScoreWheelItem> m_Items;
int m_iIndexToFocus;
};
2003-10-14 09:51:16 +00:00
class ScreenNameEntryTraditional : public ScreenWithMenuElements
2003-10-14 09:51:16 +00:00
{
public:
ScreenNameEntryTraditional( CString sName );
virtual void Init();
virtual ~ScreenNameEntryTraditional();
2003-10-14 09:51:16 +00:00
void Update( float fDeltaTime );
void HandleScreenMessage( const ScreenMessage SM );
void Input( const InputEventPlus &input );
2003-10-14 09:51:16 +00:00
void MenuStart( const InputEventPlus &input );
void MenuSelect( const InputEventPlus &input );
void MenuLeft( const InputEventPlus &input );
void MenuRight( const InputEventPlus &input );
2003-10-14 09:51:16 +00:00
private:
bool AnyStillEntering() const;
2004-05-04 02:00:15 +00:00
void AllFinished();
2003-10-14 09:51:16 +00:00
void PositionCharsAndCursor( int pn );
void Finish( PlayerNumber pn );
void UpdateSelectionText( int pn );
2003-10-15 04:29:06 +00:00
void ChangeDisplayedFeat();
2004-02-22 22:44:39 +00:00
void SelectChar( PlayerNumber pn, int c );
2005-04-29 23:53:55 +00:00
void Backspace( PlayerNumber pn );
void HandleStart( PlayerNumber pn );
2003-10-15 04:29:06 +00:00
2005-02-03 02:40:40 +00:00
ThemeMetric<float> ALPHABET_GAP_X;
ThemeMetric<int> NUM_ALPHABET_DISPLAYED;
ThemeMetric<int> MAX_RANKING_NAME_LENGTH;
ThemeMetric<float> FEAT_INTERVAL;
ThemeMetric<CString> KEYBOARD_LETTERS;
2003-10-14 09:51:16 +00:00
ActorFrame m_Keyboard[NUM_PLAYERS];
Sprite m_sprCursor[NUM_PLAYERS];
vector<BitmapText*> m_textAlphabet[NUM_PLAYERS];
vector<int> m_AlphabetLetter[NUM_PLAYERS];
int m_SelectedChar[NUM_PLAYERS];
AutoActor m_sprOutOfRanking[NUM_PLAYERS]; // shown if didn't make any high scores
2004-05-04 02:00:15 +00:00
Sprite m_sprNameFrame[NUM_PLAYERS];
BitmapText m_textSelection[NUM_PLAYERS];
2003-10-14 09:51:16 +00:00
2003-10-15 04:29:06 +00:00
/* Feat display: */
struct FeatDisplay
{
HighScoreWheel m_Wheel;
GradeDisplay m_Grade;
DifficultyIcon m_DifficultyIcon;
DifficultyMeter m_DifficultyMeter;
BitmapText m_textCategory;
PercentageDisplay m_textScore;
Banner m_sprBanner;
Sprite m_sprBannerFrame;
};
vector<FeatDisplay> m_FeatDisplay[NUM_PLAYERS];
2004-05-06 06:29:33 +00:00
int m_CurFeat[NUM_PLAYERS];
2003-10-15 04:29:06 +00:00
RageSound m_soundChange;
2003-10-14 09:51:16 +00:00
RageSound m_soundKey;
2004-02-23 01:57:24 +00:00
RageSound m_soundInvalid;
2003-10-14 09:51:16 +00:00
wstring m_sSelection[NUM_PLAYERS];
bool m_bStillEnteringName[NUM_PLAYERS];
bool m_bGoToNextScreenWhenCardsRemoved;
2005-03-14 09:38:41 +00:00
ActorCommands CHANGE_COMMAND;
2003-10-14 09:51:16 +00:00
};
2004-06-08 05:22:33 +00:00
#endif
2003-10-14 09:51:16 +00:00
2004-06-08 05:22:33 +00:00
/*
* (c) 2001-2004 Glenn Maynard, 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.
*/