package graphics;

import javax.swing.*;
import java.util.Observable;
import java.util.Observer;

/**
 * Created by tratost on 15/04/15.
 */
public class MainMenuView extends JPanel implements Observer {

    private MainMenuButton play;

    //CONSTRUCTOR

    public MainMenuView() {
        super();
        instantiateButtons();
        this.add(play);
    }

    private void instantiateButtons(){
        play = new MainMenuButton("Play Game");
        play.setVisible(true);
    }

    //GETTER

    public MainMenuButton getPlay() {
        return play;
    }

    //UPDATE

    @Override
    public void update(Observable o, Object arg) {
        //TODO
    }
}

@@ -34,16 +34,35 @@
 wing.*;%0A
+import java.awt.*;%0A
 import j
@@ -82,16 +82,16 @@
 rvable;%0A
-
 import j
@@ -249,16 +249,51 @@
 on play;
+%0A    private Background background;
 %0A%0A    //
@@ -407,24 +407,113 @@
 ay);%0A    %7D%0A%0A
+    public MainMenuView(Background bg) %7B%0A        this();%0A        background = bg;%0A    %7D%0A%0A
     private 
@@ -780,24 +780,24 @@
 ject arg) %7B%0A
-
         //TO
@@ -804,11 +804,199 @@
 DO%0A    %7D
+%0A%0A    @Override%0A    protected void paintComponent(Graphics g) %7B%0A        super.paintComponent(g);%0A        if (background != null) %7B%0A            background.paintComponent(g);%0A        %7D%0A    %7D
 %0A%7D%0A

add possibility to have a background