Results 1 to 5 of 5

Thread: 2 dvartest for 1 itemdef?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    or you could do a check in onopen, downside is that this will only be updated when the menu opens, and is quite hard to implement. Wont require additional cvar pushing to the client though
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  2. #2
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    2 cvardevs arent possible
    you could do this instead:

    for images:

    PHP Code:
    #define IMAGE_ON_DVAR( _rect , _dvar ) \
        
    itemdef \
        { \
            
    rect              _rect \
            
    dvarTest          _dvar \
            
    style              WINDOW_STYLE_DVAR_SHADER \
            
    decoration \
            
    hideDvar \
            { \
                
    ""; \
            } \
        }

    #define IMG_SIZE 640 480
    #define IMG_RECT 0 0 IMG_SIZE HORZ_ALIGN_FULLSCREEN VERT_ALIGN_FULLSCREEN
    #define IMG_DVARNAME ui_img

    IMAGE_ON_DVARIMG_RECT IMG_DVARNAME 
    or for other stuff:

    PHP Code:
    #define STUFF_ON_DVAR( _rect , _dvar , _showdvarvalues , _hidedvarvalues ) \
        
    itemdef \
        { \
            
    rect              _rect \
            
    dvarTest          _dvar \
            
    showDvar \
            { \
                
    _showdvarvalues; \
            } \
            
    hideDvar \
            { \
                
    _hidedvarvalues; \
            } \
        }

    #define STUFF_RECT 0 0 10 10 HORZALIGN VERTALIGN

    STUFF_ON_DVARSTUFF_RECT ui_stuff "0";"1";"2" "3";"4" )
    STUFF_ON_DVARSTUFF_RECT ui_stuff "3";"4" "0";"1";"2" 

Posting Permissions

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