This commit is contained in:
parent
38072a43cb
commit
ac05ad8b82
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -347,6 +347,7 @@ function drawMainCustomUI_All(obj) {
|
|||
if (exception != "cannot open the file")
|
||||
print("Reloading Script Fail !!! \n" + exception);
|
||||
}
|
||||
// print(L_sq_RAB(0x1B46886));
|
||||
|
||||
|
||||
// print(L_sq_GetCharacterAttribute(0x1c, 21));
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ class FiendwarTotal extends BasicsDrawTool {
|
|||
town_index 城镇编号
|
||||
channel_index 频道编号
|
||||
*/
|
||||
MyCid = null;
|
||||
IsCaptain = null;
|
||||
|
||||
|
||||
function GetInstance() {
|
||||
return getroottable()["FiendwarCObj"];
|
||||
|
|
@ -73,10 +76,11 @@ function LenheartFiendwar(obj) {
|
|||
// LenheartNewUI_CreateWindow(FiendwarHallCreatePartyC, "超时空创建队伍窗口", 290, 220, 284, 154, 18);
|
||||
// LenheartNewUI_CreateWindow(FiendwarHallMyPartyEditC, "超时空我的队伍编队窗口", 105, 40, 294, 192, 18);
|
||||
// LenheartNewUI_CreateWindow(FiendwarHallMyPartyC, "超时空我的队伍窗口", 430, 15, 354, 290, 18);
|
||||
// LenheartNewUI_CreateWindow(FiendwarHallApplyJoinC, "超时空申请加入队伍窗口", 542, 348, 244, 240, 18);
|
||||
// LenheartNewUI_CreateWindow(FiendwarHallApplyJoinC, "超时空申请加入队伍窗口", 542, 348, 257, 240, 18);
|
||||
|
||||
|
||||
|
||||
// LenheartNewUI_CreateWindow(FiendwarHallPlayerInteractiveC, "测试", 100, 100, 100, 21, 0);
|
||||
}
|
||||
|
||||
if (getroottable().rawin("LenheartFuncTab")) {
|
||||
|
|
|
|||
|
|
@ -114,8 +114,10 @@ class FiendwarHallC extends LenheartNewUI_Windows {
|
|||
Win.Visible = false;
|
||||
}
|
||||
|
||||
//获取攻坚队信息回调
|
||||
function GetTeamInfoCallBack(Chunk) {
|
||||
Sout("收到包 : \n %L", Chunk);
|
||||
|
||||
local Jso = Json.Decode(Chunk);
|
||||
local Win = LenheartNewUI_CreateWindow(FiendwarHallMyPartyC, "超时空我的队伍窗口", 430, 15, 354, 290, 18);
|
||||
Win.Visible = true;
|
||||
|
|
@ -125,7 +127,14 @@ class FiendwarHallC extends LenheartNewUI_Windows {
|
|||
Win.TeamName = Jso.team.TeamName;
|
||||
Win.TeamID = Jso.team.TeamId;
|
||||
foreach(_index, MemberObj in Jso.team.characNum) {
|
||||
//说明我在这个攻坚队里
|
||||
if (Jso.cid == MemberObj.CID) {
|
||||
Win.IsMyTeam = true;
|
||||
//存个全局
|
||||
getroottable().rawset("FiendwarHallMyPartyTeamId", Jso.team.TeamId);
|
||||
}
|
||||
local T = {
|
||||
PartyId = Jso.team.TeamId,
|
||||
TeamId = MemberObj.TeamNum,
|
||||
Level = MemberObj.PlayerLevel.tostring(),
|
||||
Name = MemberObj.PlayerName,
|
||||
|
|
@ -133,13 +142,24 @@ class FiendwarHallC extends LenheartNewUI_Windows {
|
|||
Job = MemberObj.PlayerJob,
|
||||
StkHasFlag = MemberObj.isPrepare,
|
||||
EquVos = MemberObj.equVos,
|
||||
Captain = MemberObj.CaptainBool
|
||||
Captain = MemberObj.CaptainBool,
|
||||
Cid = MemberObj.CID,
|
||||
PlayerSession = MemberObj.PlayerSession
|
||||
}
|
||||
local TeamBuf = FiendwarHallMyPartyMemberC(T);
|
||||
Win.Childrens.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();
|
||||
}
|
||||
|
||||
function GetAllTeamCall() {
|
||||
|
|
@ -186,7 +206,7 @@ class FiendwarHallC extends LenheartNewUI_Windows {
|
|||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_BaseButton(457, 0, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.OnClick = function() {
|
||||
this.Visible = false;
|
||||
CloseWindow();
|
||||
}.bindenv(this);
|
||||
Childrens.append(CloseButton);
|
||||
|
||||
|
|
@ -295,6 +315,7 @@ class FiendwarHallC extends LenheartNewUI_Windows {
|
|||
MyPartyButton.OnClick = function() {
|
||||
local Win = LenheartNewUI_CreateWindow(FiendwarHallCreatePartyC, "超时空创建队伍窗口", 290, 220, 284, 154, 18);
|
||||
Win.Visible = true;
|
||||
Win.ResetFocus();
|
||||
}.bindenv(this);
|
||||
Childrens.append(MyPartyButton);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ class FiendwarHallApplyJoinC extends LenheartNewUI_Windows {
|
|||
//调试模式
|
||||
// DeBugMode = true;
|
||||
|
||||
//角色对象
|
||||
Charc = null;
|
||||
//角色等级
|
||||
Level = "100级";
|
||||
//角色名称
|
||||
|
|
@ -58,44 +60,21 @@ class FiendwarHallApplyJoinC extends LenheartNewUI_Windows {
|
|||
]
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
RequestJoinTeamArr = [];
|
||||
|
||||
AvatarArr = [{
|
||||
layer = 0,
|
||||
dressImg = "character/swordman/equipment/avatar/skin/sm_body0004.img",
|
||||
dressImgInt = 90,
|
||||
pos = [-232, -333, 0]
|
||||
}, {
|
||||
layer = 260,
|
||||
dressImg = "character/swordman/equipment/avatar/face/sm_face16700b.img",
|
||||
dressImgInt = 90,
|
||||
pos = [-232, -333, 0]
|
||||
}, {
|
||||
layer = 800,
|
||||
dressImg = "character/swordman/equipment/avatar/hair/sm_hair18300b.img",
|
||||
dressImgInt = 90,
|
||||
pos = [-232, -333, 0]
|
||||
}, {
|
||||
layer = 2000,
|
||||
dressImg = "character/swordman/equipment/avatar/hair/sm_hair18300a.img",
|
||||
dressImgInt = 90,
|
||||
pos = [-232, -333, 0]
|
||||
}, {
|
||||
layer = 2100,
|
||||
dressImg = "character/swordman/equipment/avatar/cap/sm_cap19800a.img",
|
||||
dressImgInt = 90,
|
||||
pos = [-232, -333, 0]
|
||||
}];
|
||||
|
||||
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
}
|
||||
|
||||
function InitInfo() {
|
||||
local CJoinTeamArr = clone(RequestJoinTeamArr);
|
||||
CJoinTeamArr.reverse();
|
||||
// local CJoinTeamArr = clone(RequestJoinTeamArr);
|
||||
// CJoinTeamArr.reverse();
|
||||
|
||||
local InfoObj = CJoinTeamArr[NowSelectJoinIndex];
|
||||
local InfoObj = RequestJoinTeamArr[NowSelectJoinIndex];
|
||||
Charc = InfoObj.Charc;
|
||||
//角色等级
|
||||
Level = InfoObj.Level;
|
||||
//角色名称
|
||||
|
|
@ -114,6 +93,8 @@ class FiendwarHallApplyJoinC extends LenheartNewUI_Windows {
|
|||
Combat = InfoObj.Combat;
|
||||
//通过次数
|
||||
ClearanceCount = InfoObj.ClearanceCount;
|
||||
//头像
|
||||
AvatarArr = InfoObj.AvatarArr;
|
||||
|
||||
Childrens = [];
|
||||
//注册控件
|
||||
|
|
@ -121,14 +102,21 @@ class FiendwarHallApplyJoinC extends LenheartNewUI_Windows {
|
|||
InitFlag = true;
|
||||
}
|
||||
|
||||
function PopOne() {
|
||||
if (RequestJoinTeamArr.len() > 1) {
|
||||
RequestJoinTeamArr.remove(0);
|
||||
InitInfo();
|
||||
} else {
|
||||
RequestJoinTeamArr = [];
|
||||
CloseWindow();
|
||||
}
|
||||
}
|
||||
|
||||
function RegisterWidget() {
|
||||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_BaseButton(244, 0, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.OnClick = function() {
|
||||
if (RequestJoinTeamArr.len() > 0) {
|
||||
RequestJoinTeamArr.pop();
|
||||
Init();
|
||||
} else this.Visible = false;
|
||||
PopOne();
|
||||
}.bindenv(this);
|
||||
Childrens.append(CloseButton);
|
||||
|
||||
|
|
@ -149,23 +137,42 @@ class FiendwarHallApplyJoinC extends LenheartNewUI_Windows {
|
|||
//确认按钮
|
||||
local OkButton = LenheartNewUI_ButtonText(74, 192, -1, "是");
|
||||
OkButton.SetTextOffset(3, 2);
|
||||
OkButton.OnClick = function() {
|
||||
local T = {
|
||||
op = 20063003,
|
||||
teamsId = getroottable().rawget("FiendwarHallMyPartyTeamId"),
|
||||
charac = Charc
|
||||
}
|
||||
BasicsDrawTool.SendPackEx(T);
|
||||
PopOne();
|
||||
}.bindenv(this);
|
||||
Childrens.append(OkButton);
|
||||
//拒绝按钮
|
||||
local OkButton = LenheartNewUI_ButtonText(130, 192, -1, "否");
|
||||
OkButton.SetTextOffset(3, 2);
|
||||
Childrens.append(OkButton);
|
||||
local NoButton = LenheartNewUI_ButtonText(130, 192, -1, "否");
|
||||
NoButton.SetTextOffset(3, 2);
|
||||
NoButton.OnClick = function() {
|
||||
local T = {
|
||||
op = 20063019,
|
||||
charac = Charc.cid
|
||||
}
|
||||
BasicsDrawTool.SendPackEx(T);
|
||||
PopOne();
|
||||
}.bindenv(this);
|
||||
Childrens.append(NoButton);
|
||||
|
||||
//左翻页按钮
|
||||
local LeftButton = LenheartNewUI_BaseButton(90, 220, 15, 15, "interface/lenheartwindowcommon.img", 34);
|
||||
LeftButton.OnClick = function() {
|
||||
if (NowSelectJoinIndex > 0) NowSelectJoinIndex--;
|
||||
InitInfo();
|
||||
}.bindenv(this);
|
||||
Childrens.append(LeftButton);
|
||||
|
||||
//右翻页按钮
|
||||
local RightButton = LenheartNewUI_BaseButton(154, 220, 15, 15, "interface/lenheartwindowcommon.img", 38);
|
||||
RightButton.OnClick = function() {
|
||||
if (NowSelectJoinIndex< RequestJoinTeamArr.len()) NowSelectJoinIndex++;
|
||||
if (NowSelectJoinIndex< RequestJoinTeamArr.len() - 1) NowSelectJoinIndex++;
|
||||
InitInfo();
|
||||
}.bindenv(this);
|
||||
Childrens.append(RightButton);
|
||||
}
|
||||
|
|
@ -185,13 +192,13 @@ class FiendwarHallApplyJoinC extends LenheartNewUI_Windows {
|
|||
L_sq_DrawImg("hud/fiendwarl.img", 14, X + 8, Y + 40);
|
||||
//绘制角色头像
|
||||
if (AvatarArr) {
|
||||
|
||||
foreach(AvatarObj in AvatarArr) {
|
||||
local AXpos = AvatarObj.pos[0] + X + OffsetArr[Job][0] - 8;
|
||||
local AYpos = AvatarObj.pos[1] + Y + OffsetArr[Job][1] + 40;
|
||||
local AXpos = AvatarObj.D[0] + X + OffsetArr[Job][0] - 8;
|
||||
local AYpos = AvatarObj.D[1] + Y + OffsetArr[Job][1] + 40;
|
||||
setClip(AXpos + OffsetArr[Job][2], AYpos + OffsetArr[Job][3], AXpos + OffsetArr[Job][2] + 22, AYpos + OffsetArr[Job][3] + 18); //开始裁切
|
||||
L_sq_DrawImg(AvatarObj.dressImg, AvatarObj.dressImgInt, AXpos, AYpos);
|
||||
L_sq_DrawImg("character/" + AvatarObj.B + ".img", AvatarObj.C, AXpos, AYpos);
|
||||
releaseClip(); //裁切结束
|
||||
// }
|
||||
}
|
||||
}
|
||||
//绘制角色等级
|
||||
|
|
@ -237,4 +244,5 @@ class FiendwarHallApplyJoinC extends LenheartNewUI_Windows {
|
|||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -17,6 +17,14 @@ class FiendwarHallCreatePartyC extends LenheartNewUI_Windows {
|
|||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
|
||||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_BaseButton(266, 2, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.OnClick = function() {
|
||||
CloseWindow();
|
||||
}.bindenv(this);
|
||||
Childrens.append(CloseButton);
|
||||
|
||||
local OkButton = LenheartNewUI_ButtonText(78, 124, 5, "确定");
|
||||
OkButton.SetTextOffset(0, 1);
|
||||
OkButton.OnClick = function() {
|
||||
|
|
@ -27,7 +35,7 @@ class FiendwarHallCreatePartyC extends LenheartNewUI_Windows {
|
|||
items = [L_sq_GetCharacterAttribute(0x1c, 21), L_sq_GetCharacterAttribute(0x1c, 15), L_sq_GetCharacterAttribute(0x1c, 14), L_sq_GetCharacterAttribute(0x1c, 13)],
|
||||
}
|
||||
BasicsDrawTool.SendPackEx(T);
|
||||
this.Visible = false;
|
||||
CloseWindow();
|
||||
}
|
||||
}.bindenv(this);
|
||||
Childrens.append(OkButton);
|
||||
|
|
@ -35,7 +43,7 @@ class FiendwarHallCreatePartyC extends LenheartNewUI_Windows {
|
|||
local CloseButton = LenheartNewUI_ButtonText(144, 124, 5, "取消");
|
||||
CloseButton.SetTextOffset(0, 1);
|
||||
CloseButton.OnClick = function() {
|
||||
this.Visible = false;
|
||||
CloseWindow();
|
||||
}.bindenv(this);
|
||||
Childrens.append(CloseButton);
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class FiendwarHallMyPartyEdit_BaseButton extends LenheartNewUI_BaseButton {
|
|||
isLBDown = false;
|
||||
}
|
||||
}
|
||||
|
||||
//编队窗口
|
||||
class FiendwarHallMyPartyEditC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
|
|
@ -40,7 +40,7 @@ class FiendwarHallMyPartyEditC extends LenheartNewUI_Windows {
|
|||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_BaseButton(278, 0, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.OnClick = function() {
|
||||
this.Visible = false;
|
||||
CloseWindow();
|
||||
}.bindenv(this);
|
||||
Childrens.append(CloseButton);
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ class FiendwarHallMyPartyEditC extends LenheartNewUI_Windows {
|
|||
local CloseButton = LenheartNewUI_ButtonText(150, 158, 5, "关闭");
|
||||
CloseButton.SetTextOffset(0, 1);
|
||||
CloseButton.OnClick = function() {
|
||||
this.Visible = false;
|
||||
CloseWindow();
|
||||
}.bindenv(this);
|
||||
Childrens.append(CloseButton);
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ class FiendwarHallMyPartyEditC extends LenheartNewUI_Windows {
|
|||
}
|
||||
|
||||
if (PartyMarkFlag != 0) {
|
||||
L_sq_WA(0x1b46898, 2);
|
||||
L_sq_WA(0x1b46898, 16);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -113,7 +113,216 @@ class FiendwarHallMyPartyEditC extends LenheartNewUI_Windows {
|
|||
}
|
||||
}
|
||||
|
||||
//角色交互按钮需要传递参数所以重写
|
||||
class FiendwarHallPlayerInteractive_BaseButton extends LenheartNewUI_BaseButton {
|
||||
|
||||
OnShow = null;
|
||||
|
||||
constructor(X, Y, W, H, Path, Idx) {
|
||||
|
||||
LenheartNewUI_BaseButton.constructor(X, Y, W, H, Path, Idx);
|
||||
}
|
||||
|
||||
//鼠标左键弹起回调
|
||||
function OnMouseLbUp(MousePos_X, MousePos_Y) {
|
||||
Y--;
|
||||
if (isLBDown && OnClick) {
|
||||
OnClick();
|
||||
}
|
||||
isLBDown = false;
|
||||
local Each = LenheartNewUI_CreateWindow(FiendwarHallPlayerInteractiveC, "超时空玩家交互", X, Y, 100, 21, 0);
|
||||
Each.Visible = false;
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
//不可用
|
||||
if (State == 8) {
|
||||
L_sq_DrawImg(Path, Idx + 3, X, Y + 1);
|
||||
} else {
|
||||
//按下
|
||||
if (isLBDown) {
|
||||
Y++;
|
||||
L_sq_DrawImg(Path, (Idx * 2) + 2, X, Y);
|
||||
}
|
||||
//悬停
|
||||
else if (isInRect) {
|
||||
L_sq_DrawImg(Path, (Idx * 2) + 1, X, Y);
|
||||
}
|
||||
//普通
|
||||
else {
|
||||
L_sq_DrawImg(Path, 0, X, Y);
|
||||
}
|
||||
}
|
||||
if (OnShow) OnShow(X, Y);
|
||||
}
|
||||
}
|
||||
//角色交互类
|
||||
class FiendwarHallPlayerInteractiveC extends LenheartNewUI_Windows {
|
||||
// DeBugMode = true;
|
||||
|
||||
HandBoxColor = [
|
||||
0xff717272,
|
||||
0xff7b2a29,
|
||||
0xff874e0d,
|
||||
0xff8b8108,
|
||||
0xff658e2d,
|
||||
0xff0f5c8a,
|
||||
0xff27238f,
|
||||
0xff4e2491,
|
||||
0xff932586,
|
||||
]
|
||||
|
||||
//X Y 裁切开始X Y 裁切结束X Y
|
||||
OffsetArr = [
|
||||
//男鬼剑士
|
||||
[45, 103, 230, 231],
|
||||
//女格斗家
|
||||
[56, 102, 235, 279],
|
||||
//男神枪手
|
||||
[52, 130, 238, 246],
|
||||
//女魔法师
|
||||
[55, 87, 234, 293],
|
||||
//男圣职者
|
||||
[42, 115, 223, 200],
|
||||
//女神枪手
|
||||
[52, 119, 226, 209],
|
||||
//暗夜使者
|
||||
[56, 102, 225, 226],
|
||||
//男格斗家
|
||||
[50, 114, 239, 216],
|
||||
//男魔法师
|
||||
[54, 103, 236, 276],
|
||||
//黑暗武士
|
||||
[46, 102, 229, 232],
|
||||
//缔造者
|
||||
[56, 86, 235, 293],
|
||||
]
|
||||
InfoObj = null;
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
}
|
||||
|
||||
//初始化Flag 初始化以后才显示
|
||||
InitInfoFlag = false;
|
||||
|
||||
function InitInfo() {
|
||||
Childrens = [];
|
||||
//还原标签数量
|
||||
InitIndexFlag = 1;
|
||||
//还原高度
|
||||
Height = 21;
|
||||
//还原可见性
|
||||
Visible = true;
|
||||
//置顶窗口
|
||||
ResetFocus();
|
||||
RegisterWidget();
|
||||
InitInfoFlag = true;
|
||||
}
|
||||
|
||||
InitIndexFlag = 1;
|
||||
|
||||
function RegisterWidget() {
|
||||
//是团长才能委任
|
||||
if (FiendwarTotal.GetInstance().IsCaptain && !("IsMyself" in InfoObj)) {
|
||||
//委任团长按钮
|
||||
local GiveMasterButton = FiendwarHallPlayerInteractive_BaseButton(0, 0 + (InitIndexFlag * 21), 100, 21, "interface2/popup_menu/popup_back.img", 0);
|
||||
GiveMasterButton.OnShow = function(X, Y) {
|
||||
L_sq_DrawImg("interface2/popup_menu/popup_icon_character.img", 11, X, Y + 2);
|
||||
L_sq_DrawCode("委任团长", X + 36, Y + 5, sq_RGBA(104, 213, 237, 255), 0, 1);
|
||||
}
|
||||
GiveMasterButton.OnClick = function() {
|
||||
|
||||
}.bindenv(this);
|
||||
Childrens.append(GiveMasterButton);
|
||||
InitIndexFlag++;
|
||||
Height += 21;
|
||||
}
|
||||
|
||||
//查看信息按钮
|
||||
local CheckInfoButton = FiendwarHallPlayerInteractive_BaseButton(0, 0 + (InitIndexFlag * 21), 100, 21, "interface2/popup_menu/popup_back.img", 0);
|
||||
CheckInfoButton.OnShow = function(X, Y) {
|
||||
L_sq_DrawImg("interface2/popup_menu/popup_icon_character.img", 10, X, Y + 2);
|
||||
L_sq_DrawCode("查看信息", X + 36, Y + 5, sq_RGBA(104, 213, 237, 255), 0, 1);
|
||||
}
|
||||
CheckInfoButton.OnClick = function() {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
L_sq_SendPackType(8);
|
||||
L_sq_SendPackWord(InfoObj.PlayerSession);
|
||||
L_sq_SendPackByte(3);
|
||||
L_sq_SendPack();
|
||||
getroottable().WindowsShowABFlag <- false; //让原生窗口置顶
|
||||
}.bindenv(this);
|
||||
Childrens.append(CheckInfoButton);
|
||||
InitIndexFlag++;
|
||||
Height += 21;
|
||||
|
||||
if (!("IsMyself" in InfoObj)) {
|
||||
//交易按钮
|
||||
local TransactionButton = FiendwarHallPlayerInteractive_BaseButton(0, 0 + (InitIndexFlag * 21), 100, 21, "interface2/popup_menu/popup_back.img", 0);
|
||||
TransactionButton.OnShow = function(X, Y) {
|
||||
L_sq_DrawImg("interface2/popup_menu/popup_icon_character.img", 0, X, Y + 2);
|
||||
L_sq_DrawCode("交易", X + 46, Y + 5, sq_RGBA(104, 213, 237, 255), 0, 1);
|
||||
}
|
||||
TransactionButton.OnClick = function() {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
L_sq_SendPackType(10);
|
||||
L_sq_SendPackWord(InfoObj.PlayerSession);
|
||||
L_sq_SendPackByte(1);
|
||||
L_sq_SendPackDWord(22053);
|
||||
L_sq_SendPack();
|
||||
getroottable().WindowsShowABFlag <- false; //让原生窗口置顶
|
||||
}.bindenv(this);
|
||||
Childrens.append(TransactionButton);
|
||||
InitIndexFlag++;
|
||||
Height += 21;
|
||||
|
||||
|
||||
//攻坚队员强退按钮
|
||||
local KickMemberButton = FiendwarHallPlayerInteractive_BaseButton(0, 0 + (InitIndexFlag * 21), 100, 21, "interface2/popup_menu/popup_back.img", 4);
|
||||
KickMemberButton.OnShow = function(X, Y) {
|
||||
L_sq_DrawImg("interface2/popup_menu/popup_icon_warning.img", 3, X, Y + 2);
|
||||
L_sq_DrawCode("攻坚队员强退", X + 24, Y + 5, sq_RGBA(255, 50, 50, 255), 0, 1);
|
||||
}
|
||||
KickMemberButton.OnClick = function() {
|
||||
local obj = sq_GetMyMasterCharacter();
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
local T = {
|
||||
op = 20063021,
|
||||
teamsId = InfoObj.PartyId,
|
||||
charCid = InfoObj.Cid
|
||||
}
|
||||
BasicsDrawTool.SendPackEx(T);
|
||||
}.bindenv(this);
|
||||
Childrens.append(KickMemberButton);
|
||||
InitIndexFlag++;
|
||||
Height += 21;
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
if (!InitInfoFlag) return;
|
||||
L_sq_DrawImg("interface2/popup_menu/popup_back.img", 0, X, Y);
|
||||
//绘制角色名
|
||||
L_sq_DrawCode(InfoObj.Name, X + 61 - LenheartTextClass.GetStringLength(InfoObj.Name) / 2, Y + 4, sq_RGBA(169, 255, 171, 255), 0, 1);
|
||||
//绘制头像
|
||||
foreach(AvatarObj in InfoObj.EquVos) {
|
||||
local AXpos = AvatarObj.D[0] + X + OffsetArr[InfoObj.Job][0] - 40;
|
||||
local AYpos = AvatarObj.D[1] + Y + OffsetArr[InfoObj.Job][1];
|
||||
setClip(AXpos + OffsetArr[InfoObj.Job][2], AYpos + OffsetArr[InfoObj.Job][3], AXpos + OffsetArr[InfoObj.Job][2] + 22, AYpos + OffsetArr[InfoObj.Job][3] + 18); //开始裁切
|
||||
L_sq_DrawImg("character/" + AvatarObj.B + ".img", AvatarObj.C, AXpos, AYpos);
|
||||
releaseClip(); //裁切结束
|
||||
}
|
||||
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
}
|
||||
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//队员显示类
|
||||
|
|
@ -178,6 +387,20 @@ class FiendwarHallMyPartyMemberC extends LenheartNewUI_CommonUi {
|
|||
Obj.SelectState = false;
|
||||
}
|
||||
SelectState = !SelectState;
|
||||
|
||||
|
||||
local Each = LenheartNewUI_CreateWindow(FiendwarHallPlayerInteractiveC, "超时空玩家交互", 0, 0, 100, 21, 0);
|
||||
//改变鼠标坐标
|
||||
Each.X = MousePos_X;
|
||||
Each.Y = MousePos_Y;
|
||||
//赋值对象参数
|
||||
Each.InfoObj = InfoObj;
|
||||
//对象不是我才能点开交互按钮
|
||||
if (InfoObj.Cid == FiendwarTotal.GetInstance().MyCid) {
|
||||
Each.InfoObj.IsMyself <- true;
|
||||
}
|
||||
//刷新UI
|
||||
Each.InitInfo();
|
||||
}
|
||||
LenheartNewUI_CommonUi.constructor(10, 82, this.Width, this.Height);
|
||||
|
||||
|
|
@ -235,6 +458,15 @@ class FiendwarHallMyPartyMemberC extends LenheartNewUI_CommonUi {
|
|||
L_sq_DrawImg("hud/fiendwarl.img", 13, X, Y);
|
||||
}
|
||||
}
|
||||
|
||||
MousePos_X = 0;
|
||||
MousePos_Y = 0;
|
||||
//鼠标事件回调
|
||||
function OnMouseProc(Flag, gMousePos_X, gMousePos_Y) {
|
||||
this.MousePos_X = gMousePos_X;
|
||||
this.MousePos_Y = gMousePos_Y;
|
||||
LenheartNewUI_CommonUi.OnMouseProc(Flag, gMousePos_X, gMousePos_Y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -252,15 +484,18 @@ class FiendwarHallMyPartyC extends LenheartNewUI_Windows {
|
|||
|
||||
//是否是我的攻坚队
|
||||
IsMyTeam = false;
|
||||
//是否是队长
|
||||
IsCaptain = false;
|
||||
|
||||
|
||||
//收到请求加入攻坚队包
|
||||
function JoinTeamCallBack(Chunk) {
|
||||
Sout("收到请求加入包 : \n\n\n %L", Chunk);
|
||||
// Sout("收到请求加入包 : \n\n\n %L", Chunk);
|
||||
local Jso = Json.Decode(Chunk);
|
||||
local win = LenheartNewUI_CreateWindow(FiendwarHallApplyJoinC, "超时空申请加入队伍窗口", 542, 348, 244, 240, 18);
|
||||
|
||||
local win = LenheartNewUI_CreateWindow(FiendwarHallApplyJoinC, "超时空申请加入队伍窗口", 542, 348, 257, 240, 18);
|
||||
win.Visible = true;
|
||||
local T = {
|
||||
Charc = Jso.charac, //角色对象
|
||||
Level = Jso.charac.PlayerLevel,
|
||||
Name = Jso.charac.PlayerName,
|
||||
Job = Jso.charac.PlayerJob,
|
||||
|
|
@ -277,42 +512,30 @@ class FiendwarHallMyPartyC extends LenheartNewUI_Windows {
|
|||
win.RequestJoinTeamArr.append(T);
|
||||
win.InitInfo();
|
||||
} else win.RequestJoinTeamArr.append(T);
|
||||
|
||||
print(win.RequestJoinTeamArr.len());
|
||||
}
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
// RegisterWidget();
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
|
||||
//测试数据
|
||||
// MembersList = [];
|
||||
// for (local i = 0; i< 8; i++) {
|
||||
// local T = {
|
||||
// TeamId = i + 1,
|
||||
// Level = "100",
|
||||
// Name = "玩家" + i,
|
||||
// JobName = "银月",
|
||||
// Job = i,
|
||||
// StkHasFlag = i % 2
|
||||
// EquVos = JobAniArr[i]
|
||||
// }
|
||||
// local TeamBuf = FiendwarHallMyPartyMemberC(T);
|
||||
// Childrens.append(TeamBuf);
|
||||
// MembersList.append(TeamBuf);
|
||||
// }
|
||||
|
||||
Pack_Control.rawset(20063006, JoinTeamCallBack.bindenv(this));
|
||||
}
|
||||
|
||||
function RegisterWidget() {
|
||||
//清楚老的按钮在刷新
|
||||
foreach(CIndex, Child in Childrens) {
|
||||
if (!(Child instanceof FiendwarHallMyPartyMemberC)) {
|
||||
Childrens.remove(CIndex);
|
||||
}
|
||||
}
|
||||
//关闭按钮
|
||||
local CloseButton = LenheartNewUI_BaseButton(336, 0, 11, 12, "interface/lenheartwindowcommon.img", 276);
|
||||
CloseButton.OnClick = function() {
|
||||
this.Visible = false;
|
||||
CloseWindow();
|
||||
}.bindenv(this);
|
||||
Childrens.append(CloseButton);
|
||||
|
||||
|
|
@ -373,8 +596,8 @@ class FiendwarHallMyPartyC extends LenheartNewUI_Windows {
|
|||
Childrens.append(StageButton);
|
||||
|
||||
|
||||
|
||||
//队伍编制按钮 //TODO 需要先知道自己是不是队长只有队长才可以编队
|
||||
if (IsCaptain) {
|
||||
//队伍编制按钮
|
||||
local PartyEditButton = LenheartNewUI_ButtonText(10, 268, 5, "队伍编制");
|
||||
PartyEditButton.SetTextOffset(-12, 1);
|
||||
PartyEditButton.OnClick = function() {
|
||||
|
|
@ -394,6 +617,7 @@ class FiendwarHallMyPartyC extends LenheartNewUI_Windows {
|
|||
FqButton1.State = 8;
|
||||
FqButton1.SetTextOffset(-12, 1);
|
||||
Childrens.append(FqButton1);
|
||||
}
|
||||
|
||||
//退出按钮
|
||||
local ExitButton = LenheartNewUI_ButtonText(220, 268, 5, "退出");
|
||||
|
|
@ -448,4 +672,25 @@ class FiendwarHallMyPartyC extends LenheartNewUI_Windows {
|
|||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
# override # "
|
||||
* @函数作用:
|
||||
* @参数 name
|
||||
* @返回值
|
||||
*/
|
||||
//鼠标左键弹起回调
|
||||
function OnMouseLbUp(MousePos_X, MousePos_Y) {
|
||||
foreach(Window in Childrens) {
|
||||
Window.OnMouseLbUp(MousePos_X, MousePos_Y);
|
||||
}
|
||||
LenheartNewUI_Windows.OnMouseLbUp(MousePos_X, MousePos_Y);
|
||||
//判断没有点到具体角色就隐藏
|
||||
if (!sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, X, Y + 80, Width, MembersList.len() * 21)) {
|
||||
//交互窗口需要隐藏
|
||||
local Each = LenheartNewUI_CreateWindow(FiendwarHallPlayerInteractiveC, "超时空玩家交互", X, Y, 100, 21, 0);
|
||||
Each.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1428,5 +1428,3 @@ function Ptst(obj) {
|
|||
RootTab["PtstObj"].Draw(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1039,8 +1039,8 @@ class Json {
|
|||
Str += ":";
|
||||
|
||||
if (typeof(Value) == "string") {
|
||||
print(Value.len());
|
||||
Sout("中文字符串為: %L",Value);
|
||||
// print(Value.len());
|
||||
// Sout("中文字符串為: %L", Value);
|
||||
Str += "\"";
|
||||
Str += Value;
|
||||
Str += "\"";
|
||||
|
|
@ -1064,8 +1064,7 @@ class Json {
|
|||
return Str;
|
||||
}
|
||||
|
||||
function Decode(Str)
|
||||
{
|
||||
function Decode(Str) {
|
||||
Str = L_sq_DecondeJson(Str);
|
||||
local Str = "local _M = " + Str + ";\n return _M;\n";
|
||||
local Func = compilestring(Str);
|
||||
|
|
|
|||
|
|
@ -4,15 +4,71 @@
|
|||
创建日期:2024-03-20 11:27
|
||||
文件用途:UI
|
||||
*/
|
||||
|
||||
//新窗口队列
|
||||
L_Windows_List <- [];
|
||||
|
||||
//如果根空间没有选定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);
|
||||
|
||||
//基础窗口类
|
||||
class LenheartNewUI_BaseWindow extends BasicsDrawTool {
|
||||
|
||||
//子控件
|
||||
Childrens = null;
|
||||
constructor() {
|
||||
//子控件
|
||||
// Childrens = [];
|
||||
}
|
||||
constructor() {}
|
||||
//鼠标事件回调
|
||||
function OnMouseProc(Flag, MousePos_X, MousePos_Y) {
|
||||
foreach(Window in Childrens) {
|
||||
|
|
@ -50,7 +106,6 @@ class LenheartNewUI_BaseWindow extends BasicsDrawTool {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
function Show(obj) {
|
||||
foreach(Window in Childrens) {
|
||||
Window.Show(obj);
|
||||
|
|
@ -64,9 +119,9 @@ class LenheartNewUI_BaseWindow extends BasicsDrawTool {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//窗口类
|
||||
class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
|
||||
//MyObjectId
|
||||
//窗口名称
|
||||
ObjectId = null;
|
||||
//可用性
|
||||
Visible = true;
|
||||
|
|
@ -92,10 +147,6 @@ class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
|
|||
//移动Flag
|
||||
MoveFlag = false;
|
||||
|
||||
YMouseSw = true;
|
||||
//焦点
|
||||
Focus = true;
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
ObjectId = gObjectId;
|
||||
//宽度
|
||||
|
|
@ -110,48 +161,42 @@ class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
|
|||
//Y坐标
|
||||
Y = gY;
|
||||
|
||||
Init();
|
||||
ResetFocus();
|
||||
|
||||
//调用原生方法
|
||||
LenheartNewUI_BaseWindow.constructor();
|
||||
}
|
||||
|
||||
//加入窗口队列 并且切换到最上层窗口
|
||||
function ResetFocus() {
|
||||
foreach(Index, WindowObj in L_Windows_List) {
|
||||
if (WindowObj.ObjectId == this.ObjectId) L_Windows_List.remove(Index);
|
||||
WindowObj.Focus = false;
|
||||
}
|
||||
this.Focus = true;
|
||||
L_Windows_List.append(this);
|
||||
//切换上层显示
|
||||
getroottable().WindowsShowABFlag <- true;
|
||||
}
|
||||
|
||||
//加入窗口队列
|
||||
function Init() {
|
||||
ResetFocus();
|
||||
//关闭窗口 -并没有销毁只是隐藏
|
||||
function CloseWindow() {
|
||||
this.Visible = false;
|
||||
if (L_sq_RAB(0x1B46886)) {
|
||||
L_sq_WAB(0x1B46886, 0);
|
||||
}
|
||||
|
||||
//设定鼠标逻辑
|
||||
function LockMouse(MousePos_X, MousePos_Y) {
|
||||
if (!Visible) return;
|
||||
if (sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, X, Y, Width, Height)) {
|
||||
IMouse.LockMouseClick();
|
||||
YMouseSw = false;
|
||||
L_sq_WA(0x1b46898, 1);
|
||||
IMouse.LockState <- true;
|
||||
} else {
|
||||
if (YMouseSw == false && sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, 0, 0, 800, 600) && !MoveFlag) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
YMouseSw = true;
|
||||
L_sq_WA(0x1b46898, 0);
|
||||
IMouse.LockState <- false;
|
||||
}
|
||||
//销毁窗口
|
||||
function DestroyWindow() {
|
||||
foreach(Index, WindowObj in L_Windows_List) {
|
||||
if (WindowObj.ObjectId == this.ObjectId) L_Windows_List.remove(Index);
|
||||
}
|
||||
if (L_sq_RAB(0x1B46886)) {
|
||||
L_sq_WAB(0x1B46886, 0);
|
||||
}
|
||||
L_sq_WA(0x1b46898, 0);
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
if (!Visible) return;
|
||||
// L_sq_DrawImg("interface2/yosin/tbjp.img", 4, X, Y + 1);
|
||||
|
||||
//调用原生方法
|
||||
LenheartNewUI_BaseWindow.Show(obj);
|
||||
if (DeBugMode) DeBug(obj);
|
||||
|
|
@ -165,8 +210,7 @@ class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
|
|||
//override
|
||||
function OnMouseProc(Flag, MousePos_X, MousePos_Y) {
|
||||
if (!Visible) return;
|
||||
//设定鼠标逻辑
|
||||
if (!MoveFlag) LockMouse(MousePos_X, MousePos_Y);
|
||||
//设定拖动逻辑
|
||||
if (Flag == 1) {
|
||||
if (MoveFlag) {
|
||||
//左键拖动
|
||||
|
|
@ -257,60 +301,58 @@ function LenheartNewUI_CreateWindow(ClassName, gObjectId, gX, gY, gWidth, gHeigh
|
|||
function CheackMouseInNewWindows(MousePos_X, MousePos_Y) {
|
||||
local Flag = false;
|
||||
foreach(Window in L_Windows_List) {
|
||||
if (!Window.Visible) continue;
|
||||
if (sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, Window.X, Window.Y, Window.Width, Window.Height)) {
|
||||
Flag = true;
|
||||
getroottable().WindowsHoverFlag <- true;
|
||||
return Flag;
|
||||
}
|
||||
}
|
||||
getroottable().WindowsHoverFlag <- false;
|
||||
return Flag;
|
||||
}
|
||||
|
||||
|
||||
//鼠标事件
|
||||
/*
|
||||
a1
|
||||
常规状态 200
|
||||
左键点击 201
|
||||
左键松开 202
|
||||
右键点击 204
|
||||
右键松开 205
|
||||
滚轮滚动事件 20a
|
||||
看a2 如果是ff880000 向下 如果是780000 向上
|
||||
中建按下没有事件
|
||||
|
||||
鼠标事件为200 并且a2 = 1 为左键拖动 a2=2为右键拖动 中建按下拖动a2 =10
|
||||
|
||||
a2=3的时候代表2个键一起按下 事件代表后按下的键*/
|
||||
|
||||
//如果根空间没有选定AB层的Flag 就新建一个 默认是false 渲染在下层
|
||||
if (!("WindowsShowABFlag" in getroottable())) {
|
||||
getroottable().WindowsShowABFlag <- false;
|
||||
//遍历是否悬停在原生窗口上
|
||||
function CheackMouseInOldWindows() {
|
||||
if (!NotOldWindowsMap.rawin(L_sq_RA(0x1A32950))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//设定鼠标逻辑
|
||||
function RunMouseLogic(MousePos_X, MousePos_Y) {
|
||||
//解锁鼠标 如果鼠标已处于锁定状态 并且没有悬停在任何窗口上 解锁鼠标
|
||||
if (L_sq_RAB(0x1B46886)) {
|
||||
if (!CheackMouseInNewWindows(MousePos_X, MousePos_Y)) L_sq_WAB(0x1B46886, 0);
|
||||
else if (CheackMouseInOldWindows() && !getroottable().WindowsShowABFlag) L_sq_WAB(0x1B46886, 0);
|
||||
}
|
||||
//锁定鼠标 如果鼠标处于未锁定状态 并且悬停在任意一个窗口上
|
||||
else if (!L_sq_RAB(0x1B46886) && CheackMouseInNewWindows(MousePos_X, MousePos_Y)) {
|
||||
//如果没有悬停任何原生窗口直接锁
|
||||
if (!CheackMouseInOldWindows()) {
|
||||
L_sq_WAB(0x1B46886, 1);
|
||||
}
|
||||
//如果有悬停原生窗口 就要判断AB层
|
||||
else {
|
||||
if (getroottable().WindowsShowABFlag) L_sq_WAB(0x1B46886, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function L_MouseCallBack(MouseState, MouseFlag, MousePos_X, MousePos_Y) {
|
||||
if (MouseState == 0x200) {
|
||||
//常规事件就要设定鼠标是否锁定逻辑
|
||||
RunMouseLogic(MousePos_X, MousePos_Y);
|
||||
}
|
||||
//如果渲染层级在下级 即A层 或者是 鼠标没有悬停在任何新窗口上时 执行判断 如果悬停在原生窗口 就解除鼠标锁定 如果点击 就改变渲染层级
|
||||
if (!getroottable().WindowsShowABFlag || !CheackMouseInNewWindows(MousePos_X, MousePos_Y)) {
|
||||
if (L_sq_RA(0x1A32950) != 92 && L_sq_RA(0x1A32950) != 2396
|
||||
// && L_sq_RA(0x1A32950) != 3877 //小地图
|
||||
// &&
|
||||
// L_sq_RA(0x1A32950) != 3878 //小地图
|
||||
// &&
|
||||
// L_sq_RA(0x1A32950) != 3873 //小地图
|
||||
// &&
|
||||
// L_sq_RA(0x1A32950) != 3874 //小地图
|
||||
) {
|
||||
if ("LockState" in IMouse) {
|
||||
if (IMouse.LockState) {
|
||||
IMouse.ReleaseMouseClick();
|
||||
IMouse.LockState <- false;
|
||||
}
|
||||
}
|
||||
if (CheackMouseInOldWindows()) {
|
||||
//如果点击了原生窗口 就把渲染队列改成下
|
||||
if (MouseState == 0x201) getroottable().WindowsShowABFlag <- false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//克隆一遍窗口列表
|
||||
local WindowListF = clone(L_Windows_List);
|
||||
WindowListF.reverse();
|
||||
|
|
@ -357,8 +399,11 @@ function L_MouseCallBack(MouseState, MouseFlag, MousePos_X, MousePos_Y) {
|
|||
}
|
||||
}
|
||||
|
||||
// if (!getroottable().rawin("L_Windows_List"))
|
||||
L_Windows_List <- [];
|
||||
function L_OpenOldWindowCallBack(WindowIndex) {
|
||||
print(WindowIndex);
|
||||
//将新窗口渲染队列改为下层
|
||||
getroottable().WindowsShowABFlag <- false;
|
||||
}
|
||||
|
||||
//窗口逻辑入口
|
||||
function L_WindowsLogic(obj) {
|
||||
|
|
@ -386,7 +431,6 @@ function L_WindowsLogic(obj) {
|
|||
if (KeyPressNB.isKeyPress(48, "AllLenheartWindows")) {
|
||||
foreach(Window in L_Windows_List) {
|
||||
Window.Visible = false;
|
||||
Window.YMouseSw = true;
|
||||
}
|
||||
L_sq_WA(0x1b46898, 0);
|
||||
IMouse.ReleaseMouseClick();
|
||||
|
|
@ -407,8 +451,6 @@ function L_DrawWindow_B() {
|
|||
|
||||
//B层只在上层渲染
|
||||
if (getroottable().WindowsShowABFlag) L_WindowsLogic(obj);
|
||||
//因为图层太高会盖掉鼠标 所以重新画一个
|
||||
L_sq_DrawImg("interface/newstyle/windows/cursor.img", 0, IMouse.GetXPos(), IMouse.GetYPos());
|
||||
}
|
||||
|
||||
class LenheartNewUI_CommonUi extends LenheartNewUI_BaseWindow {
|
||||
|
|
|
|||
Loading…
Reference in New Issue