Provide a default green background for games that don't provide an image.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3483 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2005-04-13 21:41:35 +00:00
parent 0cd9b75c09
commit 69cd0b41a7
@@ -21,7 +21,10 @@
package com.threerings.parlor.card.client; package com.threerings.parlor.card.client;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Point; import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.util.ArrayList; import java.util.ArrayList;
@@ -618,6 +621,14 @@ public abstract class CardPanel extends VirtualMediaPanel
} }
} }
// documentation inherited
protected void paintBehind (Graphics2D gfx, Rectangle dirtyRect)
{
gfx.setColor(DEFAULT_BACKGROUND);
gfx.fill(dirtyRect);
super.paintBehind(gfx, dirtyRect);
}
/** /**
* Flies a set of cards from the board into the ether through an * Flies a set of cards from the board into the ether through an
* intermediate point. * intermediate point.
@@ -1082,4 +1093,7 @@ public abstract class CardPanel extends VirtualMediaPanel
protected CardSprite _sprite; protected CardSprite _sprite;
protected MouseEvent _me; protected MouseEvent _me;
} }
/** A nice default green card table background color. */
protected static Color DEFAULT_BACKGROUND = new Color(0x326D36);
} }