滚动栏封装
This commit is contained in:
parent
1e45bf6958
commit
fc18097b7a
|
|
@ -14,18 +14,19 @@ class Yosin_ScrollBar extends Yosin_CommonUi {
|
|||
|
||||
//上按钮
|
||||
UpButton = null;
|
||||
//滚动按钮
|
||||
ScrollButton = null;
|
||||
//下按钮
|
||||
DownButton = null;
|
||||
|
||||
//Path
|
||||
Path = "sprite/interface/lenheartwindowcommon.img";
|
||||
|
||||
constructor(X, Y, H, gSize) {
|
||||
constructor(X, Y, H, S_H) {
|
||||
base.constructor(X, Y, 9, H > 26 ? H : 26);
|
||||
|
||||
Controller = {
|
||||
CurPos = 0,
|
||||
Size = gSize
|
||||
}
|
||||
|
||||
//上按钮
|
||||
|
|
@ -37,6 +38,9 @@ class Yosin_ScrollBar extends Yosin_CommonUi {
|
|||
AddUIChild(UpButton);
|
||||
|
||||
//滚动条
|
||||
ScrollButton = Yosin_DragButton(0, 13, 9, S_H, Path, 184, false, false);
|
||||
ScrollButton.SetMaxMoveValue(Height - 26);
|
||||
AddUIChild(ScrollButton);
|
||||
|
||||
//下按钮
|
||||
DownButton = Yosin_BaseButton(0, Height - 13, 9, 13, Path, 22);
|
||||
|
|
|
|||
|
|
@ -88,8 +88,7 @@ class _Select_Character_SettingBackground_Window extends Yosin_Window {
|
|||
base.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
SettingBackgroundButtonList = [];
|
||||
|
||||
// SetClipRect(-gWidth, 0, gWidth, gHeight + 20);
|
||||
// SetClipRect(0, 0, 1066, 600);
|
||||
SetClipRect(0, 0, gWidth, gHeight);
|
||||
// ShowBorder(true);
|
||||
// SetLayerOpacity(1);
|
||||
}
|
||||
|
|
@ -204,12 +203,8 @@ class _Select_Character_Window extends Yosin_Window {
|
|||
SettingButton.Addchild(LoginTextActor);
|
||||
|
||||
|
||||
// local TestButton = Yosin_ScrollBar(300, 200, 50, 100);
|
||||
// AddUIChild(TestButton);
|
||||
// local TestButton = Yosin_SplicingButton(200, 200, 77, 68, "sprite/interface/lenheartwindowcommon.img", 184, false, false);
|
||||
// TestButton.DownSimulateOffset = false;
|
||||
local TestButton = Yosin_DragButton(200, 200, 9, 120, "sprite/interface/lenheartwindowcommon.img", 184, false, false);
|
||||
// TestButton.SetScale(5.0, 5.0);
|
||||
local TestButton = Yosin_ScrollBar(500, 100, 150, 40);
|
||||
|
||||
AddUIChild(TestButton);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue