mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Another deck editor mod which should help to limit the width to a max of 1400 pixels. Useful for large screen monitors.
This commit is contained in:
@@ -5,6 +5,8 @@ package forge;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Container;
|
import java.awt.Container;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Rectangle;
|
||||||
// import java.awt.Dimension;
|
// import java.awt.Dimension;
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
import java.awt.Frame;
|
import java.awt.Frame;
|
||||||
@@ -535,8 +537,22 @@ public class Gui_DeckEditor extends JFrame implements CardContainer, DeckDisplay
|
|||||||
|
|
||||||
//TODO use this as soon the deck editor has resizable GUI
|
//TODO use this as soon the deck editor has resizable GUI
|
||||||
//Use both so that when "un"maximizing, the frame isn't tiny
|
//Use both so that when "un"maximizing, the frame isn't tiny
|
||||||
|
|
||||||
setSize(1024, 740);
|
setSize(1024, 740);
|
||||||
setExtendedState(Frame.MAXIMIZED_BOTH);
|
Rectangle bounds = getBounds();
|
||||||
|
Dimension screen = getToolkit().getScreenSize();
|
||||||
|
int maxWidth;
|
||||||
|
if (screen.width >= 1400)
|
||||||
|
maxWidth = 1400;
|
||||||
|
else
|
||||||
|
maxWidth = screen.width;
|
||||||
|
bounds.width = maxWidth;
|
||||||
|
bounds.height = screen.height;
|
||||||
|
|
||||||
|
setMaximizedBounds(bounds);
|
||||||
|
|
||||||
|
// setSize(1024, 740);
|
||||||
|
// setExtendedState(Frame.MAXIMIZED_BOTH);
|
||||||
}//setupAndDisplay()
|
}//setupAndDisplay()
|
||||||
|
|
||||||
private String getStats(CardList deck) {
|
private String getStats(CardList deck) {
|
||||||
|
|||||||
Reference in New Issue
Block a user