Skip to content

Commit 93362ac

Browse files
committed
kataminoBoardButton custom icon added.
1 parent 7a845a1 commit 93362ac

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

lib/components.jar

4.01 KB
Binary file not shown.

lib/components/src/kataminoBoardButton/KataminoBoardButton.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public class KataminoBoardButton extends Pane {
1717
@FXML
1818
ImageView boardImage3;
1919

20+
@FXML
21+
ImageView boardImage4;
22+
2023
private int id;
2124

2225
public KataminoBoardButton() throws IOException {
@@ -32,21 +35,25 @@ public void setBoardButton(int value) {
3235
boardImage1.setVisible(true);
3336
boardImage2.setVisible(false);
3437
boardImage3.setVisible(false);
38+
boardImage4.setVisible(false);
3539
} else if (value == 1) {
3640
id = 1;
3741
boardImage1.setVisible(false);
3842
boardImage2.setVisible(true);
3943
boardImage3.setVisible(false);
44+
boardImage4.setVisible(false);
4045
} else if (value == 2) {
4146
id = 2;
4247
boardImage1.setVisible(false);
4348
boardImage2.setVisible(false);
4449
boardImage3.setVisible(true);
50+
boardImage4.setVisible(false);
4551
} else {
4652
id = value;
47-
boardImage1.setVisible(true);
53+
boardImage1.setVisible(false);
4854
boardImage2.setVisible(false);
4955
boardImage3.setVisible(false);
56+
boardImage4.setVisible(true);
5057
}
5158
}
5259

lib/components/src/kataminoBoardButton/kataminoBoardButton.fxml

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<?import javafx.scene.image.ImageView?>
66
<?import javafx.scene.layout.Pane?>
77

8-
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" type="Pane" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
8+
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" type="Pane" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
99
<children>
1010
<ImageView fx:id="boardImage1" fitHeight="130.0" fitWidth="130.0" pickOnBounds="true" smooth="false">
1111
<image>
@@ -21,6 +21,11 @@
2121
<Image url="@../resources/kataminoBoardButton3.png" />
2222
</image>
2323
</ImageView>
24+
<ImageView fx:id="boardImage4" fitHeight="130.0" fitWidth="130.0" pickOnBounds="true" smooth="false">
25+
<image>
26+
<Image url="@../resources/kataminoBoardButton4.png" />
27+
</image>
28+
</ImageView>
2429
</children>
2530
<cursor>
2631
<Cursor fx:constant="HAND" />
Loading

0 commit comments

Comments
 (0)