aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuuxel <6596629+Juuxel@users.noreply.github.com>2020-10-11 13:20:16 +0300
committerJuuxel <6596629+Juuxel@users.noreply.github.com>2020-10-11 13:20:16 +0300
commit4ab25171b40e2104f117968b2d52607a64e34a8e (patch)
tree3d02430f20460074f7840f46278ee296044b1450 /src
parent016eb1efda675e676e5cde655ba382a77b1552b5 (diff)
downloadLibGui-4ab25171b40e2104f117968b2d52607a64e34a8e.tar.gz
LibGui-4ab25171b40e2104f117968b2d52607a64e34a8e.tar.bz2
LibGui-4ab25171b40e2104f117968b2d52607a64e34a8e.zip
Add WCardPanel.getCardCount
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WCardPanel.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WCardPanel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WCardPanel.java
index 6c6449a..dc899ab 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WCardPanel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WCardPanel.java
@@ -120,6 +120,16 @@ public class WCardPanel extends WPanel {
return setSelectedIndex(cards.indexOf(selectedCard));
}
+ /**
+ * Gets the number of cards in this panel.
+ *
+ * @return the card count
+ * @since 3.1.0
+ */
+ public int getCardCount() {
+ return cards.size();
+ }
+
@Override
public void setSize(int x, int y) {
super.setSize(x, y);