File tree Expand file tree Collapse file tree
src/main/kotlin/gg/essential/elementa Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,12 +147,6 @@ open class UIWrappedText @JvmOverloads constructor(
147147 return super .draw(matrixStack)
148148 }
149149
150- if (width / textScale <= charWidth) {
151- // If we are smaller than a char, we can't physically split this string into
152- // "width" strings, so we'll prefer a no-op to an error.
153- return super .draw(matrixStack)
154- }
155-
156150 if (! URenderPipeline .isRequired && ! ElementaVersion .atLeastV9Active) {
157151 @Suppress(" DEPRECATION" )
158152 UGraphics .enableBlend()
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ class ScissorEffect @JvmOverloads constructor(
4545
4646 override fun beforeDraw (matrixStack : UMatrixStack ) {
4747 val bounds = customBoundingBox?.getScissorBounds() ? : scissorBounds ? : boundComponent.getScissorBounds()
48- val scaleFactor = UResolution .scaleFactor.toInt()
48+ val scaleFactor = UResolution .scaleFactor
4949
5050 oldState = currentScissorState
5151 val state = oldState
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ fun getStringSplitToWidth(
129129 pushLine()
130130
131131 for (char in word.toCharArray()) {
132- if ((currLine.toString() + char).width(textScale, fontProvider) > maxLineWidthSpace)
132+ if (currLine.isNotEmpty() && (currLine.toString() + char).width(textScale, fontProvider) > maxLineWidthSpace)
133133 pushLine()
134134 currLine.append(char)
135135 }
You can’t perform that action at this time.
0 commit comments