diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2020-05-13 07:36:39 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2020-05-13 07:36:39 +0200 |
commit | 78f139da6fc8ebe4a1a2c3316404aa1b9460cab0 (patch) | |
tree | 0aa9014d3c189d9f7a8971dec5da19d22b763e8c /core/src/ch | |
parent | eabe011521ec6684dc6a01c4753a2347559ffd59 (diff) | |
download | gdx-boardgame-78f139da6fc8ebe4a1a2c3316404aa1b9460cab0.zip gdx-boardgame-78f139da6fc8ebe4a1a2c3316404aa1b9460cab0.tar.gz |
ui/List : is always sized according to it's content
Diffstat (limited to 'core/src/ch')
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/ui/List.java | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/ui/List.java b/core/src/ch/asynk/gdx/boardgame/ui/List.java index 3e050a6..da1c33f 100644 --- a/core/src/ch/asynk/gdx/boardgame/ui/List.java +++ b/core/src/ch/asynk/gdx/boardgame/ui/List.java @@ -32,7 +32,6 @@ public class List extends Element this.selected = new Bg(selected); this.selected.setParent(this); this.selected.visible = false; - this.sizing = Sizing.EXPAND_BOTH; } public void unselect() { idx = null; } @@ -73,16 +72,9 @@ public class List extends Element if (layout.width > w) w = layout.width; } itemHeight = (layout.height + spacing); - if (sizing.fill()) { - super.computeDimensions(); - } else if (sizing.expand()) { - - if (sizing.expandWidth()) - rect.width = w + (2 * padding); - if (sizing.expandHeight()) - rect.height = (itemHeight * items.size()) + (2 * padding) - spacing; - if (DEBUG_GEOMETRY) System.err.println(" dim " + print(-1)); - } + rect.width = w + (2 * padding); + rect.height = (itemHeight * items.size()) + (2 * padding) - spacing; + if (DEBUG_GEOMETRY) System.err.println(" dim " + print(-1)); } @Override public void computePosition() |