mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
Revert previous commit
This commit is contained in:
@@ -4,9 +4,10 @@ import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
|
|||||||
import com.badlogic.gdx.backends.lwjgl.LwjglClipboard;
|
import com.badlogic.gdx.backends.lwjgl.LwjglClipboard;
|
||||||
|
|
||||||
import forge.Forge;
|
import forge.Forge;
|
||||||
|
import forge.util.Utils;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
new LwjglApplication(new Forge(new LwjglClipboard(), "../forge-gui/"), "Forge", 320, 480, true);
|
new LwjglApplication(new Forge(new LwjglClipboard(), "../forge-gui/"), "Forge", (int)Utils.BASE_WIDTH, (int)Utils.BASE_HEIGHT, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -245,14 +245,13 @@ public class VPlayerPanel extends FContainer {
|
|||||||
@Override
|
@Override
|
||||||
public void draw(Graphics g) {
|
public void draw(Graphics g) {
|
||||||
float x, y, w, h;
|
float x, y, w, h;
|
||||||
boolean flipped = isFlipped();
|
|
||||||
|
|
||||||
if (selectedTab == this) {
|
if (selectedTab == this) {
|
||||||
y = 0;
|
y = 0;
|
||||||
w = getWidth();
|
w = getWidth();
|
||||||
h = getHeight();
|
h = getHeight();
|
||||||
float yAcross;
|
float yAcross;
|
||||||
if (flipped) {
|
if (isFlipped()) {
|
||||||
y += INFO_TAB_PADDING_Y;
|
y += INFO_TAB_PADDING_Y;
|
||||||
yAcross = y;
|
yAcross = y;
|
||||||
y--;
|
y--;
|
||||||
@@ -295,24 +294,11 @@ public class VPlayerPanel extends FContainer {
|
|||||||
}
|
}
|
||||||
h = icon.getHeight() * w / icon.getWidth();
|
h = icon.getHeight() * w / icon.getWidth();
|
||||||
x = (getWidth() - w) / 2;
|
x = (getWidth() - w) / 2;
|
||||||
if (flipped) {
|
y = INFO_TAB_PADDING_Y;
|
||||||
y = getHeight() - h - INFO_TAB_PADDING_Y;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
y = INFO_TAB_PADDING_Y;
|
|
||||||
}
|
|
||||||
g.drawImage(icon, x, y, w, h);
|
g.drawImage(icon, x, y, w, h);
|
||||||
|
|
||||||
if (flipped) {
|
y += h + INFO_TAB_PADDING_Y;
|
||||||
h = INFO_FONT.getFont().getCapHeight();
|
g.drawText(value, INFO_FONT, INFO_FORE_COLOR, 0, y, getWidth(), getHeight() - y + 1, false, HAlignment.CENTER, false);
|
||||||
y -= h + INFO_TAB_PADDING_Y;
|
|
||||||
h += INFO_TAB_PADDING_Y;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
y += h + INFO_TAB_PADDING_Y;
|
|
||||||
h = getHeight() - y + 1;
|
|
||||||
}
|
|
||||||
g.drawText(value, INFO_FONT, INFO_FORE_COLOR, 0, y, getWidth(), h, false, HAlignment.CENTER, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user