Make combo box render

This commit is contained in:
drdev
2014-03-04 23:24:18 +00:00
parent b4ccd24e75
commit cedda9622f
2 changed files with 4 additions and 4 deletions

View File

@@ -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) {

View File

@@ -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);
} }
} }