66 lines
2.0 KiB
Plaintext
66 lines
2.0 KiB
Plaintext
|
|
/*
|
||
|
|
文件名:OutfitSystem_Component.nut
|
||
|
|
路径:Project/OutfitSystem/OutfitSystem_Component.nut
|
||
|
|
创建日期:2026-03-02 03:39
|
||
|
|
文件用途:
|
||
|
|
*/
|
||
|
|
class OutfitSystemC_Button extends LenheartNewUI_CommonUi {
|
||
|
|
State = 0;
|
||
|
|
BaseIdx = 29;
|
||
|
|
DWidth = null;
|
||
|
|
Img = Rindro_Image("interface2/buffswitching/buffswitchingp.img");
|
||
|
|
Idx = 172;
|
||
|
|
FillWidth = 2;
|
||
|
|
FirstWidth = 11;
|
||
|
|
|
||
|
|
|
||
|
|
constructor(X, Y, W, gIdx) {
|
||
|
|
this.DWidth = W;
|
||
|
|
this.Idx = gIdx;
|
||
|
|
LenheartNewUI_CommonUi.constructor(X, Y, W + 11 * 2, 13);
|
||
|
|
}
|
||
|
|
|
||
|
|
function Show(obj) {
|
||
|
|
//不可用
|
||
|
|
if (State == 8) {
|
||
|
|
// L_sq_DrawButton(X, Y + 1, this.DWidth, Path, Idx + 9, FillWidth, FirstWidth);
|
||
|
|
} else {
|
||
|
|
//按下
|
||
|
|
if (isLBDown) {
|
||
|
|
// L_sq_DrawButton(X, Y + 1, this.DWidth, Path, Idx + 3, FillWidth, FirstWidth);
|
||
|
|
Img.DrawPng(this.Idx, X, Y + 1);
|
||
|
|
L_sq_SetDrawImgModel(2, 0);
|
||
|
|
L_sq_DrawButton(X, Y + 1, this.DWidth, "interface/lenheartwindowcommon.img", 258, FillWidth, FirstWidth);
|
||
|
|
L_sq_ReleaseDrawImgModel();
|
||
|
|
}
|
||
|
|
//悬停
|
||
|
|
else if (isInRect) {
|
||
|
|
// L_sq_DrawButton(X, Y, this.DWidth, Path, Idx + 3, FillWidth, FirstWidth);
|
||
|
|
Img.DrawPng(this.Idx, X, Y);
|
||
|
|
L_sq_SetDrawImgModel(2, 0);
|
||
|
|
L_sq_DrawButton(X, Y, this.DWidth, "interface/lenheartwindowcommon.img", 258, FillWidth, FirstWidth);
|
||
|
|
L_sq_ReleaseDrawImgModel();
|
||
|
|
}
|
||
|
|
//普通
|
||
|
|
else {
|
||
|
|
Img.DrawPng(this.Idx, X, Y);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
//鼠标左键弹起回调
|
||
|
|
function OnMouseLbUp(MousePos_X, MousePos_Y) {
|
||
|
|
if (isLBDown) {
|
||
|
|
if (OnClickEx) OnClickEx(this, this.Idx);
|
||
|
|
}
|
||
|
|
isLBDown = false;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
L_Windows_List <- [];
|
||
|
|
getroottable().rawdelete("LenheartPluginsInitFlag");
|
||
|
|
getroottable().rawdelete("EventList_Obj")
|
||
|
|
getroottable().rawdelete("OutfitSystem_Obj");
|
||
|
|
getroottable().rawdelete("L_Each_Obj");
|