kleinere Bugfixes und Verschönerungen
parent
bc909c3ba5
commit
9588847c72
|
|
@ -46,6 +46,7 @@ public class ButtonAufgebenListener extends JFrame implements ActionListener {
|
|||
}
|
||||
|
||||
this.sf.setBoardMode(BoardMode.finished);
|
||||
this.sf.enableControlPanelButtons();
|
||||
|
||||
sf.setButtonsActions();
|
||||
|
||||
|
|
|
|||
|
|
@ -87,6 +87,10 @@ public class MainFrame extends JFrame {
|
|||
contentPane.add(Box.createVerticalStrut(15));
|
||||
|
||||
JButton pgnLoaderButton = new JButton("Lade aus PGN Datei");
|
||||
pgnLoaderButton.setBackground(Color.LIGHT_GRAY);
|
||||
pgnLoaderButton.setForeground(Color.BLACK);
|
||||
pgnLoaderButton.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||
pgnLoaderButton.setAlignmentX(CENTER_ALIGNMENT);
|
||||
pgnLoaderButton.addActionListener(e -> openPgnSelectFrame());
|
||||
contentPane.add(pgnLoaderButton);
|
||||
|
||||
|
|
@ -116,7 +120,7 @@ public class MainFrame extends JFrame {
|
|||
*/
|
||||
public void startGame() {
|
||||
if (this.game != null) {
|
||||
this.game.stopClock();
|
||||
//this.game.stopClock();
|
||||
new SpielFrame(this.game);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public class SpielFrame extends JFrame {
|
|||
private Square selectedSquare;
|
||||
|
||||
public enum BoardMode {
|
||||
normal, pieceSelected, finished, gameEnd
|
||||
normal, pieceSelected, finished
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -244,9 +244,6 @@ public class SpielFrame extends JFrame {
|
|||
case finished:
|
||||
break;
|
||||
|
||||
case gameEnd:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -393,36 +390,60 @@ public class SpielFrame extends JFrame {
|
|||
|
||||
// ----- ViewQuicksaveButton -----
|
||||
JButton quicksave = new JButton("Quicksave");
|
||||
quicksave.setBackground(Color.LIGHT_GRAY);
|
||||
quicksave.setForeground(Color.BLACK);
|
||||
quicksave.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||
quicksave.setAlignmentX(CENTER_ALIGNMENT);
|
||||
quicksave.setEnabled(true);
|
||||
quicksave.addActionListener(new ButtonQuicksaveListener(this.game));
|
||||
this.controlPanel.add(quicksave);
|
||||
|
||||
// ----- ViewFirstButton -----
|
||||
JButton viewFirstButton = new JButton("<<-");
|
||||
viewFirstButton.setBackground(Color.LIGHT_GRAY);
|
||||
viewFirstButton.setForeground(Color.BLACK);
|
||||
viewFirstButton.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||
viewFirstButton.setAlignmentX(CENTER_ALIGNMENT);
|
||||
viewFirstButton.setEnabled(false);
|
||||
viewFirstButton.addActionListener(new ButtonViewFirstListener(this.game, this));
|
||||
this.controlPanel.add(viewFirstButton);
|
||||
|
||||
// ----- ViewBackButton -----
|
||||
JButton viewBackButton = new JButton("<-");
|
||||
viewBackButton.setBackground(Color.LIGHT_GRAY);
|
||||
viewBackButton.setForeground(Color.BLACK);
|
||||
viewBackButton.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||
viewBackButton.setAlignmentX(CENTER_ALIGNMENT);
|
||||
viewBackButton.setEnabled(false);
|
||||
viewBackButton.addActionListener(new ButtonViewBackListener(this.game, this));
|
||||
this.controlPanel.add(viewBackButton);
|
||||
|
||||
// ----- ViewForwardButton -----
|
||||
JButton viewForwardButton = new JButton("->");
|
||||
viewForwardButton.setBackground(Color.LIGHT_GRAY);
|
||||
viewForwardButton.setForeground(Color.BLACK);
|
||||
viewForwardButton.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||
viewForwardButton.setAlignmentX(CENTER_ALIGNMENT);
|
||||
viewForwardButton.setEnabled(false);
|
||||
viewForwardButton.addActionListener(new ButtonViewForwardListener(this.game, this));
|
||||
this.controlPanel.add(viewForwardButton);
|
||||
|
||||
// ----- ViewLastButton -----
|
||||
JButton viewLastButton = new JButton("->>");
|
||||
viewLastButton.setBackground(Color.LIGHT_GRAY);
|
||||
viewLastButton.setForeground(Color.BLACK);
|
||||
viewLastButton.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||
viewLastButton.setAlignmentX(CENTER_ALIGNMENT);
|
||||
viewLastButton.setEnabled(false);
|
||||
viewLastButton.addActionListener(new ButtonViewLastListener(this.game, this));
|
||||
this.controlPanel.add(viewLastButton);
|
||||
|
||||
// ----- ViewQuickloadButton -----
|
||||
JButton quickload = new JButton("Quickload");
|
||||
quickload.setBackground(Color.LIGHT_GRAY);
|
||||
quickload.setForeground(Color.BLACK);
|
||||
quickload.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||
quickload.setAlignmentX(CENTER_ALIGNMENT);
|
||||
quickload.setEnabled(true);
|
||||
quickload.addActionListener(new ButtonQuickloadListener(this.game, this));
|
||||
this.controlPanel.add(quickload);
|
||||
|
|
|
|||
Loading…
Reference in New Issue