Getter for undo-buttons
parent
e6e1fa3187
commit
0bc99a18be
|
|
@ -28,6 +28,11 @@ public class GameGui {
|
|||
private JButton flipBoardButton;
|
||||
private boolean isFlipped = false;
|
||||
|
||||
JButton btnFirst = new JButton("|<");
|
||||
JButton btnPrev = new JButton("<");
|
||||
JButton btnNext = new JButton(">");
|
||||
JButton btnLast = new JButton(">|");
|
||||
|
||||
private JPanel moveListPanel;
|
||||
private JScrollPane moveListScroll;
|
||||
|
||||
|
|
@ -166,10 +171,7 @@ public class GameGui {
|
|||
buttonPanel.setBackground(new Color(0x0d1b2a));
|
||||
// Grid oder Flow – je nach Geschmack
|
||||
buttonPanel.setLayout(new GridLayout(1, 4, 10, 0));
|
||||
JButton btnFirst = new JButton("|<");
|
||||
JButton btnPrev = new JButton("<");
|
||||
JButton btnNext = new JButton(">");
|
||||
JButton btnLast = new JButton(">|");
|
||||
|
||||
// Style (optional)
|
||||
btnFirst.setBackground(new Color(0x212529)); btnFirst.setForeground(Color.WHITE);
|
||||
btnPrev.setBackground(new Color(0x212529)); btnPrev.setForeground(Color.WHITE);
|
||||
|
|
@ -217,6 +219,11 @@ public class GameGui {
|
|||
this.isFlipped = flipped;
|
||||
}
|
||||
|
||||
public JButton getBtnFirst() { return btnFirst; }
|
||||
public JButton getBtnPrev() { return btnPrev; }
|
||||
public JButton getBtnNext() { return btnNext; }
|
||||
public JButton getBtnLast() { return btnLast; }
|
||||
|
||||
public void updateBoard(BoardDTO boardDTO) {
|
||||
PieceDTO[][] board = boardDTO.getBoard();
|
||||
if (!isFlipped) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue