fix(G2DDrawControl): update label foreground color handling in setCustomData
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.11</version>
|
<version>1.0.12</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>25</java.version>
|
<java.version>25</java.version>
|
||||||
|
|||||||
@@ -331,7 +331,10 @@ public class G2DDrawControl extends G2DAbstractRenderingBo implements ControlRen
|
|||||||
(int) (this.visibleAreaHeight * scaleFactor));
|
(int) (this.visibleAreaHeight * scaleFactor));
|
||||||
|
|
||||||
if (this.clazz == LabelControl.class && this.labelData != null) {
|
if (this.clazz == LabelControl.class && this.labelData != null) {
|
||||||
((LabelControl) control).setCustomData(this.labelData);
|
final var labelForegroundColor = this.labelData != null && this.labelData.foregroundColor() != null
|
||||||
|
? this.labelData.foregroundColor()
|
||||||
|
: this.color;
|
||||||
|
((LabelControl) control).setCustomData(new LabelData(this.labelData.backgroundColor(), labelForegroundColor, this.labelData.textAlignment()));
|
||||||
}
|
}
|
||||||
else if (this.clazz == ToggleButtonControl.class && this.toggleButtonData != null) {
|
else if (this.clazz == ToggleButtonControl.class && this.toggleButtonData != null) {
|
||||||
((ToggleButtonControl) control).setLastControlDataUpdateTime(this.lastControlDataUpdateTime);
|
((ToggleButtonControl) control).setLastControlDataUpdateTime(this.lastControlDataUpdateTime);
|
||||||
|
|||||||
Reference in New Issue
Block a user