fix(renderer): refactor font size constants and improve scrollbar area update in G2D controls
This commit is contained in:
@@ -28,9 +28,9 @@ import de.extio.game_engine.spatial2.model.MutableCoordI2;
|
|||||||
@Component
|
@Component
|
||||||
public class G2DDrawFont extends G2DAbstractRenderingBo implements DrawFontRenderingBo {
|
public class G2DDrawFont extends G2DAbstractRenderingBo implements DrawFontRenderingBo {
|
||||||
|
|
||||||
private final static float FONT_SIZE_MIN = 12.0F;
|
public final static float FONT_SIZE_MIN = 12.0F;
|
||||||
|
|
||||||
private final static int FONT_SIZE_DEFAULT = 18;
|
public final static int FONT_SIZE_DEFAULT = 18;
|
||||||
|
|
||||||
private static Font baseFont;
|
private static Font baseFont;
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import org.springframework.stereotype.Component;
|
|||||||
|
|
||||||
import de.extio.game_engine.renderer.g2d.G2DRendererCondition;
|
import de.extio.game_engine.renderer.g2d.G2DRendererCondition;
|
||||||
import de.extio.game_engine.renderer.g2d.bo.rendering.G2DAbstractRenderingBo;
|
import de.extio.game_engine.renderer.g2d.bo.rendering.G2DAbstractRenderingBo;
|
||||||
|
import de.extio.game_engine.renderer.g2d.bo.rendering.G2DDrawFont;
|
||||||
import de.extio.game_engine.renderer.g2d.control.impl.G2DBaseControlImpl;
|
import de.extio.game_engine.renderer.g2d.control.impl.G2DBaseControlImpl;
|
||||||
import de.extio.game_engine.renderer.g2d.control.impl.G2DButtonControlImpl;
|
import de.extio.game_engine.renderer.g2d.control.impl.G2DButtonControlImpl;
|
||||||
import de.extio.game_engine.renderer.g2d.control.impl.G2DLabelControlImpl;
|
import de.extio.game_engine.renderer.g2d.control.impl.G2DLabelControlImpl;
|
||||||
@@ -52,7 +53,7 @@ public class G2DDrawControl extends G2DAbstractRenderingBo implements ControlRen
|
|||||||
|
|
||||||
private String controlGroup;
|
private String controlGroup;
|
||||||
|
|
||||||
private int fontSize = 18;
|
private int fontSize = G2DDrawFont.FONT_SIZE_DEFAULT;
|
||||||
|
|
||||||
private Object customData;
|
private Object customData;
|
||||||
|
|
||||||
@@ -387,7 +388,7 @@ public class G2DDrawControl extends G2DAbstractRenderingBo implements ControlRen
|
|||||||
this.clazz = null;
|
this.clazz = null;
|
||||||
this.caption = null;
|
this.caption = null;
|
||||||
this.controlGroup = null;
|
this.controlGroup = null;
|
||||||
this.fontSize = 16;
|
this.fontSize = G2DDrawFont.FONT_SIZE_DEFAULT;
|
||||||
this.customData = null;
|
this.customData = null;
|
||||||
this.customData2 = null;
|
this.customData2 = null;
|
||||||
this.customData3 = null;
|
this.customData3 = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user