aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);