00001 /****************************************************************************** 00002 * Wormux is a convivial mass murder game. 00003 * Copyright (C) 2001-2004 Lawrence Azzoug. 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 00018 ****************************************************************************** 00019 * Chat in game session. 00020 *****************************************************************************/ 00021 00022 #ifndef CHAT_H 00023 #define CHAT_H 00024 00025 #define SAY "Say: " //We should use Multilanguage functions 00026 #define HEIGHT 15 00027 #define XPOS 25 00028 #define YPOS 130 00029 #define MAXLINES 10 //Fidel's advise 00030 #define MAXSECONDS 10 00031 00032 #include <SDL.h> 00033 #include "../graphic/text_list.h" 00034 #include "../network/network.h" 00035 00036 class Chat 00037 { 00038 private: 00039 TextList* chat; 00040 Text* input; 00041 Text* msg; 00042 00043 int check_input; 00044 uint last_time; 00045 00046 public: 00047 Chat(); 00048 ~Chat(); 00049 void Show(); 00050 void ShowInput(); 00051 int CheckInput(); 00052 void Reset(); 00053 void NewMessage(const std::string &msg); 00054 void HandleKey(const SDL_Event *event); 00055 }; 00056 00057 #endif