中国虚拟军事网(VME)- 专注于武装突袭系列虚拟军事游戏

 找回密码
 加入VME

QQ登录

只需一步,快速开始

搜索
查看: 1214|回复: 1

[原创] 一个在右上角hint显示的功能脚本

[复制链接]
发表于 2014-9-22 18:38:49 | 显示全部楼层 |阅读模式




_title = "显示效果:"; _i = vehicle player ;_unitArray = [_i,_i,_i,_i,_i,_i];_a=['可','能','你','会','用','到'];[_unitArray,_title,true,false,1.5,2,1,'#818960','#a9b08e',"center",_a]call loki_fnc_hintdisplay;





/*hint display unit name image.
_align="center";

[_unitArray,_title,true,true,1.5,5,1,'#818960','#a9b08e',_align]call loki_fnc_hintdisplay;
[_unitArray,_title,true,false,1.5,5,1,_titleColor,_txtColor,_align,_txtArray]call loki_fnc_hintdisplay;
[_txtArray,_title,false,'',1.5,'',1,_titleColor,_txtColor,'left']call loki_fnc_hintdisplay;

*/

_unitArray = _this select 0;//单位数组
_title = _this select 1;//第一行标题文本
_sel = _this select 2;//true是读cfg有图文显示false纯文本
_sel2 = _this select 3;//true是单位显示名称false自定义输入的文本数组,元素个数要与单位数组相同
_titleSize = _this select 4;//标题字体大小
_imgSize = _this select 5;//图标大小
_txtSize = _this select 6;//文本字体大小
_titleColor = _this select 7;//标题颜色
_txtColor = _this select 8;//文本字体颜色
_align = _this select 9;//对齐方式
_txtArray = _this select 10;//文本数组

_html = format["<t color='%1' size='%2' shadow='1' align='left' underline='true'>" + "%3" + "</t><br/><br/>",_titleColor,_titleSize,_title];

if (_sel) then {
_ts = -1;
{
  _txt = if(_sel2)then{[configFile >> "CfgVehicles" >>typeOf _x>>"displayName"] call BIS_fnc_getCfgData}else{_ts=_ts+1;_txtArray select _ts};
  _img = [configFile >> "CfgVehicles" >>typeOf _x>>"picture"] call BIS_fnc_getCfgData;

  _html = _html + format["<t size='%1' shadow='1' align='%3' >" +
  "<img image='%2'/>" + "<br/>",_imgSize,_img,_align];
  _html = _html + format["<t color='%1' size='%2' shadow='1' align='%3' >" +  
  _txt + "<br/>" + "</t>",_txtColor,_txtSize,_align];
} forEach _unitArray;
}else{
{
  _html = _html + format["<t color='%1' size='%2' shadow='1' align='%3' >" +  
  _x + "<br/>" + "</t>",_txtColor,_txtSize,_align];
} forEach _unitArray;
};

  hint parseText(_html);








本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入VME

x
发表于 2014-9-23 18:14:18 | 显示全部楼层
好东西,谢谢好心人,晚上研究研究嘿嘿
您需要登录后才可以回帖 登录 | 加入VME

本版积分规则

小黑屋|中国虚拟军事网

GMT+8, 2024-4-29 00:02

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表