UI修改部分
This commit is contained in:
parent
1e827584c5
commit
853127090d
|
|
@ -0,0 +1,2 @@
|
||||||
|
dofile("sqr/Plugins/Fiendwar/FiendwarHallTeam.nut");
|
||||||
|
print("Reloading Script --- sqr/Plugins/Fiendwar/FiendwarHallTeam.nut");
|
||||||
|
|
@ -18,7 +18,6 @@ dofile("sqr/LenheartCallBack/Sq_MouseEventCallBack.nut"); //鼠标点击回调
|
||||||
//---@工具API类
|
//---@工具API类
|
||||||
dofile("sqr/Tool/Tool.nut"); //主要拓展API工具类
|
dofile("sqr/Tool/Tool.nut"); //主要拓展API工具类
|
||||||
dofile("sqr/Tool/ClassTool.nut"); //主要拓展API工具类
|
dofile("sqr/Tool/ClassTool.nut"); //主要拓展API工具类
|
||||||
dofile("sqr/Tool/UiClassTool.nut"); //UI
|
|
||||||
dofile("sqr/Tool/DebugInfo.nut"); //输出人物主要信息类
|
dofile("sqr/Tool/DebugInfo.nut"); //输出人物主要信息类
|
||||||
//-----------------------------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -36,6 +35,11 @@ dofile("sqr/Plugins/Ptst/Ptst.nut"); //护石系统
|
||||||
dofile("sqr/Plugins/Ptst/Ptst_Func.nut"); //护石函数系统
|
dofile("sqr/Plugins/Ptst/Ptst_Func.nut"); //护石函数系统
|
||||||
//dofile("sqr/UI/MonsterBloodUi/MonsterBloodUi.nut");//怪物血条
|
//dofile("sqr/UI/MonsterBloodUi/MonsterBloodUi.nut");//怪物血条
|
||||||
//dofile("sqr/UI/MonsterBloodUi/MonsterBloodUi_TWO.nut");//怪物血条
|
//dofile("sqr/UI/MonsterBloodUi/MonsterBloodUi_TWO.nut");//怪物血条
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dofile("sqr/Tool/Lenheart_UI/OldWindowsMap.nut"); //窗口Map
|
||||||
|
dofile("sqr/Tool/Lenheart_UI/Lenheart_UI_Class.nut"); //UI
|
||||||
//-----------------------------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
dofile("sqr/Plugins/Luke/luke.nut"); //卢克8人
|
dofile("sqr/Plugins/Luke/luke.nut"); //卢克8人
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
文件名:Fiendwar.nut
|
文件名:Fiendwar.nut
|
||||||
路径:Plugins/Fiendwar/Fiendwar.nut
|
路径:Plugins/Fiendwar/Fiendwar.nut
|
||||||
创建日期:2024-03-03 10:38
|
创建日期:2024-03-03 10:38
|
||||||
文件用途:
|
文件用途:超时空之战 主文件
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class FiendwarTotal extends BasicsDrawTool {
|
class FiendwarTotal extends BasicsDrawTool {
|
||||||
|
|
@ -12,10 +12,14 @@ class FiendwarTotal extends BasicsDrawTool {
|
||||||
town_index 城镇编号
|
town_index 城镇编号
|
||||||
channel_index 频道编号
|
channel_index 频道编号
|
||||||
*/
|
*/
|
||||||
|
//我的客户端cid
|
||||||
MyCid = null;
|
MyCid = null;
|
||||||
|
//我的攻坚队ID
|
||||||
|
MyPartyId = null;
|
||||||
|
//我是否是攻坚队队长
|
||||||
IsCaptain = null;
|
IsCaptain = null;
|
||||||
|
|
||||||
|
//全局获取对象方法
|
||||||
function GetInstance() {
|
function GetInstance() {
|
||||||
return getroottable()["FiendwarCObj"];
|
return getroottable()["FiendwarCObj"];
|
||||||
}
|
}
|
||||||
|
|
@ -40,10 +44,11 @@ class FiendwarTotal extends BasicsDrawTool {
|
||||||
if (L_sq_GetTownIndex() != BaseConfig.town_index) {
|
if (L_sq_GetTownIndex() != BaseConfig.town_index) {
|
||||||
L_sq_MoveTown(BaseConfig.town_index, 0, 474, 249);
|
L_sq_MoveTown(BaseConfig.town_index, 0, 474, 249);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
//不在超时空区域
|
//在超时空区域的 要转移回普通城镇
|
||||||
else {
|
if (L_sq_GetTownIndex() == BaseConfig.town_index) {
|
||||||
L_sq_MoveTown(1, 1, 474, 249);
|
L_sq_MoveTown(1, 1, 474, 249);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -71,15 +76,11 @@ function LenheartFiendwar(obj) {
|
||||||
RootTab["FiendwarCObj"].Proc(obj);
|
RootTab["FiendwarCObj"].Proc(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LenheartNewUI_CreateWindow(FiendwarHallC, "超时空攻坚队伍列表", 320, 40, 478, 434, 18);
|
LenheartNewUI_CreateWindow(FiendwarHallC, "超时空攻坚队伍列表", 320, 40, 478, 434, 18);
|
||||||
// LenheartNewUI_CreateWindow(FiendwarHallCreatePartyC, "超时空创建队伍窗口", 290, 220, 284, 154, 18);
|
// LenheartNewUI_CreateWindow(FiendwarHallCreatePartyC, "超时空创建队伍窗口", 290, 220, 284, 154, 18);
|
||||||
// LenheartNewUI_CreateWindow(FiendwarHallMyPartyEditC, "超时空我的队伍编队窗口", 105, 40, 294, 192, 18);
|
// LenheartNewUI_CreateWindow(FiendwarHallMyPartyEditC, "超时空我的队伍编队窗口", 105, 40, 294, 192, 18);
|
||||||
// LenheartNewUI_CreateWindow(FiendwarHallMyPartyC, "超时空我的队伍窗口", 430, 15, 354, 290, 18);
|
// LenheartNewUI_CreateWindow(FiendwarHallMyPartyC, "超时空我的队伍窗口", 430, 15, 354, 290, 18);
|
||||||
// LenheartNewUI_CreateWindow(FiendwarHallApplyJoinC, "超时空申请加入队伍窗口", 542, 348, 257, 240, 18);
|
// LenheartNewUI_CreateWindow(FiendwarHallApplyJoinC, "超时空申请加入队伍窗口", 542, 348, 257, 240, 18);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// LenheartNewUI_CreateWindow(FiendwarHallPlayerInteractiveC, "测试", 100, 100, 100, 21, 0);
|
// LenheartNewUI_CreateWindow(FiendwarHallPlayerInteractiveC, "测试", 100, 100, 100, 21, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -93,8 +94,10 @@ if (getroottable().rawin("LenheartFuncTab")) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dofile("sqr/Plugins/Fiendwar/FiendwarHall.nut"); //大厅
|
||||||
|
dofile("sqr/Plugins/Fiendwar/FiendwarHallTeam.nut"); //大厅的队伍
|
||||||
|
|
||||||
|
|
||||||
dofile("sqr/Plugins/Fiendwar/FiendwarHall.nut");
|
|
||||||
dofile("sqr/Plugins/Fiendwar/FiendwarHallCreateParty.nut");
|
dofile("sqr/Plugins/Fiendwar/FiendwarHallCreateParty.nut");
|
||||||
dofile("sqr/Plugins/Fiendwar/FiendwarHallMyParty.nut");
|
dofile("sqr/Plugins/Fiendwar/FiendwarHallMyParty.nut");
|
||||||
dofile("sqr/Plugins/Fiendwar/FiendwarHallApplyJoin.nut");
|
dofile("sqr/Plugins/Fiendwar/FiendwarHallApplyJoin.nut");
|
||||||
|
|
@ -4,100 +4,30 @@
|
||||||
创建日期:2024-03-11 12:54
|
创建日期:2024-03-11 12:54
|
||||||
文件用途:超时空之战大厅
|
文件用途:超时空之战大厅
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class FiendwarHallTeamC extends LenheartNewUI_CommonUi {
|
|
||||||
X = 0;
|
|
||||||
Y = 0;
|
|
||||||
Width = null;
|
|
||||||
Height = null;
|
|
||||||
TeamObj = null;
|
|
||||||
//选中状态
|
|
||||||
SelectState = false;
|
|
||||||
//攻坚状态
|
|
||||||
OffensiveState = 0;
|
|
||||||
|
|
||||||
constructor(gTeamObj) {
|
|
||||||
TeamObj = gTeamObj;
|
|
||||||
this.Width = 458;
|
|
||||||
this.Height = 21;
|
|
||||||
|
|
||||||
this.OnClick = function() {
|
|
||||||
local Win = LenheartNewUI_CreateWindow(FiendwarHallC, "超时空攻坚队伍列表", 320, 40, 478, 434, 18);
|
|
||||||
//还原其他 选中自己
|
|
||||||
foreach(Obj in Win.PartyList) {
|
|
||||||
Obj.SelectState = false;
|
|
||||||
}
|
|
||||||
SelectState = !SelectState;
|
|
||||||
local T = {
|
|
||||||
op = 20063013,
|
|
||||||
teamsId = TeamObj.TeamId
|
|
||||||
}
|
|
||||||
BasicsDrawTool.SendPackEx(T);
|
|
||||||
}
|
|
||||||
LenheartNewUI_CommonUi.constructor(10, 82, this.Width, this.Height);
|
|
||||||
}
|
|
||||||
|
|
||||||
function Show(obj) {
|
|
||||||
//绘制底槽
|
|
||||||
L_sq_DrawImg("hud/fiendwarl.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);
|
|
||||||
//绘制攻坚队攻坚状态
|
|
||||||
L_sq_DrawImg("hud/fiendwarl.img", 6 + TeamObj.State, X + 314, Y + 2);
|
|
||||||
|
|
||||||
local PartyPlayerCountStr = TeamObj.TeamPlayerCount + " / " + 8;
|
|
||||||
//绘制攻坚队队员数量
|
|
||||||
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/fiendwarl.img", 5, X, Y);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isInRect) {
|
|
||||||
L_sq_DrawImg("hud/fiendwarl.img", 5, X, Y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class FiendwarHallC extends LenheartNewUI_Windows {
|
class FiendwarHallC extends LenheartNewUI_Windows {
|
||||||
|
|
||||||
// DeBugMode = true;
|
// DeBugMode = true;
|
||||||
|
|
||||||
WindowObj = null; //窗口对象
|
WindowObj = null; //窗口对象
|
||||||
MainState = false; //主状态
|
MainState = false; //主状态
|
||||||
X = 320;
|
X = 320;
|
||||||
Y = 40;
|
Y = 40;
|
||||||
|
//默认显示状态需要是关闭 因为要通过按钮打开
|
||||||
Visible = false;
|
Visible = false;
|
||||||
|
//攻坚队List
|
||||||
|
|
||||||
PartyList = null;
|
PartyList = null;
|
||||||
|
|
||||||
function GetInstance() {
|
function GetInstance() {
|
||||||
return getroottable()["FiendwarHallCObj"];
|
return getroottable()["FiendwarHallCObj"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取所有队伍回调包
|
||||||
function GetAllTeamCallBack(Chunk) {
|
function GetAllTeamCallBack(Chunk) {
|
||||||
// Sout("收到包 : \n %L", Chunk);
|
|
||||||
local Jso = Json.Decode(Chunk);
|
local Jso = Json.Decode(Chunk);
|
||||||
//清除原来的List
|
//清除原来的List PartyList可以直接清除 但是Childrens中的窗口需要调用底层方法清除队伍类
|
||||||
PartyList = [];
|
PartyList = [];
|
||||||
foreach(CIndex, Child in Childrens) {
|
this.RemoveChilds(FiendwarHallTeamC);
|
||||||
if (Child instanceof FiendwarHallTeamC) {
|
//遍历包构造攻坚队UI对象
|
||||||
Childrens.remove(CIndex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach(TeamsSimple in Jso.TeamSimList) {
|
foreach(TeamsSimple in Jso.TeamSimList) {
|
||||||
local T = {
|
local T = {
|
||||||
TeamId = TeamsSimple.TeamId.tostring(),
|
TeamId = TeamsSimple.TeamId.tostring(),
|
||||||
|
|
@ -109,59 +39,67 @@ class FiendwarHallC extends LenheartNewUI_Windows {
|
||||||
Childrens.append(TeamBuf);
|
Childrens.append(TeamBuf);
|
||||||
PartyList.append(TeamBuf);
|
PartyList.append(TeamBuf);
|
||||||
}
|
}
|
||||||
|
//收到刷新队伍列表包时需要将队伍窗口隐藏
|
||||||
local Win = LenheartNewUI_CreateWindow(FiendwarHallMyPartyC, "超时空我的队伍窗口", 430, 15, 354, 290, 18);
|
local Win = LenheartNewUI_CreateWindow(FiendwarHallMyPartyC, "超时空我的队伍窗口", 430, 15, 354, 290, 18);
|
||||||
Win.Visible = false;
|
Win.Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取攻坚队信息回调
|
//获取攻坚队信息回调
|
||||||
function GetTeamInfoCallBack(Chunk) {
|
function GetTeamInfoCallBack(Chunk) {
|
||||||
Sout("收到包 : \n %L", Chunk);
|
// Sout("收到包 : \n %L", Chunk);
|
||||||
|
|
||||||
local Jso = Json.Decode(Chunk);
|
local Jso = Json.Decode(Chunk);
|
||||||
local Win = LenheartNewUI_CreateWindow(FiendwarHallMyPartyC, "超时空我的队伍窗口", 430, 15, 354, 290, 18);
|
local Win = LenheartNewUI_CreateWindow(FiendwarHallMyPartyC, "超时空我的队伍窗口", 430, 15, 354, 290, 18);
|
||||||
|
//开启队伍窗口显示
|
||||||
Win.Visible = true;
|
Win.Visible = true;
|
||||||
|
//设置置顶
|
||||||
Win.ResetFocus();
|
Win.ResetFocus();
|
||||||
|
//清空成员对象集合
|
||||||
Win.MembersList = [];
|
Win.MembersList = [];
|
||||||
|
//赋值队伍名称
|
||||||
Win.TeamName = Jso.team.TeamName;
|
Win.TeamName = Jso.team.TeamName;
|
||||||
|
//赋值队伍ID
|
||||||
Win.TeamID = Jso.team.TeamId;
|
Win.TeamID = Jso.team.TeamId;
|
||||||
|
//遍历Team包 用于构造队伍窗口中的每一位成员
|
||||||
foreach(_index, MemberObj in Jso.team.characNum) {
|
foreach(_index, MemberObj in Jso.team.characNum) {
|
||||||
//说明我在这个攻坚队里
|
//说明我在这个攻坚队里
|
||||||
if (Jso.cid == MemberObj.CID) {
|
if (Jso.cid == MemberObj.CID) {
|
||||||
Win.IsMyTeam = true;
|
Win.IsMyTeam = true;
|
||||||
//存个全局
|
|
||||||
getroottable().rawset("FiendwarHallMyPartyTeamId", Jso.team.TeamId);
|
local Fo = FiendwarTotal.GetInstance();
|
||||||
|
//向全局类存入我的攻坚队伍ID
|
||||||
|
Fo.MyPartyId = Jso.team.TeamId;
|
||||||
|
//存入我的CID
|
||||||
|
Fo.MyCid = Jso.cid;
|
||||||
|
//说明是队长
|
||||||
|
if (Jso.cid == Jso.team.captainCid) {
|
||||||
|
Win.IsCaptain = true;
|
||||||
|
//存入我是攻坚队队长
|
||||||
|
Fo.IsCaptain = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
local T = {
|
local T = {
|
||||||
PartyId = Jso.team.TeamId,
|
PartyId = Jso.team.TeamId, //攻坚队ID
|
||||||
TeamId = MemberObj.characNum + 1,
|
TeamId = MemberObj.characNum + 1, //小队编号
|
||||||
Level = MemberObj.PlayerLevel.tostring(),
|
Level = MemberObj.PlayerLevel.tostring(), //等级
|
||||||
Name = MemberObj.PlayerName,
|
Name = MemberObj.PlayerName, //名字
|
||||||
JobName = MemberObj.PlayerGrowTypeJob,
|
JobName = MemberObj.PlayerGrowTypeJob, //职业名
|
||||||
Job = MemberObj.PlayerJob,
|
Job = MemberObj.PlayerJob, //职业编号
|
||||||
StkHasFlag = MemberObj.isPrepare,
|
StkHasFlag = MemberObj.isPrepare, //是否拥有攻坚材料
|
||||||
EquVos = MemberObj.equVos,
|
EquVos = MemberObj.equVos, //装备List 用于显示头像
|
||||||
Captain = MemberObj.CaptainBool,
|
Captain = MemberObj.CaptainBool, //是否为攻坚队队长
|
||||||
Cid = MemberObj.CID,
|
Cid = MemberObj.CID, //Cid
|
||||||
PlayerSession = MemberObj.PlayerSession
|
PlayerSession = MemberObj.PlayerSession //玩家在世界中的Session 用于进行原生用户操作
|
||||||
}
|
}
|
||||||
|
//通过类构造并添加队伍成员UI对象
|
||||||
local TeamBuf = FiendwarHallMyPartyMemberC(T);
|
local TeamBuf = FiendwarHallMyPartyMemberC(T);
|
||||||
Win.Childrens.append(TeamBuf);
|
Win.Childrens.append(TeamBuf);
|
||||||
Win.MembersList.append(TeamBuf);
|
Win.MembersList.append(TeamBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
local Fo = FiendwarTotal.GetInstance();
|
|
||||||
Fo.MyCid = Jso.cid;
|
|
||||||
//说明是队长
|
|
||||||
if (Jso.cid == Jso.team.captainCid) {
|
|
||||||
Win.IsCaptain = true;
|
|
||||||
Fo.IsCaptain = true;
|
|
||||||
}
|
|
||||||
//刷新界面
|
//刷新界面
|
||||||
Win.RegisterWidget();
|
Win.RegisterWidget();
|
||||||
}
|
}
|
||||||
|
//获取所有队伍
|
||||||
function GetAllTeamCall() {
|
function GetAllTeamCall() {
|
||||||
local Jso = {
|
local Jso = {
|
||||||
op = 20063011
|
op = 20063011
|
||||||
|
|
@ -171,31 +109,17 @@ class FiendwarHallC extends LenheartNewUI_Windows {
|
||||||
|
|
||||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||||
Childrens = [];
|
Childrens = [];
|
||||||
|
PartyList = [];
|
||||||
|
|
||||||
//注册控件
|
//注册控件
|
||||||
RegisterWidget();
|
RegisterWidget();
|
||||||
|
//注册回调包
|
||||||
|
|
||||||
PartyList = [];
|
|
||||||
Pack_Control.rawset(20063002, GetAllTeamCallBack.bindenv(this));
|
Pack_Control.rawset(20063002, GetAllTeamCallBack.bindenv(this));
|
||||||
Pack_Control.rawset(20063004, GetTeamInfoCallBack.bindenv(this));
|
Pack_Control.rawset(20063004, GetTeamInfoCallBack.bindenv(this));
|
||||||
|
|
||||||
GetAllTeamCall();
|
GetAllTeamCall();
|
||||||
|
|
||||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||||
|
|
||||||
//测试数据
|
|
||||||
// for (local i = 0; i< 20; i++) {
|
|
||||||
// local T = {
|
|
||||||
// TeamId = i.tostring(),
|
|
||||||
// TeamName = "Name " + i,
|
|
||||||
// TeamPlayerCount = i,
|
|
||||||
// State = 0
|
|
||||||
// }
|
|
||||||
// local TeamBuf = FiendwarHallTeamC(T);
|
|
||||||
// Childrens.append(TeamBuf);
|
|
||||||
// PartyList.append(TeamBuf);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OnlyPreparingBtn = null;
|
OnlyPreparingBtn = null;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
/*
|
||||||
|
文件名:FiendwarHallTeam.nut
|
||||||
|
路径:Plugins/Fiendwar/FiendwarHallTeam.nut
|
||||||
|
创建日期:2024-04-01 22:30
|
||||||
|
文件用途:超时空之战 大厅中的队伍对象
|
||||||
|
*/
|
||||||
|
|
||||||
|
class FiendwarHallTeamC 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() {
|
||||||
|
//拿到父对象
|
||||||
|
local Win = LenheartNewUI_CreateWindow(FiendwarHallC, "超时空攻坚队伍列表", 320, 40, 478, 434, 18);
|
||||||
|
//还原其他 选中自己
|
||||||
|
foreach(Obj in Win.PartyList) {
|
||||||
|
Obj.SelectState = false;
|
||||||
|
}
|
||||||
|
SelectState = !SelectState;
|
||||||
|
local T = {
|
||||||
|
op = 20063013,
|
||||||
|
teamsId = TeamObj.TeamId
|
||||||
|
}
|
||||||
|
BasicsDrawTool.SendPackEx(T);
|
||||||
|
}
|
||||||
|
LenheartNewUI_CommonUi.constructor(10, 82, this.Width, this.Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
function Show(obj) {
|
||||||
|
//绘制底槽
|
||||||
|
L_sq_DrawImg("hud/fiendwarl.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);
|
||||||
|
//绘制攻坚队攻坚状态
|
||||||
|
L_sq_DrawImg("hud/fiendwarl.img", 6 + TeamObj.State, X + 314, Y + 2);
|
||||||
|
|
||||||
|
local PartyPlayerCountStr = TeamObj.TeamPlayerCount + " / " + 8;
|
||||||
|
//绘制攻坚队队员数量
|
||||||
|
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/fiendwarl.img", 5, X, Y - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isInRect) {
|
||||||
|
L_sq_DrawImg("hud/fiendwarl.img", 5, X, Y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,64 +7,13 @@
|
||||||
|
|
||||||
//新窗口队列
|
//新窗口队列
|
||||||
L_Windows_List <- [];
|
L_Windows_List <- [];
|
||||||
|
//渲染窗口的默认层在下层 即A层
|
||||||
|
WindowsShowABFlag <- false;
|
||||||
|
//鼠标是否悬停在新窗口上的Flag
|
||||||
|
NewWindowsHoverFlag <- false;
|
||||||
|
|
||||||
//如果根空间没有选定AB层的Flag 就新建一个 默认是false 渲染在下层
|
|
||||||
if (!("WindowsShowABFlag" in getroottable())) {
|
|
||||||
getroottable().WindowsShowABFlag <- false;
|
|
||||||
}
|
|
||||||
//是否鼠标悬停在窗口上
|
|
||||||
if (!("WindowsHoverFlag" in getroottable())) {
|
|
||||||
getroottable().WindowsHoverFlag <- false;
|
|
||||||
}
|
|
||||||
//用于查询是否鼠标悬停在原生窗口上的Flag 以下编号代表着没有悬停其他均为悬停在原生窗口
|
|
||||||
NotOldWindowsMap <- {}
|
|
||||||
NotOldWindowsMap.rawset(92, 1);
|
|
||||||
NotOldWindowsMap.rawset(79, 1);
|
|
||||||
NotOldWindowsMap.rawset(2396, 1);
|
|
||||||
NotOldWindowsMap.rawset(3877, 1);
|
|
||||||
NotOldWindowsMap.rawset(3878, 1);
|
|
||||||
NotOldWindowsMap.rawset(3873, 1);
|
|
||||||
NotOldWindowsMap.rawset(3874, 1);
|
|
||||||
NotOldWindowsMap.rawset(3858, 1);
|
|
||||||
NotOldWindowsMap.rawset(3871, 1);
|
|
||||||
NotOldWindowsMap.rawset(3857, 1);
|
|
||||||
NotOldWindowsMap.rawset(3861, 1);
|
|
||||||
NotOldWindowsMap.rawset(3862, 1);
|
|
||||||
// NotOldWindowsMap.rawset(-1, 1);
|
|
||||||
NotOldWindowsMap.rawset(93, 1);
|
|
||||||
NotOldWindowsMap.rawset(94, 1);
|
|
||||||
NotOldWindowsMap.rawset(95, 1);
|
|
||||||
NotOldWindowsMap.rawset(96, 1);
|
|
||||||
NotOldWindowsMap.rawset(97, 1);
|
|
||||||
NotOldWindowsMap.rawset(98, 1);
|
|
||||||
NotOldWindowsMap.rawset(99, 1);
|
|
||||||
NotOldWindowsMap.rawset(100, 1);
|
|
||||||
NotOldWindowsMap.rawset(101, 1);
|
|
||||||
NotOldWindowsMap.rawset(114, 1);
|
|
||||||
NotOldWindowsMap.rawset(88, 1);
|
|
||||||
NotOldWindowsMap.rawset(102, 1);
|
|
||||||
NotOldWindowsMap.rawset(108, 1);
|
|
||||||
NotOldWindowsMap.rawset(109, 1);
|
|
||||||
NotOldWindowsMap.rawset(103, 1);
|
|
||||||
NotOldWindowsMap.rawset(104, 1);
|
|
||||||
NotOldWindowsMap.rawset(110, 1);
|
|
||||||
NotOldWindowsMap.rawset(111, 1);
|
|
||||||
NotOldWindowsMap.rawset(105, 1);
|
|
||||||
NotOldWindowsMap.rawset(106, 1);
|
|
||||||
NotOldWindowsMap.rawset(112, 1);
|
|
||||||
NotOldWindowsMap.rawset(113, 1);
|
|
||||||
NotOldWindowsMap.rawset(107, 1);
|
|
||||||
NotOldWindowsMap.rawset(87, 1);
|
|
||||||
NotOldWindowsMap.rawset(86, 1);
|
|
||||||
NotOldWindowsMap.rawset(80, 1);
|
|
||||||
NotOldWindowsMap.rawset(81, 1);
|
|
||||||
NotOldWindowsMap.rawset(82, 1);
|
|
||||||
NotOldWindowsMap.rawset(83, 1);
|
|
||||||
NotOldWindowsMap.rawset(4067, 1);
|
|
||||||
// NotOldWindowsMap.rawset(130, 1);
|
|
||||||
NotOldWindowsMap.rawset(122, 1);
|
|
||||||
|
|
||||||
//基础窗口类
|
//基础窗口类 所有UI类继承与本类
|
||||||
class LenheartNewUI_BaseWindow extends BasicsDrawTool {
|
class LenheartNewUI_BaseWindow extends BasicsDrawTool {
|
||||||
//子控件
|
//子控件
|
||||||
Childrens = null;
|
Childrens = null;
|
||||||
|
|
@ -105,13 +54,13 @@ class LenheartNewUI_BaseWindow extends BasicsDrawTool {
|
||||||
Window.OnMouseWheel(Flag, MousePos_X, MousePos_Y);
|
Window.OnMouseWheel(Flag, MousePos_X, MousePos_Y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//显示
|
||||||
function Show(obj) {
|
function Show(obj) {
|
||||||
foreach(Window in Childrens) {
|
foreach(Window in Childrens) {
|
||||||
Window.Show(obj);
|
Window.Show(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//同步坐标
|
||||||
function SyncPos(X, Y) {
|
function SyncPos(X, Y) {
|
||||||
foreach(Window in Childrens) {
|
foreach(Window in Childrens) {
|
||||||
Window.SyncPos(X, Y);
|
Window.SyncPos(X, Y);
|
||||||
|
|
@ -119,7 +68,7 @@ class LenheartNewUI_BaseWindow extends BasicsDrawTool {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//窗口类
|
//游戏窗口类
|
||||||
class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
|
class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
|
||||||
//窗口名称
|
//窗口名称
|
||||||
ObjectId = null;
|
ObjectId = null;
|
||||||
|
|
@ -167,7 +116,7 @@ class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
|
||||||
LenheartNewUI_BaseWindow.constructor();
|
LenheartNewUI_BaseWindow.constructor();
|
||||||
}
|
}
|
||||||
|
|
||||||
//加入窗口队列 并且切换到最上层窗口
|
//切换到最上层窗口 即得到焦点时
|
||||||
function ResetFocus() {
|
function ResetFocus() {
|
||||||
foreach(Index, WindowObj in L_Windows_List) {
|
foreach(Index, WindowObj in L_Windows_List) {
|
||||||
if (WindowObj.ObjectId == this.ObjectId) L_Windows_List.remove(Index);
|
if (WindowObj.ObjectId == this.ObjectId) L_Windows_List.remove(Index);
|
||||||
|
|
@ -176,9 +125,36 @@ class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
|
||||||
//切换上层显示
|
//切换上层显示
|
||||||
getroottable().WindowsShowABFlag <- true;
|
getroottable().WindowsShowABFlag <- true;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* @函数作用: 移除子对象
|
||||||
|
* @参数 子对象名称
|
||||||
|
* @返回值
|
||||||
|
*/
|
||||||
|
function RemoveChild(ChildName) {
|
||||||
|
foreach(_Index, _Child in Childrens) {
|
||||||
|
if (_Child.ObjectId == ChildName) {
|
||||||
|
Childrens.remove(_Index);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* @函数作用: 移除子对象类
|
||||||
|
* @参数 类
|
||||||
|
* @返回值
|
||||||
|
*/
|
||||||
|
function RemoveChilds(ClassName) {
|
||||||
|
foreach(_Index, _Child in Childrens) {
|
||||||
|
if (_Child instanceof ClassName) {
|
||||||
|
Childrens.remove(_Index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//关闭窗口 -并没有销毁只是隐藏
|
//关闭窗口 -并没有销毁只是隐藏
|
||||||
function CloseWindow() {
|
function CloseWindow() {
|
||||||
this.Visible = false;
|
this.Visible = false;
|
||||||
|
//这里判断是否有锁定鼠标 如果有就解锁
|
||||||
if (L_sq_RAB(0x1B46886)) {
|
if (L_sq_RAB(0x1B46886)) {
|
||||||
L_sq_WAB(0x1B46886, 0);
|
L_sq_WAB(0x1B46886, 0);
|
||||||
}
|
}
|
||||||
|
|
@ -276,7 +252,7 @@ class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
|
||||||
LenheartNewUI_BaseWindow.OnMouseRbUp(MousePos_X, MousePos_Y);
|
LenheartNewUI_BaseWindow.OnMouseRbUp(MousePos_X, MousePos_Y);
|
||||||
}
|
}
|
||||||
//override
|
//override
|
||||||
//鼠标滚轮时间回调
|
//鼠标滚轮事件回调
|
||||||
function OnMouseWheel(Flag, MousePos_X, MousePos_Y) {
|
function OnMouseWheel(Flag, MousePos_X, MousePos_Y) {
|
||||||
if (!Visible) return;
|
if (!Visible) return;
|
||||||
|
|
||||||
|
|
@ -304,11 +280,11 @@ function CheackMouseInNewWindows(MousePos_X, MousePos_Y) {
|
||||||
if (!Window.Visible) continue;
|
if (!Window.Visible) continue;
|
||||||
if (sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, Window.X, Window.Y, Window.Width, Window.Height)) {
|
if (sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, Window.X, Window.Y, Window.Width, Window.Height)) {
|
||||||
Flag = true;
|
Flag = true;
|
||||||
getroottable().WindowsHoverFlag <- true;
|
getroottable().NewWindowsHoverFlag <- true;
|
||||||
return Flag;
|
return Flag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getroottable().WindowsHoverFlag <- false;
|
getroottable().NewWindowsHoverFlag <- false;
|
||||||
return Flag;
|
return Flag;
|
||||||
}
|
}
|
||||||
//遍历是否悬停在原生窗口上
|
//遍历是否悬停在原生窗口上
|
||||||
|
|
@ -400,7 +376,6 @@ function L_MouseCallBack(MouseState, MouseFlag, MousePos_X, MousePos_Y) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function L_OpenOldWindowCallBack(WindowIndex) {
|
function L_OpenOldWindowCallBack(WindowIndex) {
|
||||||
print(WindowIndex);
|
|
||||||
//将新窗口渲染队列改为下层
|
//将新窗口渲染队列改为下层
|
||||||
if (WindowIndex != 170) getroottable().WindowsShowABFlag <- false;
|
if (WindowIndex != 170) getroottable().WindowsShowABFlag <- false;
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
/*
|
||||||
|
文件名:OldWindowsMap.nut
|
||||||
|
路径:Tool/Lenheart_UI/OldWindowsMap.nut
|
||||||
|
创建日期:2024-04-01 22:43
|
||||||
|
文件用途:用于查询是否鼠标悬停在原生窗口上的Flag 以下编号代表着没有悬停其他均为悬停在原生窗口
|
||||||
|
*/
|
||||||
|
NotOldWindowsMap <- {}
|
||||||
|
NotOldWindowsMap.rawset(92, 1);
|
||||||
|
NotOldWindowsMap.rawset(79, 1);
|
||||||
|
NotOldWindowsMap.rawset(2396, 1);
|
||||||
|
NotOldWindowsMap.rawset(3877, 1);
|
||||||
|
NotOldWindowsMap.rawset(3878, 1);
|
||||||
|
NotOldWindowsMap.rawset(3873, 1);
|
||||||
|
NotOldWindowsMap.rawset(3874, 1);
|
||||||
|
NotOldWindowsMap.rawset(3858, 1);
|
||||||
|
NotOldWindowsMap.rawset(3871, 1);
|
||||||
|
NotOldWindowsMap.rawset(3857, 1);
|
||||||
|
NotOldWindowsMap.rawset(3861, 1);
|
||||||
|
NotOldWindowsMap.rawset(3862, 1);
|
||||||
|
NotOldWindowsMap.rawset(93, 1);
|
||||||
|
NotOldWindowsMap.rawset(94, 1);
|
||||||
|
NotOldWindowsMap.rawset(95, 1);
|
||||||
|
NotOldWindowsMap.rawset(96, 1);
|
||||||
|
NotOldWindowsMap.rawset(97, 1);
|
||||||
|
NotOldWindowsMap.rawset(98, 1);
|
||||||
|
NotOldWindowsMap.rawset(99, 1);
|
||||||
|
NotOldWindowsMap.rawset(100, 1);
|
||||||
|
NotOldWindowsMap.rawset(101, 1);
|
||||||
|
NotOldWindowsMap.rawset(114, 1);
|
||||||
|
NotOldWindowsMap.rawset(88, 1);
|
||||||
|
NotOldWindowsMap.rawset(102, 1);
|
||||||
|
NotOldWindowsMap.rawset(108, 1);
|
||||||
|
NotOldWindowsMap.rawset(109, 1);
|
||||||
|
NotOldWindowsMap.rawset(103, 1);
|
||||||
|
NotOldWindowsMap.rawset(104, 1);
|
||||||
|
NotOldWindowsMap.rawset(110, 1);
|
||||||
|
NotOldWindowsMap.rawset(111, 1);
|
||||||
|
NotOldWindowsMap.rawset(105, 1);
|
||||||
|
NotOldWindowsMap.rawset(106, 1);
|
||||||
|
NotOldWindowsMap.rawset(112, 1);
|
||||||
|
NotOldWindowsMap.rawset(113, 1);
|
||||||
|
NotOldWindowsMap.rawset(107, 1);
|
||||||
|
NotOldWindowsMap.rawset(87, 1);
|
||||||
|
NotOldWindowsMap.rawset(86, 1);
|
||||||
|
NotOldWindowsMap.rawset(80, 1);
|
||||||
|
NotOldWindowsMap.rawset(81, 1);
|
||||||
|
NotOldWindowsMap.rawset(82, 1);
|
||||||
|
NotOldWindowsMap.rawset(83, 1);
|
||||||
|
NotOldWindowsMap.rawset(4067, 1);
|
||||||
|
NotOldWindowsMap.rawset(122, 1);
|
||||||
Loading…
Reference in New Issue