| 1 |
/* |
| 2 |
=========================================================================== |
| 3 |
Copyright (C) 1999-2005 Id Software, Inc. |
| 4 |
|
| 5 |
This file is part of Quake III Arena source code. |
| 6 |
|
| 7 |
Quake III Arena source code is free software; you can redistribute it |
| 8 |
and/or modify it under the terms of the GNU General Public License as |
| 9 |
published by the Free Software Foundation; either version 2 of the License, |
| 10 |
or (at your option) any later version. |
| 11 |
|
| 12 |
Quake III Arena source code is distributed in the hope that it will be |
| 13 |
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
GNU General Public License for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU General Public License |
| 18 |
along with Quake III Arena source code; if not, write to the Free Software |
| 19 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 |
=========================================================================== |
| 21 |
*/ |
| 22 |
// |
| 23 |
/* |
| 24 |
======================================================================= |
| 25 |
|
| 26 |
CREDITS |
| 27 |
|
| 28 |
======================================================================= |
| 29 |
*/ |
| 30 |
|
| 31 |
/* |
| 32 |
*Sago 2008-06-29: This is kinda annoying and does not really give usefull information anyway |
| 33 |
*/ |
| 34 |
|
| 35 |
|
| 36 |
#include "ui_local.h" |
| 37 |
|
| 38 |
|
| 39 |
typedef struct { |
| 40 |
menuframework_s menu; |
| 41 |
} creditsmenu_t; |
| 42 |
|
| 43 |
static creditsmenu_t s_credits; |
| 44 |
|
| 45 |
|
| 46 |
/* |
| 47 |
================= |
| 48 |
UI_CreditMenu_Key |
| 49 |
================= |
| 50 |
*/ |
| 51 |
static sfxHandle_t UI_CreditMenu_Key( int key ) { |
| 52 |
if( key & K_CHAR_FLAG ) { |
| 53 |
return 0; |
| 54 |
} |
| 55 |
|
| 56 |
//Sago: I no longer show credits on close. Consider something else if ingame credits are to be made |
| 57 |
//trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" ); |
| 58 |
return 0; |
| 59 |
} |
| 60 |
|
| 61 |
|
| 62 |
/* |
| 63 |
=============== |
| 64 |
UI_CreditMenu_Draw |
| 65 |
=============== |
| 66 |
*/ |
| 67 |
static void UI_CreditMenu_Draw( void ) { |
| 68 |
int y; |
| 69 |
|
| 70 |
y = 12; |
| 71 |
UI_DrawProportionalString( 320, y, "Thank you for playing", UI_CENTER|UI_SMALLFONT, color_white ); |
| 72 |
y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; |
| 73 |
UI_DrawProportionalString( 320, y, "Open Arena", UI_CENTER|UI_SMALLFONT, color_white ); |
| 74 |
|
| 75 |
y += 228; |
| 76 |
UI_DrawString( 320, y, "Terminating...", UI_CENTER|UI_SMALLFONT, color_red ); |
| 77 |
|
| 78 |
y = 480 - PROP_HEIGHT * PROP_SMALL_SIZE_SCALE; |
| 79 |
UI_DrawProportionalString( 320, y, "www.openarena.ws", UI_CENTER|UI_SMALLFONT, color_white ); |
| 80 |
} |
| 81 |
|
| 82 |
|
| 83 |
/* |
| 84 |
=============== |
| 85 |
UI_CreditMenu |
| 86 |
=============== |
| 87 |
*/ |
| 88 |
void UI_CreditMenu( void ) { |
| 89 |
memset( &s_credits, 0 ,sizeof(s_credits) ); |
| 90 |
|
| 91 |
s_credits.menu.draw = UI_CreditMenu_Draw; |
| 92 |
s_credits.menu.key = UI_CreditMenu_Key; |
| 93 |
s_credits.menu.fullscreen = qtrue; |
| 94 |
UI_PushMenu ( &s_credits.menu ); |
| 95 |
trap_Cmd_ExecuteText( EXEC_APPEND, "wait 2; quit\n" ); |
| 96 |
} |