Results 1 to 5 of 5

Thread: Image Dvar

  1. #1
    Private
    Join Date
    Jun 2013
    Posts
    26
    Thanks
    20
    Thanked 3 Times in 1 Post

    Image Dvar

    Hello Everyone,
    I don't know how to dvar and image in menu. Can someone help me?
    Thanks!

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    use showdvar instead of storing the image in the dvar.

  3. #3
    Private
    Join Date
    Jun 2013
    Posts
    26
    Thanks
    20
    Thanked 3 Times in 1 Post
    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"); ??

  4. #4
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Yep, and to make the final .menu-files short und nice you can use macros: http://killtube.org/showthread.php?1...ighlight=macro
    timescale 0.01

  5. #5
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    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" );
    Last edited by serthy; 27th June 2013 at 09:36.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •