Enter Amount

Day of Defeat:Source Bots install Guide
Steam Guide to install bots for Day of Defeat: Source
INsanes GUI and HUD for Day of Defeat: Source
Get the best DoD:S HUD
Please keep dodbits alive - Donate!

Capture Panel

updated steampipeSections


Basic description of the Capture Panel

Flag Icons

 

 


 

Capture3 Capture1
Capture2
Modified Axis Modified Neutral Modified Allied
Basic description of the Capture Panel:
This panel has three files that control behaviour of the capture panel.
 
  • scripts\hudlayout.res  "HudCapturePanel" section
  • resource\ui\hudcapturepanel.res
  • resource\clientsheme.res
scripts\hudlayout.res: Like a lot of other files the hudlayout.res has a section to define the area on the screen the panel will use.
Notice the "xpos" has a "c-" in front of the value, also note the "wide" 150 ? As you may know panels measure from the top left corner, to get this 150 size panel to be in the center the left side has to move over -75 from the center...hence "xpos" "c-75".
Same with the "ypos" position. the top side of the panel dispays 80 from the center and from there the bottom of the panels is 90 high... defined by "tall"   "90".
Code:
 }
    HudCapturePanel
    {
        "fieldName"           "HudCapturePanel"
        "xpos"                  "c-75"
        "ypos"                  "c80"
        "wide"                  "150"
        "tall"                   "90"
        "visible"                "1"
        "enabled"              "1"
        "icon_space"         "2"
    }

resource\ui\hudcapturepanel.res: This file deals with the items inside the defined area made by the hudlayout.res... a small area of 160 wide x 90 high.

There items are...

  • 3 flag icons Allies, Axis and Neutral, images found in dod\dod_pak_dir.vpk  - root\materials\vgui
  • 5 'Teammate" icons 2-5 team members. Fonts in dod\resource\dodlogo.ttf and the character is "." (full stop)
  • The radial progress bar timer
  • The background

They are all simple to adjust, use my test maps to view the changes as you edit on the fly.

Code:
"Resource/UI/HudCapturePanel.res"
{
    "CapturePanelAlliesFlag"
    {
        "ControlName"    "ImagePanel"
        "fieldName"        "CapturePanelAlliesFlag"
        "xpos"            "55"
        "ypos"            "20"
        "wide"            "40"
        "tall"            "40"    
        "visible"        "1"
        "enabled"        "1"
        "scaleImage"    "1"    
        "image"            "Flag_USArmy"
    }
    "CapturePanelAxisFlag"
    {
        "ControlName"    "ImagePanel"
        "fieldName"        "CapturePanelAxisFlag"
        "xpos"            "55"
        "ypos"            "20"
        "wide"            "40"
        "tall"            "40"    
        "visible"        "1"
        "enabled"        "1"
        "scaleImage"    "1"    
        "image"            "Flag_Wermacht"
    }
    "CapturePanelNeutralFlag"
    {
        "ControlName"    "ImagePanel"
        "fieldName"        "CapturePanelNeutralFlag"
        "xpos"            "55"
        "ypos"            "20"
        "wide"            "40"
        "tall"            "40"    
        "visible"        "1"
        "enabled"        "1"
        "scaleImage"    "1"    
        "image"            "Flag_Neutral"
    }        
    "CapturePanelPlayerIcon1"
    {
        "ControlName"    "ImagePanel"
        "fieldName"        "CapturePanelPlayerIcon1"
        "xpos"            "69"
        "ypos"            "52"
        "wide"            "12"
        "tall"            "24"    
        "visible"        "1"
        "enabled"        "1"
    }
    "CapturePanelPlayerIcon2"
    {
        "ControlName"    "ImagePanel"
        "fieldName"        "CapturePanelPlayerIcon2"
        "xpos"            "69"
        "ypos"            "52"
        "wide"            "12"
        "tall"            "24"    
        "visible"        "1"
        "enabled"        "1"
    }    
    "CapturePanelPlayerIcon3"
    {
        "ControlName"    "ImagePanel"
        "fieldName"        "CapturePanelPlayerIcon3"
        "xpos"            "69"
        "ypos"            "52"
        "wide"            "12"
        "tall"            "24"    
        "visible"        "1"
        "enabled"        "1"
    }    
    "CapturePanelPlayerIcon4"
    {
        "ControlName"    "ImagePanel"
        "fieldName"        "CapturePanelPlayerIcon4"
        "xpos"            "69"
        "ypos"            "52"
        "wide"            "12"
        "tall"            "24"    
        "visible"        "1"
        "enabled"        "1"
    }    
    "CapturePanelPlayerIcon5"
    {
        "ControlName"    "ImagePanel"
        "fieldName"        "CapturePanelPlayerIcon5"
        "xpos"            "69"
        "ypos"            "52"
        "wide"            "12"
        "tall"            "24"    
        "visible"        "1"
        "enabled"        "1"
    }    
    "CapturePanelProgressBar"
    {
        "ControlName"        "ImagePanel"
        "fieldName"            "CapturePanelProgressBar"
        "xpos"                "30"
        "ypos"                "0"
        "wide"                "90"
        "tall"                "90"    
        "visible"            "1"
        "enabled"            "1"
        "scaleImage"        "1"
        "image"                "progress_bar"
        "color_active"        "HudProgressBar.Active"
        "color_inactive"    "HudProgressBar.InActive"
    }
    "CapturePanelMessage"
    {
        "ControlName"        "Label"
        "fieldName"            "CapturePanelMessage"
        "xpos"                "15"
        "ypos"                "70"
        "wide"                "120"
        "tall"                "24"    
        "visible"            "1"
        "enabled"            "1"
        "autoResize"        "0"
        "pinCorner"            "0"
        "tabPosition"        "0"
        "labelText"            " "
        "textAlignment"        "center"
        "dulltext"            "0"
        "brighttext"        "0"
        "font"                "ChatFont"
    }    
    "CapturePanelBackground"
    {
        "ControlName"    "Panel"
        "fieldName"        "CapturePanelBackground"
        "xpos"            "30"
        "ypos"            "0"
        "wide"            "90"
        "tall"            "90"
        "visible"        "1"
        "enabled"        "1"
    }
}

