/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package net.kirauks.minigames.launcher;

import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.scene.control.MenuItem;
import javafx.scene.control.TextArea;

/**
 *
 * @author Karl
 */
public class LauncherController implements Initializable {
    @FXML
    private TextArea gameDescription;
    @FXML
    private Label gameTitle;
    @FXML
    private Button gameStart;
    
    @FXML
    private ListView listGames;
    
    @FXML
    private void handleMenuInstall(ActionEvent event) {
        
    }
    @FXML
    private void handleMenuUninstall(ActionEvent event) {
        
    }
    
    @FXML
    private void handleMenuGameStart(ActionEvent event) {
        
    }
    
    @Override
    public void initialize(URL url, ResourceBundle rb) {
        // TODO
    }
}

@@ -236,48 +236,333 @@
 ava.
-net.URL;%0Aimport java.util.ResourceBundle
+io.IOException;%0Aimport net.kirauks.minigames.launcher.games.GameManager;%0Aimport java.net.URL;%0Aimport java.util.ResourceBundle;%0Aimport java.util.logging.Level;%0Aimport java.util.logging.Logger;%0Aimport javafx.beans.property.ReadOnlyObjectWrapper;%0Aimport javafx.collections.FXCollections;%0Aimport javafx.collections.ObservableList
 ;%0Aim
@@ -835,16 +835,71 @@
 extArea;
+%0Aimport net.kirauks.minigames.launcher.games.GameModel;
 %0A%0A/**%0A *
@@ -1153,24 +1153,62 @@
 Games;%0A    %0A
+    private GameManager manager;%0A    %0A
     @FXML%0A  
@@ -1261,32 +1261,269 @@
 vent) %7B%0A        
+try %7B%0A            this.manager.installGame(new GameModel(%22Test%22, %22Test description%22, %22test.txt%22));%0A        %7D catch (IOException ex) %7B%0A            Logger.getLogger(LauncherController.class.getName()).log(Level.SEVERE, null, ex);%0A        %7D
 %0A    %7D%0A    @FXML
@@ -1772,15 +1772,642 @@
     
-// TODO
+try %7B%0A            this.manager = GameManager.getInstance();%0A        %7D catch (IOException ex) %7B%0A            Logger.getLogger(LauncherController.class.getName()).log(Level.SEVERE, null, ex);%0A        %7D%0A        %0A        this.listGames.setItems(this.manager.gamesListProperty());%0A        %0A        this.gameDescription.disableProperty().bind(this.listGames.getSelectionModel().selectedItemProperty().isNull());%0A        this.gameTitle.disableProperty().bind(this.listGames.getSelectionModel().selectedItemProperty().isNull());%0A        this.gameStart.disableProperty().bind(this.listGames.getSelectionModel().selectedItemProperty().isNull());
 %0A   

Implement test controller