OSDN Git Service

SelectBox: added set max # items to display in dropdown
authorCord Rehn <jordansg57@gmail.com>
Sun, 2 Jun 2013 13:11:00 +0000 (07:11 -0600)
committerCord Rehn <jordansg57@gmail.com>
Sun, 2 Jun 2013 13:11:00 +0000 (07:11 -0600)
commitbe086d5cc9d35bfb007dfa857786c26cd43139c8
tree53b2431e27384105a6060b2571652e168ad39195
parent8612c238a09ef550cc92b9ad47f7a90c7a9c09ef
SelectBox: added set max # items to display in dropdown

Added backwards compatible functionality for configuring the max # of items to display in the dropdown SelectList.

You set the maximum number of items you want displayed in the dropdown box until scrolling is required, or <= 0 to have it list them all, but should it reach the bottom/top of the screen then scrolling is required.

This is also a solution to an API defect. There was no previous easy way to modify the inner SelectList's prefHeight() to adjust the dropdown list's displayed height.
gdx/src/com/badlogic/gdx/scenes/scene2d/ui/SelectBox.java