You should be looking at volt's hud for example code. In his hud there is a menu changer for backgrounds which upon clicking the "tremulous" Button the background changes. Also He has different music.
When i looked at how he did it within his hud, it looked really simple
First I'll address your previous questions
1. There is only one gpp hud
2. The hud files go in a ui folder in
Users/name/library/application support/tremulous/base
First there are many huds for 1.2, my favorite being
VoltageGpphudImage1hudImage2Secondly from reading your previous posts, I'm going to guess that you're on 1.2 and not 1.1 tremulous.
This create somewhat of a problem since in 1.2 the menus are more locked down, and they reset after connecting to a server. But the ingame human/alien hud are still editable.
If you’re on 1.1, changing the music in the mainmenu is really simple, just install a custom hud, or create a custom menu loader and create a mainmenu.menu as explained in volt’s hud making guide, and then look for this line
onOpen { uiScript stopRefresh ; playlooped "ui/assets/sounds/Volt_intro.wav" }
Right after playlooped within the quotations “here” you need to redefine a new music file, which has to be in .wav file format. Make sure to place the file within your basefolder or tremulous will not be able to find it.
In regards to your menu image switching, if you install volts hud, it’s quite simple to change the backgrounds since he has a background switcher integrated. This means all you have to do is, place your image files within your base folder, then link to them as below
In the file labeled Main.menu
There are several definitions called
//orange nebula background
itemDef
{
name background //name of item
rect 0 0 640 580 //location of item on screen
style WINDOW_STYLE_SHADER //its a shader
backcolor 0 0 0 1 //black
visible 1 //shown
decoration
background "UI/assets/menu/background6.jpg" //location of image
cvartest cg_background
showCvar {7}
}
If you want to just change his images to your own, just replace the location in the quotations following the cvar “background”
If you would like to add onto his menu images do the following within the main.menu
//orange nebula background
itemDef
{
name background //name of item
rect 0 0 640 580 //location of item on screen
style WINDOW_STYLE_SHADER //its a shader
backcolor 0 0 0 1 //black
visible 1 //shown
decoration
background "location" //location of image
cvartest cg_background
showCvar {NextNumberFollowing Last} //Place the next number following the previous one
}
After you’ve created your new itemdefs to include your new imagebackgrounds, don’t forget to add them to the menu background switcher
//button
itemDef
{
name SETTINGS
type ITEM_TYPE_MULTI
text ""
cvar cg_background
cvarFloatList { "" 1 "" 2 "" 3 "" 4 "" 5 "" 6 "" 7 "" NextNumber } //add your new menu numbers here
textstyle ITEM_TEXTSTYLE_SHADOWED
rect 150 50 400 100
textscale .25
forecolor 1 1 1 1
visible 1
action
{
play "sound/misc/menu3.wav";
}
}
Save the menu, and then reload with /vid_restart
This should solve your problems, remember to look back to the hud making guide for further questions.