33 lines
762 B
Plaintext
33 lines
762 B
Plaintext
/*
|
|
文件名:Drag_Button.nut
|
|
路径:User/UI/Widget/Drag_Button.nut
|
|
创建日期:2024-12-14 09:40
|
|
文件用途:拖动按钮
|
|
*/
|
|
class Yosin_DragButton extends Yosin_CommonUi {
|
|
//路径
|
|
Path = "";
|
|
//索引
|
|
Idx = 0;
|
|
|
|
//按钮
|
|
Button = null;
|
|
|
|
|
|
constructor(X, Y, W, H, Path, Idx, Direction = true, UnavailableFlag = true) {
|
|
this.Path = Path;
|
|
this.Idx = Idx;
|
|
base.constructor(X, Y, W, H);
|
|
|
|
Button = Yosin_SplicingButton(0, 0, W, H, Path, Idx, Direction, UnavailableFlag);
|
|
Button.DownSimulateOffset = false;
|
|
AddUIChild(Button);
|
|
}
|
|
|
|
//override
|
|
//鼠标左键按下回调
|
|
function OnMouseLbDown(MousePos_X, MousePos_Y) {
|
|
base.OnMouseLbDown(MousePos_X, MousePos_Y);
|
|
|
|
}
|
|
} |