fix: update version to 1.0.18 and add borders to CustomMultiLineTextArea and CustomSingleLineTextField
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>de.extio</groupId>
|
<groupId>de.extio</groupId>
|
||||||
<artifactId>game-engine</artifactId>
|
<artifactId>game-engine</artifactId>
|
||||||
<version>1.0.17</version>
|
<version>1.0.18</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>25</java.version>
|
<java.version>25</java.version>
|
||||||
|
|||||||
@@ -974,6 +974,11 @@ public class CustomMultiLineTextArea extends Component {
|
|||||||
g2d.setColor(bgColor);
|
g2d.setColor(bgColor);
|
||||||
g2d.fillRect(0, 0, this.getWidth(), this.getHeight());
|
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 textAreaWidth = toScreenCoord(getTextAreaWidth() + TEXT_AREA_PADDING);
|
||||||
final int visibleHeight = getVisibleHeight();
|
final int visibleHeight = getVisibleHeight();
|
||||||
|
|
||||||
|
|||||||
@@ -550,6 +550,11 @@ public class CustomSingleLineTextField extends Component {
|
|||||||
g2d.setColor(bgColor);
|
g2d.setColor(bgColor);
|
||||||
g2d.fillRect(0, 0, this.getWidth(), this.getHeight());
|
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) {
|
if (this.cachedRawFontHeight == 0) {
|
||||||
this.cachedRawFontHeight = G2DDrawFont.getTextDimensions("ÄÖÜABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzgjpqy", g2d, this.fontSize, 1.0).getY();
|
this.cachedRawFontHeight = G2DDrawFont.getTextDimensions("ÄÖÜABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzgjpqy", g2d, this.fontSize, 1.0).getY();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user