resource\clientsheme.res: The color control for the small man icons  "CapturePanelPlayerIcon1""CapturePanelPlayerIcon5" in the clientscheme.res file are found on line 291 ...

HudCaptureIcon.Active "HudProgressBarActive"  // How many team mates already at the flag
HudCaptureIcon.InActive "HudProgressBarInActive" // How many more team mates needed at the flag
 
There is an issue changing colors in the clientsheme.res for the progress bar, it does not recognise the progress bar colors defined ...
 
HudCaptureProgressBar.Active "HudProgressBarActive"        //Broken should be for progress bar
HudCaptureProgressBar.InActive "HudProgressBarInActive"  //Broken should be for progress bar
 
You should just forget about the clientscheme.res and adjust the "CapturePanelProgressBar" section in the hudcapturepanel.res file...

        "color_active"       "HudProgressBar.Active"     // The color before the count starts 
        "color_inactive"    "HudProgressBar.InActive" // The color the bar goes when counting down
 
Change them to a RGB color, in this case a White that goes Red when counting down...
 
     "color_active"      "255 255 255 200"  //"HudProgressBar.Active"      The color before the count starts 
     "color_inactive"    "200 0 0 200"       // "HudProgressBar.InActive"      The color the bar goes when counting down
 
Look at this image to get an idea of the positions and colors of the capture panel items...

capture panel
 

 
Flag Icons: The flag Icons are in the dod\dod_pak_dir.vpk  - root\materials\vgui if you want to change them it is a visit to Photoshop or The Gimp to change the files.
They are named…Capture4
  • Flag_USArmy.vtf
  • Flag_Wermacht.vtf
  • Flag_Neutral.vtf 
There are two others I have not seen
working yet in a game they are…
flag_axis.vtf and flag_allies.vtf

I have reworked the colors in all of them, you can find them in my HUD
s here.
 
As I noted above there are two others for both allies and axis.
To use them… just rename to Flag_USArmy.vtf for allies and Flag_Wermacht.vtf for axis.
 

dodbits.com Copyright © 2014. All Rights Reserved.