ok it works just gotta fix isOnScreen

This commit is contained in:
lunarcleint
2024-06-09 02:40:37 -07:00
parent 8921e3ff4c
commit a84dac9884
2 changed files with 22 additions and 9 deletions
+20 -9
View File
@@ -245,15 +245,26 @@ class UISliceSprite extends UISprite {
private inline function __genUVs() {
uvtData.length = 0;
__genSliceUV(topleft);
__genSliceUV(top);
__genSliceUV(topright);
__genSliceUV(middleleft);
__genSliceUV(middle);
__genSliceUV(middleright);
__genSliceUV(bottomleft);
__genSliceUV(bottom);
__genSliceUV(bottomright);
if (drawTop) {
__genSliceUV(topleft);
if (bWidth > topleft.frame.width + topright.frame.width)
__genSliceUV(top);
__genSliceUV(topright);
}
if (drawMiddle && bHeight > top.frame.height + bottom.frame.height) {
__genSliceUV(middleleft);
if (bWidth > (middleleft.frame.width * Math.min(bWidth/(middleleft.frame.width*2), 1)) + middleright.frame.width)
__genSliceUV(middle);
__genSliceUV(middleright);
}
if (drawBottom) {
__genSliceUV(bottomleft);
if (bWidth > bottomleft.frame.width + bottomright.frame.width)
__genSliceUV(bottom);
__genSliceUV(bottomright);
}
__framesDirty = false;
}
+2
View File
@@ -100,6 +100,8 @@ class UISlider extends UISprite {
valueStepper.bWidth = Std.int(FlxMath.lerp(valueStepper.bWidth, __stepperWidth, 1/2.25));
valueStepper.follow(this, -startText.width-10 - valueStepper.bWidth - 4, (height-valueStepper.bHeight)/2);
@:privateAccess valueStepper.__framesDirty = true;
var lastBarProgress:Float = __barProgress;
if (selectableHitbox.hovered && FlxG.mouse.pressed) {