mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
Make combo box render
This commit is contained in:
@@ -393,7 +393,7 @@ public class Forge implements ApplicationListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void fillTriangle(FSkinColor skinColor, float x1, float y1, float x2, float y2, float x3, float y3) {
|
public void fillTriangle(FSkinColor skinColor, float x1, float y1, float x2, float y2, float x3, float y3) {
|
||||||
fillTriangle(skinColor.getColor(), x1, y1, x2, y2, x2, y3);
|
fillTriangle(skinColor.getColor(), x1, y1, x2, y2, x3, y3);
|
||||||
}
|
}
|
||||||
public void fillTriangle(Color color, float x1, float y1, float x2, float y2, float x3, float y3) {
|
public void fillTriangle(Color color, float x1, float y1, float x2, float y2, float x3, float y3) {
|
||||||
batch.end(); //must pause batch while rendering shapes
|
batch.end(); //must pause batch while rendering shapes
|
||||||
@@ -405,7 +405,7 @@ public class Forge implements ApplicationListener {
|
|||||||
|
|
||||||
shapeRenderer.begin(ShapeType.Filled);
|
shapeRenderer.begin(ShapeType.Filled);
|
||||||
shapeRenderer.setColor(color);
|
shapeRenderer.setColor(color);
|
||||||
shapeRenderer.triangle(x1, y1, x2, y2, x3, y3);
|
shapeRenderer.triangle(adjustX(x1), adjustY(y1, 0), adjustX(x2), adjustY(y2, 0), adjustX(x3), adjustY(y3, 0));
|
||||||
shapeRenderer.end();
|
shapeRenderer.end();
|
||||||
|
|
||||||
if (needBlending) {
|
if (needBlending) {
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ public class SettingsScreen extends FScreen {
|
|||||||
public SettingsScreen() {
|
public SettingsScreen() {
|
||||||
super(true, "Settings", true);
|
super(true, "Settings", true);
|
||||||
|
|
||||||
cmbTheme = new FComboBox<>(FSkin.getAllSkins());
|
cmbTheme = add(new FComboBox<>(FSkin.getAllSkins()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doLayout(float startY, float width, float height) {
|
protected void doLayout(float startY, float width, float height) {
|
||||||
cmbTheme.setBounds(20, startY + 20, width, 25);
|
cmbTheme.setBounds(20, startY + 20, width - 40, 25);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user