optimized text outlines (idk if we gonna keep it)
This commit is contained in:
@@ -39,7 +39,7 @@ class UISlider extends UISprite {
|
||||
|
||||
progressbar = new UISprite(centered ? barWidth/2 : 0);
|
||||
progressbar.makeGraphic(barWidth, 8, 0x00000000, true);
|
||||
progressbar.drawRoundRect(2, 0, barWidth-4, 8-.1, 8, 2, 0xFF67009B);
|
||||
progressbar.drawRoundRect(2, 0, barWidth-4, 8, 8, 2, 0xFF67009B);
|
||||
progressbar.origin.x = 0;
|
||||
members.push(progressbar);
|
||||
|
||||
|
||||
@@ -16,4 +16,29 @@ class UIText extends FunkinText {
|
||||
}
|
||||
this.active = false;
|
||||
}
|
||||
|
||||
public override function applyBorderStyle() {
|
||||
if (borderStyle == OUTLINE_FAST) {
|
||||
var iterations:Int = Std.int(borderSize * borderQuality);
|
||||
if (iterations <= 0)
|
||||
{
|
||||
iterations = 1;
|
||||
}
|
||||
var delta:Float = borderSize / iterations;
|
||||
|
||||
applyFormats(_formatAdjusted, true);
|
||||
|
||||
var curDelta:Float = delta;
|
||||
for (i in 0...iterations)
|
||||
{
|
||||
copyTextWithOffset(-curDelta, -curDelta); // upper-left
|
||||
copyTextWithOffset(curDelta * 2, curDelta * 2); // lower-right
|
||||
|
||||
_matrix.translate(-curDelta, -curDelta); // return to center
|
||||
curDelta += delta;
|
||||
}
|
||||
return;
|
||||
}
|
||||
super.applyBorderStyle();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user