A little tutorial (with bad english inside lol), for peoples who want to create somes customs crosshairs. I wanted that :
Picture : http://nantaises.free.fr/new_crosshair.jpg
1/ Open note pad, copy past, and in your ui directory call the file :
crosshairs.menu
--------------------------------------------
#include "ui/menudef.h"
// MG
menuDef {
rect 314.5 235 11 9
fullScreen MENU_FALSE
visible MENU_TRUE
itemDef {
rect 0 12 10 10
visible 1
cvarTest "cg_drawcrosshair"
showCvar { "6" }
textscale .4
text "+"
forecolor 1 1 1 0.3
}
}
----------------------
2/ Add this line :
loadMenu { "ui/crosshairs.menu" }
in your ui/xxxxxxxx.cfg
for example mine is :
--------------------------------------------
// hud menu defs
//
{
loadMenu { "ui/intro.menu" }
loadMenu { "ui/cooller.menu" }
loadMenu { "ui/ingamescoreteam.menu" }
loadMenu { "ui/ingamescorenoteam.menu" }
loadMenu { "ui/endscoreteam.menu" }
loadMenu { "ui/endscorenoteam.menu" }
loadMenu { "ui/crosshairs.menu" }
//loadMenu { "ui/spectator.menu" }
loadMenu { "ui/spectator_follow.menu" }
}
--------------------------------------------
3/
You need to use now cg_drawCrosshair 6 example in your bind config :
bind 2 "weapon 2;cg_drawCrosshair 6 ; cg_crosshairsize 45 ; cg_fov 107; cg_crosshairHitColor 1 ; seta cg_crosshairColor 1"
Now, because it is cvarTest "cg_drawcrosshair", and showCvar { "6" } if i call cg_drawcrosshair 6 i draw my custom crosshair who is a "+", with opacity 0.3 (1 is no opacity)
Picture : http://nantaises.free.fr/new_crosshair.jpg
1/ Open note pad, copy past, and in your ui directory call the file :
crosshairs.menu
--------------------------------------------
#include "ui/menudef.h"
// MG
menuDef {
rect 314.5 235 11 9
fullScreen MENU_FALSE
visible MENU_TRUE
itemDef {
rect 0 12 10 10
visible 1
cvarTest "cg_drawcrosshair"
showCvar { "6" }
textscale .4
text "+"
forecolor 1 1 1 0.3
}
}
----------------------
2/ Add this line :
loadMenu { "ui/crosshairs.menu" }
in your ui/xxxxxxxx.cfg
for example mine is :
--------------------------------------------
// hud menu defs
//
{
loadMenu { "ui/intro.menu" }
loadMenu { "ui/cooller.menu" }
loadMenu { "ui/ingamescoreteam.menu" }
loadMenu { "ui/ingamescorenoteam.menu" }
loadMenu { "ui/endscoreteam.menu" }
loadMenu { "ui/endscorenoteam.menu" }
loadMenu { "ui/crosshairs.menu" }
//loadMenu { "ui/spectator.menu" }
loadMenu { "ui/spectator_follow.menu" }
}
--------------------------------------------
3/
You need to use now cg_drawCrosshair 6 example in your bind config :
bind 2 "weapon 2;cg_drawCrosshair 6 ; cg_crosshairsize 45 ; cg_fov 107; cg_crosshairHitColor 1 ; seta cg_crosshairColor 1"
Now, because it is cvarTest "cg_drawcrosshair", and showCvar { "6" } if i call cg_drawcrosshair 6 i draw my custom crosshair who is a "+", with opacity 0.3 (1 is no opacity)
Mon | Tue | Wed | Thu | Fri | Sat | Sun |
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Edited by OSEF at 02:21 CDT, 19 September 2010 - 8816 Hits