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

Go to the source code of this file.
Data Structures | |
| struct | cdkeyMenuInfo_t |
Defines | |
| #define | ART_ACCEPT0 "menu/art/accept_0" |
| #define | ART_ACCEPT1 "menu/art/accept_1" |
| #define | ART_BACK0 "menu/art/back_0" |
| #define | ART_BACK1 "menu/art/back_1" |
| #define | ART_FRAME "menu/art/cut_frame" |
| #define | ID_ACCEPT 11 |
| #define | ID_BACK 12 |
| #define | ID_CDKEY 10 |
Functions | |
| void | UI_CDKeyMenu (void) |
| void | UI_CDKeyMenu_Cache (void) |
| void | UI_CDKeyMenu_DrawKey (void *self) |
| void | UI_CDKeyMenu_Event (void *ptr, int event) |
| void | UI_CDKeyMenu_f (void) |
| void | UI_CDKeyMenu_Init (void) |
| int | UI_CDKeyMenu_PreValidateKey (const char *key) |
Variables | |
| cdkeyMenuInfo_t | cdkeyMenuInfo |
|
|
Definition at line 36 of file ui_cdkey.c. Referenced by UI_CDKeyMenu_Cache(). |
|
|
Definition at line 37 of file ui_cdkey.c. Referenced by UI_CDKeyMenu_Cache(). |
|
|
Definition at line 38 of file ui_cdkey.c. |
|
|
Definition at line 39 of file ui_cdkey.c. |
|
|
Definition at line 35 of file ui_cdkey.c. Referenced by Reset_Cache(), Reset_MenuDraw(), UI_CDKeyMenu_Cache(), UI_SPSkillMenu_Cache(), and UI_TeamOrdersMenu_Cache(). |
|
|
Definition at line 42 of file ui_cdkey.c. Referenced by UI_CDKeyMenu_Event(). |
|
|
Definition at line 43 of file ui_cdkey.c. |
|
|
Definition at line 41 of file ui_cdkey.c. Referenced by UI_SetupMenu_Event(). |
|
|
Definition at line 278 of file ui_cdkey.c. References cdkeyMenuInfo, cdkeyMenuInfo_t::menu, UI_CDKeyMenu_Init(), and UI_PushMenu(). Referenced by UI_CDKeyMenu_f(), UI_MainMenu(), and UI_SetupMenu_Event(). 00278 {
00279 UI_CDKeyMenu_Init();
00280 UI_PushMenu( &cdkeyMenuInfo.menu );
00281 }
|
Here is the call graph for this function:

|
|
Definition at line 264 of file ui_cdkey.c. References ART_ACCEPT0, ART_ACCEPT1, ART_BACK0, ART_BACK1, ART_FRAME, and trap_R_RegisterShaderNoMip(). Referenced by UI_Cache_f(), and UI_CDKeyMenu_Init(). 00264 {
00265 trap_R_RegisterShaderNoMip( ART_ACCEPT0 );
00266 trap_R_RegisterShaderNoMip( ART_ACCEPT1 );
00267 trap_R_RegisterShaderNoMip( ART_BACK0 );
00268 trap_R_RegisterShaderNoMip( ART_BACK1 );
00269 trap_R_RegisterShaderNoMip( ART_FRAME );
00270 }
|
Here is the call graph for this function:

