00001 /* 00002 * Copyright (C) Volition, Inc. 1999. All rights reserved. 00003 * 00004 * All source code herein is the property of Volition, Inc. You may not sell 00005 * or otherwise commercially exploit the source or things you created based on the 00006 * source. 00007 * 00008 */ 00009 00010 /* 00011 * $Logfile: /Freespace2/code/MissionUI/Chatbox.h $ 00012 * $Revision: 3 $ 00013 * $Date: 5/22/99 5:35p $ 00014 * $Author: Dave $ 00015 * 00016 * Header file for chat box code 00017 * 00018 * $Log: /Freespace2/code/MissionUI/Chatbox.h $ 00019 * 00020 * 3 5/22/99 5:35p Dave 00021 * Debrief and chatbox screens. Fixed small hi-res HUD bug. 00022 * 00023 * 2 10/07/98 10:53a Dave 00024 * Initial checkin. 00025 * 00026 * 1 10/07/98 10:49a Dave 00027 * 00028 * 14 9/11/98 5:08p Dave 00029 * More tweaks to kick notification system. 00030 * 00031 * 13 9/11/98 4:14p Dave 00032 * Fixed file checksumming of < file_size. Put in more verbose kicking and 00033 * PXO stats store reporting. 00034 * 00035 * 12 5/15/98 5:15p Dave 00036 * Fix a standalone resetting bug.Tweaked PXO interface. Display captaincy 00037 * status for team vs. team. Put in asserts to check for invalid team vs. 00038 * team situations. 00039 * 00040 * 11 4/14/98 5:06p Dave 00041 * Don't load or send invalid pilot pics. Fixed chatbox graphic errors. 00042 * Made chatbox display team icons in a team vs. team game. Fixed up pause 00043 * and endgame sequencing issues. 00044 * 00045 * 10 4/12/98 2:09p Dave 00046 * Make main hall door text less stupid. Make sure inputbox focus in the 00047 * multi host options screen is managed more intelligently. 00048 * 00049 * 9 4/01/98 11:19p Dave 00050 * Put in auto-loading of xferred pilot pic files. Grey out background 00051 * behind pinfo popup. Put a chatbox message in when players are kicked. 00052 * Moved mission title down in briefing. Other ui fixes. 00053 * 00054 * 8 3/29/98 1:24p Dave 00055 * Make chatbox not clear between multiplayer screens. Select player ship 00056 * as default in mp team select and weapons select screens. Made create 00057 * game mission list use 2 fixed size columns. 00058 * 00059 * 7 2/13/98 3:46p Dave 00060 * Put in dynamic chatbox sizing. Made multiplayer file lookups use cfile 00061 * functions. 00062 * 00063 * 6 1/16/98 2:34p Dave 00064 * Made pause screen work properly (multiplayer). Changed how chat packets 00065 * work. 00066 * 00067 * 5 1/07/98 5:20p Dave 00068 * Put in support for multiplayer campaigns with the new interface 00069 * screens. 00070 * 00071 * 4 12/18/97 8:59p Dave 00072 * Finished putting in basic support for weapon select and ship select in 00073 * multiplayer. 00074 * 00075 * 3 10/01/97 4:47p Lawrance 00076 * move some #defines out of header file into .cpp file 00077 * 00078 * 2 10/01/97 4:39p Lawrance 00079 * move chat code into Chatbox.cpp, simplify interface 00080 * 00081 * 1 10/01/97 10:54a Lawrance 00082 * 00083 * $NoKeywords: $ 00084 */ 00085 00086 #ifndef __FREESPACE_CHATBOX_H__ 00087 #define __FREESPACE_CHATBOX_H__ 00088 00089 // prototype 00090 struct net_player; 00091 00092 #define CHATBOX_MAX_LEN 125 // max length of the actual text string 00093 00094 // chatbox flags for creation/switching between modes 00095 #define CHATBOX_FLAG_SMALL (1<<0) // small chatbox 00096 #define CHATBOX_FLAG_BIG (1<<1) // big chatbox 00097 #define CHATBOX_FLAG_MULTI_PAUSED (1<<2) // chatbox in the multiplayer paused screen 00098 #define CHATBOX_FLAG_DRAW_BOX (1<<3) // should be drawn by the chatbox code 00099 #define CHATBOX_FLAG_BUTTONS (1<<4) // the chatbox should be drawing/checking its own buttons 00100 // NOTE : CHATBOX_FLAG_BUTTONS requires that CHATBOX_FLAG_DRAW_BOX is also set! 00101 00102 // initialize all chatbox details with the given mode flags 00103 int chatbox_create(int mode_flags = (CHATBOX_FLAG_SMALL | CHATBOX_FLAG_DRAW_BOX | CHATBOX_FLAG_BUTTONS)); 00104 00105 // process this frame for the chatbox 00106 int chatbox_process(int key_in=-1); 00107 00108 // shutdown all chatbox functionality 00109 void chatbox_close(); 00110 00111 // render the chatbox for this frame 00112 void chatbox_render(); 00113 00114 // try and scroll the chatbox up. return 0 or 1 on fail or success 00115 int chatbox_scroll_up(); 00116 00117 // try and scroll the chatbox down, return 0 or 1 on fail or success 00118 int chatbox_scroll_down(); 00119 00120 // clear the contents of the chatbox 00121 void chatbox_clear(); 00122 00123 // add a line of text (from the player identified by pid) to the chatbox 00124 void chatbox_add_line(char *msg,int pid,int add_id = 1); 00125 00126 // force the chatbox to go into small mode (if its in large mode) - will not wotk if in multi paused chatbox mode 00127 void chatbox_force_small(); 00128 00129 // force the chatbox to go into big mode (if its in small mode) - will not work if in multi paused chatbox mode 00130 void chatbox_force_big(); 00131 00132 // "lose" the focus on the chatbox inputbox 00133 void chatbox_lose_focus(); 00134 00135 // return if the inputbox for the chatbox currently has focus 00136 int chatbox_has_focus(); 00137 00138 // grab the focus for the chatbox inputbox 00139 void chatbox_set_focus(); 00140 00141 // return if the inputbox was pressed - "clicked on" 00142 int chatbox_pressed(); 00143 00144 // reset all timestamps associated with the chatbox 00145 void chatbox_reset_timestamps(); 00146 00147 #endif
1.2.16