PDA

View Full Version : Image Dvar



NemanjA
26th June 2013, 15:35
Hello Everyone,
I don't know how to dvar and image in menu. Can someone help me?
Thanks! :)

IzNoGoD
26th June 2013, 16:42
use showdvar instead of storing the image in the dvar.

NemanjA
26th June 2013, 16:59
So, i must write every image in menu, what i want to dvar, but i must turn it off and on? like:
itemDef
{
name "image"
visible 0
rect 0 6 20 20
origin ORIGIN_IMAGE
style WINDOW_STYLE_SHADER
background "IMAGE"
dvartest "ui_allow_image"
showDvar { "0" }
decoration
}
And activate with:
self setClientCvar("ui_allow_image","0"); ??

kung foo man
26th June 2013, 18:12
Yep, and to make the final .menu-files short und nice you can use macros: http://killtube.org/showthread.php?1082-CoD2-create-functions-in-menu-files!&highlight=macro

serthy
27th June 2013, 08:52
style WINDOWS_STYLE_DVAR_SHADER
dvar ui_shadername
dvartest ui_shadername
hideDvar { "" }

use these 4 rows draws the image given to the menu by the daver and hides empty images
and in your gsc do: player setClientCvar( "ui_shadername" , "headicon_american" );