DOF/sqr/User/UI/Widget/Drag_Button.nut

33 lines
718 B
Plaintext

/*
文件名:Drag_Button.nut
路径:User/UI/Widget/Drag_Button.nut
创建日期:2024-12-14 09:40
文件用途:拖动按钮
*/
class Yosin_DragButton extends Yosin_CommonUi {
//按钮状态
State = 0;
Path = null;
Idx = null;
Sprite = null;
SpriteState = -1;
FrameList = null;
constructor(X, Y, W, H, Path, Idx) {
this.Path = Path;
this.Idx = Idx;
base.constructor(X, Y, W, H);
FrameList = [];
Sprite = CL_SpriteObject();
// Sprite.ShowBorder(true);
Addchild(Sprite);
for (local i = 0; i< 4; i++) {
local Sf = CL_SpriteFrameObject(this.Path, this.Idx + i);
FrameList.push(Sf);
}
}
}