Menu Creating Tutorial - PART 2
First of all this is the second part of my tutorial , and this should carry on and show extra features of what can be done with menus.. so i'll start now : 1 Field Boxes. The image below shows a field that you can type into , for example if we typed 'say' in the command box , it would execute the command + whatever is in the field.
Thats the basics of creating the field button , that can also work with cvars , for example you could have 'name' in the command box , and create a field, whatever is typed in the field will be your name, its as simple as that.
2.Dropdown Menus
The basics of a dropdown menu is shown in the
image below, you can include as many items as you want, you could even create a
whole menu
out of dropdown menus, THIS option for the dropdown menu isnt included in the
dropdown list at the top, where you select the 'class' because
fakk wasnt made for mohaa and therefore didnt need it.
This is what runs it : addpopup "MENU" "28.8k modem" command "set
rate 2500" Now, if we wanted to create a popup for
messages , like a announcement it would be addpopup "MSG'S" "Mpc Announce"
command "say Visit Multiplayercheats.de"
Thats all there is too it, if you wanted to create a multiple dropdown menu
, ( which looks cool anyway ) you would do the following :
addpopup "FOG" "Nofog On" command "cg_farplane_nofog 1"
addpopup "FOG" "Nofog Off" command "cg_farplane_nofog 0"
addpopup "VIEW" "3rd Person On" command "cg_3rd_person 1"
addpopup "VIEW" "3rd Person Off" command "cg_3rd_person 0"
I thinks thats about it for the dropdown menus , if you are not
sure have a look at the .URC above which is Multiplayeroptions.urc located
in the Pak0/ui .
3.Sliders
The sliders are really easy to use , just like the rest of the things in this
tutorial , have a look at the image below which is taken from controls.urc
located in the 'Pak0/ui' <-- where all the urc files are. :
The slider can work with almost any Cvar or Cmd, i have used this many times
for 'sensetivity' 'volume contol' and also
fog distance, like it says above thats out of the controls.urc if you have any
doubts always try it :) and if you get an error,
always check mohaa's urc's to see where you have gone wrong....
4.Inserting Images
This is probably the most advanced part of the tutorial , first of all you
can only insert .TGA extensions into the menus , this is because of the alpha
channels stored within the files.If you dont know what an alpha channel is ,
read up on it , because it would take me all day to explain it here! , anyway
inserting images is a bit like selecting the background color of a menu, The
Background of the 'label' needs to be set 'Black' And needs the BG alpha set at
0.00 - This is so it doesnt show you lots of black , and you still can see when
your menu overlays other menus and graphics. The FGcolor should be set at
'White' and should have the FGAlpha set at '1.00' due to the alpha channel.
MOHAA sometimes makes inages blurey and pixelized you can fix this by making
sure you have made the image size in the menu , same as the image is , so if you
had a 100x100 pixel image, the width and height box half way down the properties
box should be the same, and looking at the one above should be something like
'418 180 100 100' . The dialog editor with just an image for a menu should look
something like the image below :
If this is your first time making a graphic menu , make sure you follow this
very carefully , or the graphics will look like a white
or yellow box , and not have your texture there, any questions visit
www.windowsinfo.net and go to the
forums. Here is a sneak preview
of a graphic menu i am currently working on, im not too sure what to put on yet
though :-) , hope this tutorial helped and look out for
part 3 - ( YES THERES LOTS MORE TO EXPLAIN ) .....Laterz
W0000t -- looking good?