1
mirror of https://github.com/Shiewk/Widgets.git synced 2026-04-28 11:34:17 +02:00

Allow resizing BasicTextWidgets

This commit is contained in:
Shy
2024-10-20 12:21:21 +02:00
parent 59acc266f2
commit 0027b67eac
6 changed files with 41 additions and 14 deletions
@@ -41,8 +41,8 @@ public class WidgetRenderer implements HudRenderCallback, ClientTickEvents.Start
drawContext,
timeNano,
textRenderer,
(int) Math.round(Math.min(translateToScreen(settings.posX, windowWidth), windowWidth - widget.width())),
(int) Math.round(Math.min(translateToScreen(settings.posY, windowHeight), windowHeight - widget.height()))
(int) Math.round(Math.min(translateToScreen(settings.posX, windowWidth), windowWidth - (widget.width() * widget.getScaleFactor()))),
(int) Math.round(Math.min(translateToScreen(settings.posY, windowHeight), windowHeight - (widget.height() * widget.getScaleFactor())))
);
profiler.pop();
}