mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Fix so selected card appears on top
This commit is contained in:
@@ -192,6 +192,10 @@ public class InputSelectCard {
|
||||
w = owner.getHeight();
|
||||
y = pos.y + owner.getHeight() - h;
|
||||
}
|
||||
if (owner.getAttachedToPanel() != null) {
|
||||
//redraw owner if needed so it appears on top of cards above it in stack
|
||||
owner.draw(g, pos.x, pos.y);
|
||||
}
|
||||
g.drawRect(2, Color.GREEN, x, y, w, h);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,10 +53,13 @@ public class FCardPanel extends FDisplayObject {
|
||||
|
||||
@Override
|
||||
public void draw(Graphics g) {
|
||||
draw(g, 0, 0);
|
||||
}
|
||||
public void draw(Graphics g, float x, float y) {
|
||||
if (card == null) { return; }
|
||||
|
||||
float x = PADDING;
|
||||
float y = PADDING;
|
||||
x += PADDING;
|
||||
y += PADDING;
|
||||
float w = getWidth() - 2 * PADDING;
|
||||
float h = getHeight() - 2 * PADDING;
|
||||
if (w == h) { //adjust width if needed to make room for tapping
|
||||
|
||||
Reference in New Issue
Block a user