/* $Id: playerconfigwindow.hpp,v 1.2 2005/12/12 21:02:29 chfreund Exp $ */ #ifndef _PLAYERCONFIGWINDOW_HPP_ #define _PLAYERCONFIGWINDOW_HPP_ #include #include "wopwindow.hpp" #include "action.h" #include "textfield.h" #include "image.h" #include "button.h" #include "widget.h" using namespace SDLwidgets; class Player; class PlayerConfigWindow : public WopWindow, public ActionWidget, public ActionListener { public: enum Action { OK_PRESSED, CANCEL_PRESSED }; private: TextField* m_nameField; TextField* m_teamField; TextField* m_rField; TextField* m_gField; TextField* m_bField; Image* m_colorImage; TextButton* m_okButton; TextButton* m_cancelButton; WidgetComposite* m_content; WidgetComposite* m_configContainer; WidgetComposite* m_buttonRow; public: PlayerConfigWindow( Player* player ); PlayerConfigWindow( const char* name, Uint8 team, Uint32 color ); void actionPerformed( Uint32 cmd, void* source ); bool handleEvent( SDL_Event* event ); const std::string& getName() const { return m_nameField->getText(); } const Uint8 getTeamID() const; const Uint8 getColorR() const; const Uint8 getColorG() const; const Uint8 getColorB() const; }; #endif // _PLAYERCONFIGWINDOW_HPP_