mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Show hand
This commit is contained in:
@@ -267,21 +267,34 @@ public class VPlayerPanel extends FContainer {
|
|||||||
phaseIndicator.resetFont();
|
phaseIndicator.resetFont();
|
||||||
phaseIndicator.setBounds(x, 0, avatar.getWidth() * 0.6f, height);
|
phaseIndicator.setBounds(x, 0, avatar.getWidth() * 0.6f, height);
|
||||||
x += phaseIndicator.getWidth();
|
x += phaseIndicator.getWidth();
|
||||||
field.setBounds(x, 0, width - x, height);
|
width -= x;
|
||||||
|
field.setBounds(x, 0, width, height);
|
||||||
|
|
||||||
|
float displayAreaHeight = getHeight() / 3;
|
||||||
|
if (isFlipped()) {
|
||||||
|
y = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
y = height - displayAreaHeight;
|
||||||
|
}
|
||||||
|
for (InfoTab tab : tabs) {
|
||||||
|
tab.displayArea.setBounds(x, y, width, displayAreaHeight);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawBackground(Graphics g) {
|
public void drawBackground(Graphics g) {
|
||||||
float y;
|
float y;
|
||||||
if (selectedTab != null) { //draw background and border for selected zone if needed
|
if (selectedTab != null) { //draw background and border for selected zone if needed
|
||||||
float w = getWidth();
|
|
||||||
VDisplayArea selectedDisplayArea = selectedTab.displayArea;
|
VDisplayArea selectedDisplayArea = selectedTab.displayArea;
|
||||||
g.fillRect(DISPLAY_AREA_BACK_COLOR, 0, selectedDisplayArea.getTop(), w, selectedDisplayArea.getHeight());
|
float x = selectedDisplayArea.getLeft();
|
||||||
|
float w = selectedDisplayArea.getWidth();
|
||||||
|
g.fillRect(DISPLAY_AREA_BACK_COLOR, x, selectedDisplayArea.getTop(), w, selectedDisplayArea.getHeight());
|
||||||
|
|
||||||
if (!Forge.isLandscapeMode()) {
|
if (!Forge.isLandscapeMode()) {
|
||||||
y = isFlipped() ? selectedDisplayArea.getTop() + 1 : selectedDisplayArea.getBottom();
|
y = isFlipped() ? selectedDisplayArea.getTop() + 1 : selectedDisplayArea.getBottom();
|
||||||
//leave gap at selected zone tab
|
//leave gap at selected zone tab
|
||||||
g.drawLine(1, MatchScreen.BORDER_COLOR, 0, y, selectedTab.getLeft(), y);
|
g.drawLine(1, MatchScreen.BORDER_COLOR, x, y, selectedTab.getLeft(), y);
|
||||||
g.drawLine(1, MatchScreen.BORDER_COLOR, selectedTab.getRight(), y, w, y);
|
g.drawLine(1, MatchScreen.BORDER_COLOR, selectedTab.getRight(), y, w, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user