mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Fix size of challenge items
This commit is contained in:
@@ -134,15 +134,14 @@ class QuestEventPanel extends FDisplayObject {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ScrollBounds layoutAndGetScrollBounds(float visibleWidth, float visibleHeight) {
|
protected ScrollBounds layoutAndGetScrollBounds(float visibleWidth, float visibleHeight) {
|
||||||
int panelCount = getChildCount();
|
if (getChildCount() == 0) {
|
||||||
if (panelCount == 0) {
|
|
||||||
return new ScrollBounds(visibleWidth, visibleHeight);
|
return new ScrollBounds(visibleWidth, visibleHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
float y = 0;
|
float y = 0;
|
||||||
float panelWidth = visibleWidth;
|
float panelWidth = visibleWidth;
|
||||||
float padding = 2 * PADDING; //use twice as much padding between panels
|
float padding = 2 * PADDING; //use twice as much padding between panels
|
||||||
float panelHeight = (visibleHeight + padding) / panelCount - padding;
|
float panelHeight = (visibleHeight + padding) / 3 - padding;
|
||||||
if (panelHeight < MIN_HEIGHT) {
|
if (panelHeight < MIN_HEIGHT) {
|
||||||
panelHeight = MIN_HEIGHT;
|
panelHeight = MIN_HEIGHT;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user