#include "ui_local.h"
Include dependency graph for ui_rankings.c:

Go to the source code of this file.
Data Structures | |
| struct | rankings_t |
Defines | |
| #define | ID_CREATE 102 |
| #define | ID_LEAVE 105 |
| #define | ID_LOGIN 100 |
| #define | ID_LOGOUT 101 |
| #define | ID_SETUP 104 |
| #define | ID_SPECTATE 103 |
| #define | RANKINGS_FRAME "menu/art/cut_frame" |
Functions | |
| void | Rankings_Cache (void) |
| void | Rankings_DrawName (void *self) |
| void | Rankings_DrawPassword (void *self) |
| void | Rankings_DrawText (void *self) |
| void | Rankings_MenuEvent (void *ptr, int event) |
| void | Rankings_MenuInit (void) |
| void | UI_RankingsMenu (void) |
Variables | |
| rankings_t | s_rankings |
| menuaction_s | s_rankings_create |
| menuaction_s | s_rankings_leave |
| menuaction_s | s_rankings_login |
| menuaction_s | s_rankings_logout |
| menuframework_s | s_rankings_menu |
| menuaction_s | s_rankings_setup |
| menuaction_s | s_rankings_spectate |
|
|
Definition at line 34 of file ui_rankings.c. Referenced by ArenaServers_Event(), and Rankings_MenuEvent(). |
|
|
Definition at line 37 of file ui_rankings.c. Referenced by Rankings_MenuEvent(). |
|
|
Definition at line 32 of file ui_rankings.c. |
|
|
Definition at line 33 of file ui_rankings.c. Referenced by Rankings_MenuEvent(). |
|
|
Definition at line 36 of file ui_rankings.c. |
|
|
Definition at line 35 of file ui_rankings.c. Referenced by Rankings_MenuEvent(), and TeamMain_MenuEvent(). |
|
|
Definition at line 30 of file ui_rankings.c. Referenced by Rankings_Cache(). |
|
|
Definition at line 405 of file ui_rankings.c. References RANKINGS_FRAME, and trap_R_RegisterShaderNoMip(). Referenced by Rankings_MenuInit(). 00405 {
00406 trap_R_RegisterShaderNoMip( RANKINGS_FRAME );
00407 }
|
Here is the call graph for this function:

|
|
Definition at line 120 of file ui_rankings.c. References mfield_t::buffer, mfield_t::cursor, f, menufield_s::field, length(), p, Q_CleanStr(), Q_isalpha(), Rankings_DrawText(), and strlen(). 00121 {
00122 menufield_s *f;
00123 int length;
00124 char* p;
00125
00126 f = (menufield_s*)self;
00127
00128 // GRANK_FIXME - enforce valid characters
00129 for( p = f->field.buffer; *p != '\0'; p++ )
00130 {
00131 //if( ispunct(*p) || isspace(*p) )
00132 if( !( ( (*p) >= '0' && (*p) <= '9') || Q_isalpha(*p)) )
00133 {
00134 *p = '\0';
00135 }
00136 }
00137
00138 // strip color codes
00139 Q_CleanStr( f->field.buffer );
00140 length = strlen( f->field.buffer );
00141 if( f->field.cursor > length )
00142 {
00143 f->field.cursor = length;
00144 }
00145
00146 Rankings_DrawText( f );
00147 }
|
Here is the call graph for this function:

|
|
Definition at line 191 of file ui_rankings.c. References mfield_t::buffer, mfield_t::cursor, f, menufield_s::field, i, length(), p, Q_isalpha(), Q_strncpyz(), Rankings_DrawText(), and strlen(). 00192 {
00193 menufield_s* f;
00194 char password[MAX_EDIT_LINE];
00195 int length;
00196 int i;
00197 char* p;
00198
00199 f = (menufield_s*)self;
00200
00201 // GRANK_FIXME - enforce valid characters
00202 for( p = f->field.buffer; *p != '\0'; p++ )
00203 {
00204 //if( ispunct(*p) || isspace(*p) )
00205 if( !( ( (*p) >= '0' && (*p) <= '9') || Q_isalpha(*p)) )
00206 {
00207 *p = '\0';
00208 }
00209 }
00210
00211 length = strlen( f->field.buffer );
00212 if( f->field.cursor > length )
00213 {
00214 f->field.cursor = length;
00215 }
00216
00217 // save password
00218 Q_strncpyz( password, f->field.buffer, sizeof(password) );
00219
00220 // mask password with *
00221 for( i = 0; i < length; i++ )
00222 {
00223 f->field.buffer[i] = '*';
00224 }
00225
00226 // draw masked password
00227 Rankings_DrawText( f );
00228 //MenuField_Draw( f );
00229
00230 // restore password
00231 Q_strncpyz( f->field.buffer, password, sizeof(f->field.buffer) );
00232 }
|
Here is the call graph for this function:

