3.阵营选择界面控件修改
接着来,先给"team"控件增加一个"zpos" "-3",接着讲"terbutton"(匪徒按钮)修改成如下数据:
"terbutton"
{
"ControlName" "Button"
"fieldName" "terbutton"
"xpos" "58"
"ypos" "90"
"zpos" "2"
"wide" "260"
"tall" "260"
"autoResize" "0"
"pinCorner" "2"
"visible" "1"
"enabled" "1"
"tabPosition" "3"
"labelText" ""
"tooltiptext" "Terrorist"
"dulltext" "0"
"brighttext" "0"
"wrap" "0"
"command" "jointeam 2"
"Default" "0"
"selected" "0"
"paintborder" "0 0 0 0"
"sound_armed" "ui/hint.wav"
"sound_depressed" "ui//freeze_cam.wav"
"defaultBgColor_override" "0 0 0 165"
"armedBgColor_override" "0 0 0 0"
"depressedBgColor_override" "0 0 0 0"
}
并在"terbutton"的上方添加一个图片框:
"terBackground"
{
"ControlName" "ImagePanel"
"fieldName" "terBackground"
"xpos" "58"
"ypos" "90"
"zpos" "1"
"wide" "260"
"tall" "260"
"visible" "1"
"enabled" "1"
"scaleImage" "1"
"autoResize" "0"
"pinCorner" "0"
"image" "team_t"
"zpos" "-1"
}
制作team_t.vtf和vmt文件,放到followme\materials\vgui下边,我们进游戏看看效果:
是我们想要的,接着制作CT按钮,修改"ctbutton":
"ctbutton"
{
"ControlName" "Button"
"fieldName" "ctbutton"
"xpos" "325"
"ypos" "90"
"zpos" "2"
"wide" "260"
"tall" "260"
"autoResize" "0"
"pinCorner" "2"
"visible" "1"
"enabled" "1"
"tabPosition" "4"
"labelText" ""
"tooltiptext" "Counter Terrorist"
"dulltext" "0"
"brighttext" "0"
"wrap" "0"
"command" "jointeam 3"
"Default" "0"
"selected" "0"
"paintborder" "0 0 0 0"
"sound_armed" "ui/hint.wav"
"sound_depressed" "ui//freeze_cam.wav"
"defaultBgColor_override" "0 0 0 165"
"armedBgColor_override" "0 0 0 0"
"depressedBgColor_override" "0 0 0 0"
}
在其上方添加一个图片框:
"ctBackground"
{
"ControlName" "ImagePanel"
"fieldName" "ctBackground"
"xpos" "325"
"ypos" "90"
"zpos" "1"
"wide" "260"
"tall" "260"
"visible" "1"
"enabled" "1"
"scaleImage" "1"
"autoResize" "0"
"pinCorner" "0"
"image" "team_ct"
"zpos" "-1"
}
制作team_ct图片,进游戏看看:
剩下的就是完善了,将后边的地图介绍删除,将自动选择和观察按钮放到下边:
将"MapInfo"控件的宽高全部设为0,修改"autobutton"控件为如下参数:
"autobutton"
{
"ControlName" "Button"
"fieldName" "autobutton"
"xpos" "118"
"ypos" "360"
"zpos" "2"
"wide" "400"
"tall" "25"
"autoResize" "0"
"pinCorner" "2"
"visible" "1"
"enabled" "1"
"tabPosition" "1"
"labelText" "#Cstrike_Team_AutoAssign"
"textAlignment" "center"
"dulltext" "0"
"brighttext" "0"
"command" "jointeam 0"
"Default" "1"
"paintborder" "0 0 0 0"
"sound_armed" "ui/hint.wav"
"sound_depressed" "ui//freeze_cam.wav"
"defaultBgColor_override" "134 95 0 210"
"armedBgColor_override" "255 180 0 210"
"depressedBgColor_override" "174 123 0 210"
}