|
|
Definition at line 131 of file ui_cdkey.c. References BIGCHAR_HEIGHT, BIGCHAR_WIDTH, mfield_t::buffer, c, color_red, color_white, color_yellow, mfield_t::cursor, _tag_menuframework::cursor, f, menufield_s::field, menufield_s::generic, listbar_color, menucommon_s::menuPosition, menucommon_s::parent, qboolean, trap_Key_GetOverstrikeMode(), UI_CDKeyMenu_PreValidateKey(), UI_CENTER, UI_DrawChar(), UI_DrawProportionalString(), UI_DrawString(), UI_FillRect(), UI_SMALLFONT, x, and y. 00131 {
00132 menufield_s *f;
00133 qboolean focus;
00134 int style;
00135 char c;
00136 float *color;
00137 int x, y;
00138 int val;
00139
00140 f = (menufield_s *)self;
00141
00142 focus = (f->generic.parent->cursor == f->generic.menuPosition);
00143
00144 style = UI_LEFT;
00145 if( focus ) {
00146 color = color_yellow;
00147 }
00148 else {
00149 color = color_orange;
00150 }
00151
00152 x = 320 - 8 * BIGCHAR_WIDTH;
00153 y = 240 - BIGCHAR_HEIGHT / 2;
00154 UI_FillRect( x, y, 16 * BIGCHAR_WIDTH, BIGCHAR_HEIGHT, listbar_color );
00155 UI_DrawString( x, y, f->field.buffer, style, color );
00156
00157 // draw cursor if we have focus
00158 if( focus ) {
00159 if ( trap_Key_GetOverstrikeMode() ) {
00160 c = 11;
00161 } else {
00162 c = 10;
00163 }
00164
00165 style &= ~UI_PULSE;
00166 style |= UI_BLINK;
00167
00168 UI_DrawChar( x + f->field.cursor * BIGCHAR_WIDTH, y, c, style, color_white );
00169 }
00170
00171 val = UI_CDKeyMenu_PreValidateKey( f->field.buffer );
00172 if( val == 1 ) {
00173 UI_DrawProportionalString( 320, 376, "Please enter your CD Key", UI_CENTER|UI_SMALLFONT, color_yellow );
00174 }
00175 else if ( val == 0 ) {
00176 UI_DrawProportionalString( 320, 376, "The CD Key appears to be valid, thank you", UI_CENTER|UI_SMALLFONT, color_white );
00177 }
00178 else {
00179 UI_DrawProportionalString( 320, 376, "The CD Key is not valid", UI_CENTER|UI_SMALLFONT, color_red );
00180 }
00181 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 66 of file ui_cdkey.c. References mfield_t::buffer, cdkeyMenuInfo_t::cdkey, cdkeyMenuInfo, menufield_s::field, ID_ACCEPT, ID_BACK, trap_SetCDKey(), and UI_PopMenu(). 00066 {
00067 if( event != QM_ACTIVATED ) {
00068 return;
00069 }
00070
00071 switch( ((menucommon_s*)ptr)->id ) {
00072 case ID_ACCEPT:
00073 if( cdkeyMenuInfo.cdkey.field.buffer[0] ) {
00074 trap_SetCDKey( cdkeyMenuInfo.cdkey.field.buffer );
00075 }
00076 UI_PopMenu();
00077 break;
00078
00079 case ID_BACK:
00080 UI_PopMenu();
00081 break;
00082 }
00083 }
|
Here is the call graph for this function:

|
|
Definition at line 289 of file ui_cdkey.c. References UI_CDKeyMenu(). Referenced by UI_ConsoleCommand(). 00289 {
00290 UI_CDKeyMenu();
00291 }
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
Definition at line 91 of file ui_cdkey.c. Referenced by UI_CDKeyMenu_DrawKey(). 00091 {
00092 char ch;
00093
00094 if( strlen( key ) != 16 ) {
00095 return 1;
00096 }
00097
00098 while( ( ch = *key++ ) ) {
00099 switch( ch ) {
00100 case '2':
00101 case '3':
00102 case '7':
00103 case 'a':
00104 case 'b':
00105 case 'c':
00106 case 'd':
00107 case 'g':
00108 case 'h':
00109 case 'j':
00110 case 'l':
00111 case 'p':
00112 case 'r':
00113 case 's':
00114 case 't':
00115 case 'w':
00116 continue;
00117 default:
00118 return -1;
00119 }
00120 }
00121
00122 return 0;
00123 }
|
Here is the call graph for this function:

|
|
Definition at line 58 of file ui_cdkey.c. Referenced by UI_CDKeyMenu(), UI_CDKeyMenu_Event(), and UI_CDKeyMenu_Init(). |
1.3.9.1