|
|
Definition at line 68 of file ui_rankings.c. References mfield_t::buffer, c, color_white, COLOR_WHITE, ColorIndex, mfield_t::cursor, _tag_menuframework::cursor, f, menufield_s::field, g_color_table, menufield_s::generic, menucommon_s::menuPosition, menucommon_s::parent, qboolean, SMALLCHAR_WIDTH, trap_Key_GetOverstrikeMode(), UI_DrawChar(), UI_LEFT, x, menucommon_s::x, menucommon_s::y, and y. Referenced by Rankings_DrawName(), and Rankings_DrawPassword(). 00069 {
00070 menufield_s *f;
00071 qboolean focus;
00072 int style;
00073 char *txt;
00074 char c;
00075 float *color;
00076 int basex, x, y;
00077
00078 f = (menufield_s*)self;
00079 basex = f->generic.x;
00080 y = f->generic.y + 4;
00081 focus = (f->generic.parent->cursor == f->generic.menuPosition);
00082
00083 style = UI_LEFT|UI_SMALLFONT;
00084 color = text_color_normal;
00085 if( focus ) {
00086 style |= UI_PULSE;
00087 color = text_color_highlight;
00088 }
00089
00090 // draw the actual text
00091 txt = f->field.buffer;
00092 color = g_color_table[ColorIndex(COLOR_WHITE)];
00093 x = basex;
00094 while ( (c = *txt) != 0 ) {
00095 UI_DrawChar( x, y, c, style, color );
00096 txt++;
00097 x += SMALLCHAR_WIDTH;
00098 }
00099
00100 // draw cursor if we have focus
00101 if( focus ) {
00102 if ( trap_Key_GetOverstrikeMode() ) {
00103 c = 11;
00104 } else {
00105 c = 10;
00106 }
00107
00108 style &= ~UI_PULSE;
00109 style |= UI_BLINK;
00110
00111 UI_DrawChar( basex + f->field.cursor * SMALLCHAR_WIDTH, y, c, style, color_white );
00112 }
00113 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 239 of file ui_rankings.c. References EXEC_APPEND, ID_CREATE, ID_LEAVE, ID_LOGIN, ID_LOGOUT, ID_SETUP, ID_SPECTATE, trap_Cmd_ExecuteText(), UI_ForceMenuOff(), UI_LoginMenu(), UI_SetupMenu(), and UI_SignupMenu(). 00239 {
00240 if( event != QM_ACTIVATED ) {
00241 return;
00242 }
00243
00244 switch( ((menucommon_s*)ptr)->id ) {
00245 case ID_LOGIN:
00246 UI_LoginMenu();
00247 break;
00248
00249 case ID_LOGOUT:
00250 // server side masqueraded player logout first
00251 trap_CL_UI_RankUserRequestLogout();
00252 UI_ForceMenuOff();
00253 break;
00254
00255 case ID_CREATE:
00256 UI_SignupMenu();
00257 break;
00258
00259 case ID_SPECTATE:
00260 trap_Cmd_ExecuteText( EXEC_APPEND, "cmd rank_spectate\n" );
00261 UI_ForceMenuOff();
00262 break;
00263
00264 case ID_SETUP:
00265 UI_SetupMenu();
00266 break;
00267
00268 case ID_LEAVE:
00269 trap_Cmd_ExecuteText( EXEC_APPEND, "disconnect\n" );
00270 UI_ForceMenuOff();
00271 break;
00272
00273 }
00274 }
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
Definition at line 415 of file ui_rankings.c. References rankings_t::menu, Rankings_MenuInit(), s_rankings, and UI_PushMenu(). Referenced by RankStatus_MenuEvent(). 00415 {
00416 Rankings_MenuInit();
00417 UI_PushMenu ( &s_rankings.menu );
00418 }
|
Here is the call graph for this function:

|
|
Definition at line 52 of file ui_rankings.c. Referenced by Rankings_MenuInit(), and UI_RankingsMenu(). |
|
|
Definition at line 57 of file ui_rankings.c. |
|
|
Definition at line 60 of file ui_rankings.c. |
|
|
Definition at line 55 of file ui_rankings.c. |
|
|
Definition at line 56 of file ui_rankings.c. |
|
|
Definition at line 54 of file ui_rankings.c. |
|
|
Definition at line 59 of file ui_rankings.c. |
|
|
Definition at line 58 of file ui_rankings.c. |
1.3.9.1