修复装备融合BUG 装备继承半程进度

This commit is contained in:
2025-12-17 10:48:30 +08:00
6 changed files with 300 additions and 36 deletions

View File

@@ -342,6 +342,26 @@ class LenheartNewUI_Windows extends LenheartNewUI_BaseWindow {
}
}
}
//绘制道具带道具信息
function DrawItemObject(X, Y, Object) {
if (!Object) return;
L_Sq_DrawItem(X, Y, Object.ItemId, Object.Count, 0, 0, 0);
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, 30, 30)) {
//打开道具信息窗口
if (!ItemInfoDrawS) {
ItemInfoDrawS = L_Sq_CallFunc(0xE6E070, "int", FFI_THISCALL, ["int", "int", "int", "int"], L_sq_RA(0x1A5FB20), 275, Object.ItemAddress, 41);
//校准道具信息窗口位置
L_Sq_CallFunc(0xF3B3B0, "int", FFI_THISCALL, ["int", "int", "int", "int", "int"], ItemInfoDrawS, IMouse.GetXPos(), IMouse.GetYPos(), 28, 28);
//我自己UI打开的道具信息窗口需要把渲染队列改为下层 以显示我打开的道具
getroottable().WindowsShowABFlag <- false;
}
} else {
if (ItemInfoDrawS) {
L_Sq_CallFunc(0xE6B2B0, "int", FFI_THISCALL, ["int", "int", "int", "char"], 0x1ADE090, 0x113, 0xFFFFFFFF, 0x0);
ItemInfoDrawS = null;
}
}
}
//绘制标题
function DrawWindowTitle(Width) {
@@ -1477,4 +1497,83 @@ class Yosin_ScrollBar {
ScrollButton.Reset();
}
}
}
class LenheartNewUI_ItemSlot extends LenheartNewUI_CommonUi {
ItemId = null;
ItemCount = null;
ItemObject = null;
ItemInfoWindow = null;
//禁止点击
NoClick = false;
RemoveCallBack = null;
constructor(X, Y) {
LenheartNewUI_CommonUi.constructor(X, Y, 30, 30);
}
function Show(obj) {
if (ItemObject) {
L_Sq_DrawItem(X, Y, ItemId, ItemCount, 0, 0, 0);
if (isInRect) {
//打开道具信息窗口
if (!ItemInfoWindow) {
ItemInfoWindow = L_Sq_CallFunc(0xE6E070, "int", FFI_THISCALL, ["int", "int", "int", "int"], L_sq_RA(0x1A5FB20), 275, ItemObject.C_Object, 41);
//校准道具信息窗口位置
L_Sq_CallFunc(0xF3B3B0, "int", FFI_THISCALL, ["int", "int", "int", "int", "int"], ItemInfoWindow, IMouse.GetXPos(), IMouse.GetYPos(), 28, 28);
//我自己UI打开的道具信息窗口需要把渲染队列改为下层 以显示我打开的道具
getroottable().WindowsShowABFlag <- false;
}
} else {
if (ItemInfoWindow) {
L_Sq_CallFunc(0xE6B2B0, "int", FFI_THISCALL, ["int", "int", "int", "char"], 0x1ADE090, 0x113, 0xFFFFFFFF, 0x0);
ItemInfoWindow = null;
}
}
}
//悬停光效
if (isInRect) {
L_sq_SetDrawImgModel(2, 0);
Rindro_Image_GlobalMap["lenheartui"].DrawPng(353, X - 2, Y - 2);
L_sq_ReleaseDrawImgModel();
}
}
function SetItem(item) {
ItemObject = item;
ItemId = item.GetIndex();
ItemCount = 1;
}
function RemoveItem()
{
ItemObject = null;
ItemId = null;
ItemCount = null;
}
function SetRemoveCallBack(Func){
RemoveCallBack = Func;
}
//鼠标右键按下回调
function OnMouseRbDown(MousePos_X, MousePos_Y) {
if(NoClick)return;
if (isInRect) {
if(ItemObject){
ItemObject = null;
ItemId = null;
ItemCount = null;
}
if (ItemInfoWindow) {
L_Sq_CallFunc(0xE6B2B0, "int", FFI_THISCALL, ["int", "int", "int", "char"], 0x1ADE090, 0x113, 0xFFFFFFFF, 0x0);
ItemInfoWindow = null;
}
if(RemoveCallBack)RemoveCallBack(this);
}
}
}