fix: update version to 1.0.18 and add borders to CustomMultiLineTextArea and CustomSingleLineTextField

This commit is contained in:
extio-de
2026-05-19 21:49:10 +02:00
parent d029f8e09a
commit a06846c34b
3 changed files with 11 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.extio</groupId>
<artifactId>game-engine</artifactId>
<version>1.0.17</version>
<version>1.0.18</version>
<properties>
<java.version>25</java.version>

View File

@@ -974,6 +974,11 @@ public class CustomMultiLineTextArea extends Component {
g2d.setColor(bgColor);
g2d.fillRect(0, 0, this.getWidth(), this.getHeight());
g2d.setColor(theme.getBorderOuter().toColor());
g2d.drawRect(0, 0, this.getWidth() - 1, this.getHeight() - 1);
g2d.setColor(theme.getBorderInner().toColor());
g2d.drawRect(1, 1, this.getWidth() - 2, this.getHeight() - 2);
final int textAreaWidth = toScreenCoord(getTextAreaWidth() + TEXT_AREA_PADDING);
final int visibleHeight = getVisibleHeight();

View File

@@ -550,6 +550,11 @@ public class CustomSingleLineTextField extends Component {
g2d.setColor(bgColor);
g2d.fillRect(0, 0, this.getWidth(), this.getHeight());
g2d.setColor(theme.getBorderOuter().toColor());
g2d.drawRect(0, 0, this.getWidth() - 1, this.getHeight() - 1);
g2d.setColor(theme.getBorderInner().toColor());
g2d.drawRect(1, 1, this.getWidth() - 2, this.getHeight() - 2);
if (this.cachedRawFontHeight == 0) {
this.cachedRawFontHeight = G2DDrawFont.getTextDimensions("ÄÖÜABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzgjpqy", g2d, this.fontSize, 1.0).getY();
}