Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Window Resize
  • Loading branch information
ssl10003 committed Apr 17, 2015
1 parent c9b5ec4 commit 5bf190c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 23 deletions.
31 changes: 9 additions & 22 deletions src/Main.java
Expand Up @@ -7,7 +7,7 @@ public class Main extends JFrame{
public static void main(String[] args) {
JFrame frame = new JFrame("Tower Defense Refactor Mock GUI");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(1340,640+23);
frame.setSize(640,640+23);
int num = 6;
int[][] nodes = new int[num][2];
nodes[0][0] = 1;
Expand All @@ -31,18 +31,16 @@ public class Main extends JFrame{


JPanel container = new JPanel();
container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS));
//container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS));
container.setLayout(new BorderLayout(10,10));
MockGui mg = new MockGui(640,640,32, num, nodes);
StatGui sg= new StatGui(0,0);
sg.setPreferredSize(new Dimension(1, 0)); //this keeps statgui from overlapping mockgui

/**
JLabel health = new JLabel("Health");
health.setSize(100,100);
jp2.add(health);*/

container.add(mg);
container.add(sg);
//sg.setPreferredSize(new Dimension(1, 0)); //this keeps statgui from overlapping mockgui

//container.add(mg);
//container.add(sg);
container.add(mg, BorderLayout.CENTER);
container.add(sg, BorderLayout.PAGE_END);


MapTowerDefense map = new MapTowerDefense(100, num, nodes, mg, sg);
Expand All @@ -51,19 +49,8 @@ public class Main extends JFrame{
sg.setup();

frame.add(container);
//frame.add(mg);
frame.setVisible(true);




//StatGui sg = new StatGui(100, 640);
//sg.setLocation(640, 0);

//frame.add(sg);


//map.getTF().createBasicTower(14, 8);
map.createMinion(MinionTypes.BASIC);
mg.step();

Expand Down
2 changes: 1 addition & 1 deletion src/StatGui.java
Expand Up @@ -93,7 +93,7 @@ public class StatGui extends JPanel implements ActionListener{
}
else if("select basic tower".equals(e.getActionCommand())){
BasicTowerbutton.setEnabled(true);
//set tower placer variable to place aoe tower
//set tower placer variable to place basic tower
System.out.println("Basic b**ch tower selected!");
}
}
Expand Down
Binary file added src/resources/images/Nexus Tower.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5bf190c

Please sign in to comment.