78 lines
2.6 KiB
Plaintext
78 lines
2.6 KiB
Plaintext
/*
|
|
文件名:Rindro_Anton_Party.nut
|
|
路径:Plugins/New_Anton/Rindro_Anton_Party.nut
|
|
创建日期:2024-07-15 21:02
|
|
文件用途:安图恩队伍对象
|
|
*/
|
|
|
|
class Rindro_AntonPartyC extends LenheartNewUI_CommonUi {
|
|
X = 0;
|
|
Y = 0;
|
|
Width = null;
|
|
Height = null;
|
|
TeamObj = null;
|
|
//选中状态
|
|
SelectState = false;
|
|
//攻坚状态
|
|
OffensiveState = 0;
|
|
|
|
constructor(gTeamObj) {
|
|
//拿到信息Map
|
|
TeamObj = gTeamObj;
|
|
//设定宽高 坐标不重要 会被父窗口的Sync同步坐标
|
|
this.Width = 458;
|
|
this.Height = 21;
|
|
|
|
this.OnClick = function() {
|
|
//还原父对象中其他攻坚队伍类 选中自己
|
|
foreach(Obj in Parent.Childrens) {
|
|
if (Obj instanceof Rindro_AntonPartyC) {
|
|
Obj.SelectState = false;
|
|
}
|
|
}
|
|
SelectState = !SelectState;
|
|
//发送查看攻坚队具体信息包
|
|
local T = {
|
|
op = 20064013,
|
|
teamsId = TeamObj.TeamId
|
|
}
|
|
SendPackEx(T);
|
|
}
|
|
LenheartNewUI_CommonUi.constructor(10, 82, this.Width, this.Height);
|
|
}
|
|
|
|
function Show(obj) {
|
|
//绘制底槽
|
|
L_sq_DrawImg("hud/rindroanton.img", 4, X, Y);
|
|
|
|
//绘制队伍编号
|
|
L_sq_DrawCode(TeamObj.TeamId, X + 22 - LenheartTextClass.GetStringLength(TeamObj.TeamId) / 2, Y + 5, sq_RGBA(134, 120, 79, 255), 0, 1);
|
|
L_sq_DrawImg("interface/lenheartwindowcommon.img", 55, X + 52, Y + 7);
|
|
try {
|
|
local channel_index = FiendwarTotal.GetInstance().BaseConfig.channel_index;
|
|
channel_index = channel_index.slice(channel_index.len() - 2, channel_index.len());
|
|
//绘制频道信息
|
|
L_sq_DrawCode(channel_index, X + 102 - LenheartTextClass.GetStringLength(channel_index) / 2, Y + 5, sq_RGBA(134, 120, 79, 255), 0, 1);
|
|
} catch (exception) {
|
|
|
|
}
|
|
//绘制攻坚队名称
|
|
L_sq_DrawCode(TeamObj.TeamName, X + 130, Y + 5, sq_RGBA(134, 120, 79, 255), 0, 1);
|
|
// print(TeamObj.State);
|
|
//绘制攻坚队攻坚状态
|
|
L_sq_DrawImg("hud/newantonui.img", 4 + TeamObj.State, X + 314, Y + 2);
|
|
|
|
local PartyPlayerCountStr = TeamObj.TeamPlayerCount + " / " + 20;
|
|
//绘制攻坚队队员数量
|
|
L_sq_DrawCode(PartyPlayerCountStr, X + 434 - LenheartTextClass.GetStringLength(PartyPlayerCountStr) / 2, Y + 5, sq_RGBA(134, 120, 79, 255), 0, 1);
|
|
|
|
if (SelectState) {
|
|
L_sq_DrawImg("hud/rindroanton.img", 5, X, Y);
|
|
}
|
|
|
|
if (isInRect) {
|
|
L_sq_DrawImg("hud/rindroanton.img", 5, X, Y);
|
|
}
|
|
}
|
|
|
|
} |