Thanks!
I guess the part I've to concentrate on in ui_atoms.c is this:
Code: Select all
if( uis.activemenu->showlogo ) {
UI_DrawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, uis.menuBackShader );
}
else {
UI_DrawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, uis.menuBackNoLogoShader );
}
Seems as if this tells the game to draw the shader "menuback" in the main menu ("s_main.menu.showlogo = qtrue;") and the shader "menubacknologo" in all other submenues.
In ui_qmenu.c these lines look promising:
Code: Select all
if ( uis.glconfig.hardwareType == GLHW_RAGEPRO ) {
// the blend effect turns to shit with the normal
uis.menuBackShader = trap_R_RegisterShaderNoMip( "menubackRagePro" );
} else {
uis.menuBackShader = trap_R_RegisterShaderNoMip( "menuback" );
}
uis.menuBackNoLogoShader = trap_R_RegisterShaderNoMip( "menubacknologo" );
Okay, so if I want to draw the red Q3-logo to the back of each submenu I asume I just have to add that "s_main.menu.showlogo = qtrue;" line to each ones code.
Question is how to create more alternatives... Before I start messing up the code: Is this the right way...
1. Put in a new "if"-function for each background...
Code: Select all
if( uis.activemenu->showlogo ) {
UI_DrawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, uis.menuBackShader );
}
[color=#FF0000]if( uis.activemenu->showlogoA ) {
UI_DrawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, uis.menuBackShaderA );
}
if( uis.activemenu->showlogoB ) {
UI_DrawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, uis.menuBackShaderB );[/color]
else {
UI_DrawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, uis.menuBackNoLogoShader );
}
2. then add new "else"-functions to ui_qmenu.c:
Code: Select all
if ( uis.glconfig.hardwareType == GLHW_RAGEPRO ) {
// the blend effect turns to shit with the normal
uis.menuBackShader = trap_R_RegisterShaderNoMip( "menubackRagePro" );
} else {
uis.menuBackShader = trap_R_RegisterShaderNoMip( "menuback" );
}[color=#FF0000]else {
uis.menuBackShaderA = trap_R_RegisterShaderNoMip( "menubackA" );
}else {
uis.menuBackShaderB = trap_R_RegisterShaderNoMip( "menubackB" );
}[/color]
uis.menuBackNoLogoShader = trap_R_RegisterShaderNoMip( "menubacknologo" );
3. Create shaders with the appropiate names ("menubackA", "menubackB"...)
4. Add a "s_main.menu.showlogoA = qtrue;", "s_main.menu.showlogoB = qtrue;" line to the submenues' code?
No, it is trickier than that, right?!
[color=#FF0000]Visit MONKEYS of DOOM at [url]http://www.monkeysofdoom.org[/url][/color]