Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
dseifert committed Apr 2, 2014
2 parents c12cbde + 55f7daa commit a1cb669
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
8 changes: 6 additions & 2 deletions src/analyzer/GUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
Expand Down Expand Up @@ -68,8 +70,10 @@ public class GUI extends JFrame implements ListSelectionListener
public GUI()
{
super(TITLE);
Dimension desktop = Toolkit.getDefaultToolkit().getScreenSize();
setLocation((desktop.width-WINDOW_WIDTH)/2, (desktop.height-WINDOW_HEIGHT)/2);
GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
int width = gd.getDisplayMode().getWidth();
int height = gd.getDisplayMode().getHeight();
setLocation((width-WINDOW_WIDTH)/2, (height-WINDOW_HEIGHT)/2);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(WINDOW_WIDTH, WINDOW_HEIGHT);
TotalScaleLayout layout = new TotalScaleLayout(this);
Expand Down
6 changes: 4 additions & 2 deletions src/controller/ui/GUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,10 @@ public GUI(boolean fullscreen, AdvancedData data)
super(WINDOW_TITLE);
setSize(WINDOW_WIDTH, WINDOW_HEIGHT);
setResizable(true);
Dimension desktop = Toolkit.getDefaultToolkit().getScreenSize();
setLocation((desktop.width-WINDOW_WIDTH)/2, (desktop.height-WINDOW_HEIGHT)/2);
GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
int width = gd.getDisplayMode().getWidth();
int height = gd.getDisplayMode().getHeight();
setLocation((width-WINDOW_WIDTH)/2, (height-WINDOW_HEIGHT)/2);

addWindowListener(new WindowAdapter()
{
Expand Down
8 changes: 6 additions & 2 deletions src/controller/ui/StartInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
Expand Down Expand Up @@ -87,8 +89,10 @@ public StartInput(boolean fullscreenMode)
{
super(WINDOW_TITLE);

Dimension desktop = Toolkit.getDefaultToolkit().getScreenSize();
setLocation((desktop.width-WINDOW_WIDTH)/2, (desktop.height-WINDOW_HEIGHT)/2);
GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
int width = gd.getDisplayMode().getWidth();
int height = gd.getDisplayMode().getHeight();
setLocation((width-WINDOW_WIDTH)/2, (height-WINDOW_HEIGHT)/2);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setResizable(false);
setLayout(new FlowLayout(FlowLayout.CENTER, 0, STANDARD_SPACE));
Expand Down
4 changes: 2 additions & 2 deletions src/data/SPLCoachMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public class SPLCoachMessage implements Serializable
public static final int SPL_COACH_MESSAGE_STRUCT_VERSION = 2;
public static final int SPL_COACH_MESSAGE_SIZE = 40;
public static final long SPL_COACH_MESSAGE_RECEIVE_INTERVALL = 10000; // in ms
public static final long SPL_COACH_MESSAGE_MIN_SEND_INTERVALL = 8000; // in ms
public static final long SPL_COACH_MESSAGE_MAX_SEND_INTERVALL = 12000; // in ms
public static final long SPL_COACH_MESSAGE_MIN_SEND_INTERVALL = 3000; // in ms
public static final long SPL_COACH_MESSAGE_MAX_SEND_INTERVALL = 6000; // in ms
public static final int SIZE = 4 // header size
+ 1 // byte for the version
+ 1 // team number
Expand Down

0 comments on commit a1cb669

Please sign in to comment.