Files
itgmania212121/stepmania/src/ScreenNetRoom.h
T

90 lines
3.0 KiB
C++
Raw Normal View History

/* ScreenNetSelectMusic - A method for Online/Net song selection */
2006-08-14 15:46:38 +00:00
#ifndef SCREEN_NET_ROOM_H
#define SCREEN_NET_ROOM_H
#include "ScreenWithMenuElements.h"
#include "ScreenNetSelectBase.h"
#include <vector>
2005-05-03 01:31:22 +00:00
#include "RoomWheel.h"
2006-08-14 15:46:38 +00:00
#include "RoomInfoDisplay.h"
2005-01-28 23:59:34 +00:00
class RoomData {
public:
2006-01-22 01:00:06 +00:00
void SetName( const RString& name ) { m_name = name; }
void SetDescription( const RString& desc ) { m_description = desc; }
2005-01-28 23:59:34 +00:00
void SetState(unsigned int state) { m_state = state; }
2006-07-21 22:31:55 +00:00
void SetFlags( unsigned int iFlags ) { m_iFlags = iFlags; }
2006-01-22 01:00:06 +00:00
inline RString Name() { return m_name; }
inline RString Description() { return m_description; }
2005-01-28 23:59:34 +00:00
inline unsigned int State() { return m_state; }
2006-07-21 22:31:55 +00:00
inline unsigned int GetFlags() { return m_iFlags; }
2005-01-28 23:59:34 +00:00
private:
2006-01-22 01:00:06 +00:00
RString m_name;
RString m_description;
unsigned int m_state;
2006-07-21 22:31:55 +00:00
unsigned int m_iFlags;
2005-01-28 23:59:34 +00:00
};
class ScreenNetRoom : public ScreenNetSelectBase
{
public:
virtual void Init();
virtual void Input( const InputEventPlus &input );
virtual void HandleScreenMessage( const ScreenMessage SM );
protected:
2006-09-14 21:25:06 +00:00
virtual void MenuStart( const InputEventPlus &input );
virtual void MenuBack( const InputEventPlus &input );
virtual void TweenOffScreen( );
private:
void UpdateRoomsList();
void MenuLeft( const InputEventPlus &input );
void MenuRight( const InputEventPlus &input );
void CreateNewRoom( const RString& rName, const RString& rDesc, const RString& rPass );
RageSound m_soundChangeSel;
BitmapText m_textTitle;
2005-01-27 03:08:04 +00:00
Sprite m_sprTitleBG;
2005-01-28 23:59:34 +00:00
vector < BitmapText > m_RoomList;
vector < RoomData > m_Rooms;
int m_iRoomPlace;
2006-07-21 22:31:55 +00:00
string m_sLastPickedRoom;
RString m_newRoomName, m_newRoomDesc, m_newRoomPass;
2005-05-03 01:31:22 +00:00
RoomWheel m_RoomWheel;
2006-08-14 05:46:15 +00:00
RoomInfoDisplay m_roomInfo;
};
#endif
/*
* (c) 2004 Charles Lohr, Joshua Allen
* 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.
*/