/* 文件名:Scroll_Bar.nut 路径:User/UI/Widget/Scroll_Bar.nut 创建日期:2024-12-13 23:17 文件用途: */ //基础按钮 class Yosin_ScrollBar extends Yosin_CommonUi { //控制器 Controller = null; //是否焦点 IsFocus = false; //上按钮 UpButton = null; //下按钮 DownButton = null; //Path Path = "sprite/interface/lenheartwindowcommon.img"; constructor(X, Y, H, gSize) { base.constructor(X, Y, 9, H > 26 ? H : 26); Controller = { CurPos = 0, Size = gSize } //上按钮 UpButton = Yosin_BaseButton(0, 0, 9, 13, Path, 16); //点击事件回调 UpButton.OnClick = function(Button) { }.bindenv(this); AddUIChild(UpButton); //滚动条 //下按钮 DownButton = Yosin_BaseButton(0, Height - 13, 9, 13, Path, 22); //点击事件回调 DownButton.OnClick = function(Button) { }.bindenv(this); AddUIChild(DownButton); } function Proc(Dt) { base.Proc(Dt); } }