feat(OutfitSystem): 添加悬停说明功能并移除过时代码注释

添加InstructionsIsHover变量控制说明提示的显示
新增TopShow方法显示悬停时的操作说明
移除过时的装备偏移注释代码
This commit is contained in:
Lenheart 2026-03-04 06:47:04 +08:00
parent 16ad8ac997
commit 9902eaa818
1 changed files with 25 additions and 30 deletions

View File

@ -14,34 +14,6 @@ class OutfitSystemC extends LenheartNewUI_Windows {
//是否可见
Visible = false;
/*
武器偏移 "3038"
称号偏移 "303C"
上衣偏移 "3040"
头肩偏移 "3044"
裤子偏移 "3048"
鞋子偏移 "304C"
腰带偏移 "3050"
项链偏移 "3054"
手镯偏移 "3058"
戒指偏移 "305C"
左曹偏移 "3060"
右曹偏移 "3064"
时装帽子偏移 "3008"
时装头部偏移 "300C"
时装脸部偏移 "3010"
时装上衣偏移 "3014"
时装下衣偏移 "3018"
时装鞋子偏移 "301C" 原来3020正确的是301C
时装胸部偏移 "3020"
时装腰带偏移 "3024"
时装皮肤偏移 "3028"
时装光圈偏移 "302C"
时装武器偏移 "3030"
宠物偏移 "3068"
*/
Img = Rindro_Image("interface2/buffswitching/buffswitching.img");
ItemSlotPos = [
@ -76,6 +48,9 @@ class OutfitSystemC extends LenheartNewUI_Windows {
//当前选中
CurrentSelect = null;
//说明是否悬停
InstructionsIsHover = true;
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
Childrens = [];
@ -206,6 +181,8 @@ class OutfitSystemC extends LenheartNewUI_Windows {
L_sq_DrawCode("时装槽位", X + 188, Y + 135, sq_RGBA(150, 150, 150, 255), 0, 1);
L_sq_DrawCode("宠物", X + 308, Y + 135, sq_RGBA(150, 150, 150, 255), 0, 1);
Rindro_Image_GlobalMap["lenheartui"].DrawPng(469 + (InstructionsIsHover ? 1 : 0), X + 335, Y + 266);
if (CurrentSelect != null) {
Rindro_Image_GlobalMap["lenheartui"].DrawPng(425, X + 12 + (CurrentSelect % 10) * 30, Y + 38 + (CurrentSelect / 10) * 30);
}
@ -216,9 +193,29 @@ class OutfitSystemC extends LenheartNewUI_Windows {
LenheartNewUI_Windows.Show(obj);
}
function TopShow(obj)
{
if(InstructionsIsHover){
local XOffset = 8;
local YOffset = 192;
DrawNineBox(X + XOffset, Y + YOffset, 326, 80, "interface/lenheartwindowcommon.img", 213);
L_sq_DrawCode("①选择对应的标签以配置换装配置", X + XOffset + 8, Y + YOffset + 8, sq_RGBA(230, 200, 155, 255), 0, 1);
L_sq_DrawCode("②点击记录可以保存当前穿戴的装备,点击重置可以清除配置", X + XOffset + 8, Y + YOffset + 8 + 16, sq_RGBA(230, 200, 155, 255), 0, 1);
L_sq_DrawCode("③在对话窗口输入//HZ 1 可以换装1号标签的配置", X + XOffset + 8, Y + YOffset + 8 + 32, sq_RGBA(230, 200, 155, 255), 0, 1);
L_sq_DrawCode("④设置快捷喊话可以方便一键切换", X + XOffset + 8, Y + YOffset + 8 + 48, sq_RGBA(230, 200, 155, 255), 0, 1);
}
}
//逻辑入口
function Proc(obj) {
LenheartNewUI_Windows.SyncPos(X, Y);
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X + 335, Y + 266, 16, 16)) {
InstructionsIsHover = true;
} else {
InstructionsIsHover = false;
}
}
//读取自身装备并显示在装备槽位
@ -270,7 +267,6 @@ class OutfitSystemC extends LenheartNewUI_Windows {
}
L_Windows_List <- [];
getroottable().rawdelete("LenheartPluginsInitFlag");
getroottable().rawdelete("EventList_Obj")
@ -278,7 +274,6 @@ getroottable().rawdelete("OutfitSystem_Obj");
getroottable().rawdelete("L_Each_Obj");
function Lenheart_OutfitSystem_Fun(obj) {
local RootTab = getroottable();
if (!RootTab.rawin("OutfitSystem_Obj")) {