11111
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
创建日期:2024-08-27 12:13
|
||||
文件用途:个人信息属性面板
|
||||
*/
|
||||
return;
|
||||
class Lenheart_Character_Info_ClassC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
@@ -372,6 +373,7 @@ DrawCodeCallBackFunc.Rindro_Character_Info <- function(Args) {
|
||||
|
||||
//个人信息窗口逻辑
|
||||
function L_Character_Info_Window(WindowObject) {
|
||||
return false;
|
||||
// //返回Flase 原逻辑继续执行 返回Tue 原逻辑终止执行
|
||||
// local Flag = false;
|
||||
// if (getroottable().rawin("Lenheart_Character_Info_Class_Obj")) {
|
||||
@@ -487,6 +489,7 @@ class Lenheart_Other_Character_Info_ClassC extends Lenheart_Character_Info_Class
|
||||
|
||||
//他人信息窗口逻辑
|
||||
function L_Other_Character_Info_Window(WindowObject) {
|
||||
return false;
|
||||
//返回Flase 原逻辑继续执行 返回Tue 原逻辑终止执行
|
||||
local Flag = false;
|
||||
if (getroottable().rawin("Lenheart_Other_Character_Info_Class_Obj")) {
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
*/
|
||||
class Rindro_Cursor {
|
||||
|
||||
//强制锁
|
||||
ForceLockState = false;
|
||||
|
||||
|
||||
//是否启用
|
||||
UseState = 0;
|
||||
|
||||
TypeState = 0;
|
||||
|
||||
@@ -238,13 +238,181 @@ function Lenheart_Each_Fun(obj) {
|
||||
getroottable()["LenheartFuncTab"].rawset("Lenheart_EachN", Lenheart_Each_Fun);
|
||||
|
||||
|
||||
// Rindro_Haker.LoadHook(0x10041D0, ["int", "int", "int"],
|
||||
// function(args) {
|
||||
// if (getroottable().rawin("L_Each_Obj")) {
|
||||
// getroottable()["L_Each_Obj"].BottomShow();
|
||||
// }
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
// return null;
|
||||
// });
|
||||
|
||||
|
||||
|
||||
class Lenheart_PlayerEachC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
|
||||
//不是窗口
|
||||
NoWindow = true;
|
||||
|
||||
//是否可见
|
||||
// Visible = false;
|
||||
|
||||
Info = null;
|
||||
Basic = null;
|
||||
|
||||
//当前交互角色姓名
|
||||
PlayerEach_Name = null;
|
||||
PlayerEach_Flag = false;
|
||||
PlayerEach_ButtonMap = null;
|
||||
|
||||
//通用按钮
|
||||
PlayerEach_CommonButtonMap = null;
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
PlayerEach_ButtonMap = {};
|
||||
PlayerEach_CommonButtonMap = {};
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
|
||||
}
|
||||
|
||||
function RegisterWidget() {}
|
||||
|
||||
function Show(obj) {}
|
||||
|
||||
function TopShow(obj) {}
|
||||
|
||||
function DrawMain(obj) {}
|
||||
|
||||
function MySelfShow() {
|
||||
if (PlayerEach_Name) {
|
||||
local obj = sq_getMyCharacter();
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//初始化NPC按钮
|
||||
function InitNpcButton() {
|
||||
Childrens = [];
|
||||
if (PlayerEach_ButtonMap.rawin(PlayerEach_Name)) {
|
||||
foreach(Func in PlayerEach_ButtonMap[PlayerEach_Name]) {
|
||||
Func(this);
|
||||
}
|
||||
}
|
||||
foreach(Func in PlayerEach_CommonButtonMap) {
|
||||
Func(this);
|
||||
}
|
||||
this.Visible = true;
|
||||
}
|
||||
|
||||
function AddEachForCommon(Index, Func) {
|
||||
PlayerEach_CommonButtonMap.rawset(Index, Func);
|
||||
}
|
||||
|
||||
function RemoveEachForCommon(Index) {
|
||||
PlayerEach_CommonButtonMap.rawdelete(Index);
|
||||
}
|
||||
|
||||
function AddEachForPlayerName(Index, Func) {
|
||||
if (PlayerEach_ButtonMap.rawin(Index)) {
|
||||
PlayerEach_ButtonMap[Index].append(Func);
|
||||
return;
|
||||
}
|
||||
PlayerEach_ButtonMap.rawset(Index, [Func]);
|
||||
}
|
||||
|
||||
function RemoveEachForPlayerName(Index) {
|
||||
PlayerEach_ButtonMap.rawdelete(Index);
|
||||
}
|
||||
|
||||
function CloseAllEach() {
|
||||
if (Basic) {
|
||||
L_sq_WA(L_sq_P2I(Basic) + 0xC, 256);
|
||||
}
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
|
||||
local Str = L_Sq_GetPlayerEachName();
|
||||
if (Str.len() > 0) {
|
||||
PlayerEach_Name = Str;
|
||||
}
|
||||
if (PlayerEach_Name) {
|
||||
if (!PlayerEach_Flag) {
|
||||
PlayerEach_Flag = true;
|
||||
InitNpcButton();
|
||||
}
|
||||
} else {
|
||||
PlayerEach_Flag = false;
|
||||
}
|
||||
}
|
||||
|
||||
//override
|
||||
//鼠标左键弹起回调
|
||||
function OnMouseLbUp(MousePos_X, MousePos_Y) {
|
||||
LenheartNewUI_Windows.OnMouseLbUp(MousePos_X, MousePos_Y);
|
||||
}
|
||||
|
||||
function SelfSyncPos(gInfo) {
|
||||
//读取交互坐标数据
|
||||
Info = gInfo;
|
||||
Basic = gInfo.BasicAdd;
|
||||
|
||||
X = Info.X;
|
||||
Y = Info.Y + (21 * Info.Count);
|
||||
//宽度
|
||||
Width = 100;
|
||||
//高度
|
||||
Height = (21 * Childrens.len());
|
||||
//同步子对象坐标
|
||||
foreach(pos, winobj in Childrens) {
|
||||
winobj.X = Info.X;
|
||||
winobj.Y = Info.Y + (21 * (Info.Count + pos));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RindroPlayerEachDrawFlag <- false;
|
||||
RindroPlayerEachDrawCountBuffer <- 0;
|
||||
RindroPlayerEachDrawCount <- 0;
|
||||
Rindro_Haker.LoadHook(0x10002A0, ["pointer", "int", "int"],
|
||||
function(args) {
|
||||
if (L_Sq_GetPlayerEachName().len() <= 0) return;
|
||||
local Xpos = L_sq_RA(L_sq_P2I(args[0]) + 0x14);
|
||||
local Ypos = L_sq_RA(L_sq_P2I(args[0]) + 0x18);
|
||||
|
||||
if (!RindroPlayerEachDrawFlag) {
|
||||
local RootTab = getroottable();
|
||||
RindroPlayerEachDrawFlag = true;
|
||||
if (RootTab.rawin("L_PlayerEach_Obj")) {
|
||||
RootTab["L_PlayerEach_Obj"].SelfSyncPos({
|
||||
X = Xpos,
|
||||
Y = Ypos,
|
||||
Count = RindroPlayerEachDrawCount,
|
||||
BasicAdd = args[0]
|
||||
});
|
||||
RootTab["L_PlayerEach_Obj"].MySelfShow();
|
||||
}
|
||||
}
|
||||
RindroPlayerEachDrawCountBuffer++;
|
||||
// print(args[0]);
|
||||
return null;
|
||||
|
||||
},
|
||||
function(args) {
|
||||
return null;
|
||||
});
|
||||
|
||||
|
||||
function Lenheart_PlayerEach_Fun(obj) {
|
||||
local RootTab = getroottable();
|
||||
RindroPlayerEachDrawFlag = false;
|
||||
RindroPlayerEachDrawCount = RindroPlayerEachDrawCountBuffer;
|
||||
RindroPlayerEachDrawCountBuffer = 0;
|
||||
if (!RootTab.rawin("L_PlayerEach_Obj")) {
|
||||
RootTab.rawset("L_PlayerEach_Obj", LenheartNewUI_CreateWindow(Lenheart_PlayerEachC, "玩家与玩家交互界面窗口", 0, 0, 0, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
getroottable()["LenheartFuncTab"].rawset("Lenheart_PlayerEachN", Lenheart_PlayerEach_Fun);
|
||||
@@ -88,6 +88,9 @@ class Rindro_Event extends LenheartNewUI_Windows {
|
||||
//是否可见
|
||||
Visible = true;
|
||||
|
||||
//主要Button
|
||||
MainButton = null;
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
@@ -127,13 +130,17 @@ class Rindro_Event extends LenheartNewUI_Windows {
|
||||
|
||||
function TopShow(obj) {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, 20, 20)) {
|
||||
L_sq_DrawImg("interface2/yosin/eventsystem.img", 0, X - 7, Y - 24);
|
||||
local Len = ObjectId.len() / 3;
|
||||
for (local i = 0; i< Len; i++) {
|
||||
L_sq_DrawImg("interface2/yosin/eventsystem.img", 1, X - 2 + (15 * i), Y - 24);
|
||||
local XposOffset = 0;
|
||||
local Len = LenheartTextClass.GetStringLength(MainButton.ShowName);
|
||||
local Count = ((Len - 10) / 15) + 1;
|
||||
XposOffset = (-(10 + Count * 15) / 2) + 10;
|
||||
|
||||
L_sq_DrawImg("interface2/yosin/eventsystem.img", 0, X + XposOffset, Y - 24);
|
||||
for (local i = 0; i< Count; i++) {
|
||||
L_sq_DrawImg("interface2/yosin/eventsystem.img", 1, X + XposOffset + 5 + (15 * i), Y - 24);
|
||||
}
|
||||
L_sq_DrawImg("interface2/yosin/eventsystem.img", 2, X - 2 + (15 * Len - 1), Y - 24);
|
||||
L_sq_DrawCode(ObjectId, X + 5, Y - 17, sq_RGBA(255, 255, 255, 250), 0, 1);
|
||||
L_sq_DrawImg("interface2/yosin/eventsystem.img", 2, X + XposOffset + 5 + (15 * Count), Y - 24);
|
||||
L_sq_DrawCode(MainButton.ShowName, X - Len / 2 + 12, Y - 17, sq_RGBA(255, 255, 255, 250), 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,6 +165,7 @@ class Rindro_EventList {
|
||||
|
||||
//活动数组
|
||||
Events = null;
|
||||
EventsMap = null;
|
||||
|
||||
function YosinEventIconInfoCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
@@ -175,12 +183,14 @@ class Rindro_EventList {
|
||||
constructor() {
|
||||
|
||||
Events = [];
|
||||
EventsMap = {};
|
||||
Pack_Control.rawset(30002, YosinEventIconInfoCallBack.bindenv(this));
|
||||
|
||||
}
|
||||
|
||||
//添加活动
|
||||
function AddEvent(Name, Idx, WindowObject, ...) {
|
||||
if (EventsMap.rawin(Name)) return EventsMap.rawget(Name);
|
||||
local Window = LenheartNewUI_CreateWindow(Rindro_Event, Name, 0, 0, 20, 20, 0)
|
||||
local Flag = Events.len();
|
||||
local ImgPath = "interface2/yosin/eventsystemlist.img";
|
||||
@@ -193,7 +203,10 @@ class Rindro_EventList {
|
||||
}.bindenv(this);
|
||||
Window.AddChild(ButtonBuf);
|
||||
Window.PosIdx = Events.len();
|
||||
Window.MainButton = ButtonBuf;
|
||||
Events.append(Window);
|
||||
EventsMap.rawset(Name, Window);
|
||||
return Window;
|
||||
}
|
||||
|
||||
//检测是否悬停活动图标
|
||||
|
||||
@@ -21,12 +21,13 @@ class R_Mouse {
|
||||
}
|
||||
//锁定鼠标
|
||||
function Lock() {
|
||||
|
||||
_Rindro_Cusor_.UseState = 1;
|
||||
L_sq_WAB(0x1B46886, 1);
|
||||
//技能描述窗口
|
||||
Sq_Memory_WriteByteArr(L_sq_I2P(0x4CC47E), [0xE9, 0xA0, 0x00, 0x00, 0x00, 0x90]);
|
||||
//物品描述窗口
|
||||
Sq_Memory_WriteByteArr(L_sq_I2P(0xF63DDA), [0x90, 0x90, 0x90, 0x90, 0x90, 0x90]);
|
||||
// Sq_Memory_WriteByteArr(L_sq_I2P(0xF63DDA), [0x90, 0x90, 0x90, 0x90, 0x90, 0x90]);
|
||||
//buff信息描述窗口
|
||||
Sq_Memory_WriteByteArr(L_sq_I2P(0x4BF532), [0x90, 0x90, 0x90, 0x90]);
|
||||
//原生商城 个人信息等按钮的悬停
|
||||
@@ -36,10 +37,11 @@ class R_Mouse {
|
||||
}
|
||||
//解锁鼠标
|
||||
function UnLock() {
|
||||
|
||||
_Rindro_Cusor_.UseState = 0;
|
||||
L_sq_WAB(0x1B46886, 0);
|
||||
Sq_Memory_WriteByteArr(L_sq_I2P(0x4CC47E), [0x39, 0x05, 0xE0, 0xF6, 0xA3, 0x01]);
|
||||
Sq_Memory_WriteByteArr(L_sq_I2P(0xF63DDA), [0x56, 0xE8, 0x10, 0xFE, 0xFF, 0xFF]);
|
||||
// Sq_Memory_WriteByteArr(L_sq_I2P(0xF63DDA), [0x56, 0xE8, 0x10, 0xFE, 0xFF, 0xFF]);
|
||||
Sq_Memory_WriteByteArr(L_sq_I2P(0x4BF532), [0x75, 0x07, 0x32, 0xC0]);
|
||||
L_sq_WAB(0x4C4690, 0x55);
|
||||
L_sq_WAB(0x11C6510, 0x55);
|
||||
@@ -51,6 +53,7 @@ class R_Mouse {
|
||||
}
|
||||
//设置鼠标工作类型
|
||||
function SetType(Type) {
|
||||
|
||||
_Rindro_Cusor_.TypeState = Type;
|
||||
// L_sq_WAB(0x1b46898, Type);
|
||||
}
|
||||
@@ -61,6 +64,7 @@ class R_Mouse {
|
||||
}
|
||||
//鼠标0状态设置是否按下
|
||||
function SetBaseState(Flag) {
|
||||
|
||||
_Rindro_Cusor_.SubState = Flag;
|
||||
// return L_sq_WAB(0x1B46874, Flag);
|
||||
}
|
||||
@@ -145,6 +149,15 @@ class LenheartNewUI_BaseWindow extends Rindro_BaseToolClass {
|
||||
Window.SyncPos(X, Y);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @函数作用: 添加子对象
|
||||
* @参数 name
|
||||
*/
|
||||
function AddChild(gChild) {
|
||||
this.Childrens.append(gChild);
|
||||
gChild.Parent = this;
|
||||
}
|
||||
}
|
||||
|
||||
//游戏窗口类
|
||||
@@ -473,18 +486,17 @@ function CheackMouseInOldWindows() {
|
||||
local Flag = L_sq_RA(WindowAddress);
|
||||
foreach(value in OldBaseWindowArr) {
|
||||
if (Flag == value) {
|
||||
// if ((L_sq_RA(WindowAddress + 0x14) == 0 && L_sq_RA(WindowAddress + 0x18) == 0) || Flag == 0x184D0C4) {
|
||||
// print(false);
|
||||
|
||||
// }
|
||||
|
||||
//空地
|
||||
if (Flag == 0x184D0C4 || Flag == 0x0184CF6C) {
|
||||
//都为0的时候城镇背景 508是血槽那一块的逻辑 坐标Y是508
|
||||
if ((L_sq_RA(WindowAddress + 0x14) == 0 && (L_sq_RA(WindowAddress + 0x18) == 0 || L_sq_RA(WindowAddress + 0x18) == 508))) {
|
||||
return false;
|
||||
}
|
||||
} else return false;
|
||||
} else {
|
||||
//原生窗口里的按钮
|
||||
if(Flag == 0x184D174)return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -547,7 +559,8 @@ function L_MouseCallBack(MouseState, MouseFlag, MousePos_X, MousePos_Y) {
|
||||
// }
|
||||
if (MouseState == 0x200) {
|
||||
//常规事件就要设定鼠标是否锁定逻辑
|
||||
RunMouseLogic(MousePos_X, MousePos_Y);
|
||||
if (_Rindro_Cusor_.ForceLockState == false)
|
||||
RunMouseLogic(MousePos_X, MousePos_Y);
|
||||
}
|
||||
|
||||
//判断是否悬停活动图标 没悬停在老窗口上 没在选图界面
|
||||
@@ -615,7 +628,8 @@ function L_MouseCallBack(MouseState, MouseFlag, MousePos_X, MousePos_Y) {
|
||||
//打开原生窗口回调
|
||||
function L_OpenOldWindowCallBack(WindowIndex) {
|
||||
//将新窗口渲染队列改为下层 抵消窗口 Esc窗口 登录可能显示的任务窗口
|
||||
if (WindowIndex != 170 && WindowIndex != 176 && WindowIndex != 276 && WindowIndex != 275 && WindowIndex != 278 && WindowIndex != 283 && WindowIndex != 36) {
|
||||
if (WindowIndex != 170 && WindowIndex != 176 && WindowIndex != 276 && WindowIndex != 275 && WindowIndex != 278 && WindowIndex != 279 && WindowIndex != 283 && WindowIndex != 36) {
|
||||
|
||||
getroottable().WindowsShowABFlag <- false;
|
||||
}
|
||||
}
|
||||
@@ -865,6 +879,48 @@ class LenheartNewUI_Button extends LenheartNewUI_CommonUi {
|
||||
}
|
||||
}
|
||||
|
||||
class LenheartNewUI_VerticalButton extends LenheartNewUI_CommonUi {
|
||||
State = 0;
|
||||
BaseIdx = 29;
|
||||
DHeight = null; // 改为高度
|
||||
Path = "interface/lenheartwindowcommon.img";
|
||||
Idx = 172;
|
||||
FillHeight = 2; // 改为填充高度
|
||||
FirstHeight = 28; // 改为首节高度
|
||||
Width = 24; // 固定宽度,垂直按钮宽度通常是固定的
|
||||
|
||||
constructor(X, Y, H) {
|
||||
this.DHeight = H;
|
||||
LenheartNewUI_CommonUi.constructor(X, Y, 24, H + 28 * 2); // 宽度固定,高度动态
|
||||
}
|
||||
|
||||
function SetFrame(gPath, gIdx) {
|
||||
if (gPath) Path = gPath;
|
||||
Idx = gIdx;
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
//不可用
|
||||
if (State == 8) {
|
||||
L_sq_Draw3Image_Vertical(X + 1, Y, this.Width, this.DHeight, Path, Idx + 9, FillHeight, FirstHeight);
|
||||
} else {
|
||||
//按下
|
||||
if (isLBDown) {
|
||||
L_sq_Draw3Image_Vertical(X + 1, Y, this.Width, this.DHeight, Path, Idx + 3, FillHeight, FirstHeight);
|
||||
}
|
||||
//悬停
|
||||
else if (isInRect) {
|
||||
L_sq_Draw3Image_Vertical(X, Y, this.Width, this.DHeight, Path, Idx + 3, FillHeight, FirstHeight);
|
||||
}
|
||||
//普通
|
||||
else {
|
||||
L_sq_Draw3Image_Vertical(X, Y, this.Width, this.DHeight, Path, Idx, FillHeight, FirstHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class LenheartNewUI_ButtonText extends LenheartNewUI_Button {
|
||||
TextStr = null;
|
||||
TextX = null;
|
||||
|
||||
Reference in New Issue
Block a user