From 4ab25171b40e2104f117968b2d52607a64e34a8e Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sun, 11 Oct 2020 13:20:16 +0300 Subject: Add WCardPanel.getCardCount --- .../java/io/github/cottonmc/cotton/gui/widget/WCardPanel.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); -- cgit