mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Tweak item manager filter layout
This commit is contained in:
@@ -271,7 +271,7 @@ public abstract class ItemManager<T extends InventoryItem> extends FContainer im
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doLayout(float width, float height) {
|
public void doLayout(float width, float height) {
|
||||||
LayoutHelper helper = new LayoutHelper(this, ItemFilter.PADDING, 1);
|
LayoutHelper helper = new LayoutHelper(this, ItemFilter.PADDING, 0);
|
||||||
if (!hideFilters) {
|
if (!hideFilters) {
|
||||||
for (ItemFilter<? extends T> filter : orderedFilters) {
|
for (ItemFilter<? extends T> filter : orderedFilters) {
|
||||||
helper.fillLine(filter.getPanel(), ItemFilter.PANEL_HEIGHT);
|
helper.fillLine(filter.getPanel(), ItemFilter.PANEL_HEIGHT);
|
||||||
@@ -280,7 +280,7 @@ public abstract class ItemManager<T extends InventoryItem> extends FContainer im
|
|||||||
helper.fillLine(mainSearchFilter.getPanel(), ItemFilter.PANEL_HEIGHT);
|
helper.fillLine(mainSearchFilter.getPanel(), ItemFilter.PANEL_HEIGHT);
|
||||||
}
|
}
|
||||||
helper.newLine(ItemFilter.PADDING);
|
helper.newLine(ItemFilter.PADDING);
|
||||||
float fieldHeight = mainSearchFilter.getWidget().getHeight();
|
float fieldHeight = mainSearchFilter.getMainComponent().getHeight();
|
||||||
helper.include(btnFilters, 61, fieldHeight);
|
helper.include(btnFilters, 61, fieldHeight);
|
||||||
float captionWidth = lblCaption.getAutoSizeBounds().width;
|
float captionWidth = lblCaption.getAutoSizeBounds().width;
|
||||||
float ratioWidth = lblRatio.getAutoSizeBounds().width;
|
float ratioWidth = lblRatio.getAutoSizeBounds().width;
|
||||||
@@ -294,16 +294,16 @@ public abstract class ItemManager<T extends InventoryItem> extends FContainer im
|
|||||||
helper.include(lblCaption, captionWidth, fieldHeight);
|
helper.include(lblCaption, captionWidth, fieldHeight);
|
||||||
helper.offset(-helper.getGapX(), 0);
|
helper.offset(-helper.getGapX(), 0);
|
||||||
helper.fillLine(lblRatio, fieldHeight, (viewButtonWidth + helper.getGapX()) * viewButtonCount - viewButtonCount + 1); //leave room for view buttons
|
helper.fillLine(lblRatio, fieldHeight, (viewButtonWidth + helper.getGapX()) * viewButtonCount - viewButtonCount + 1); //leave room for view buttons
|
||||||
helper.offset(0, -1);
|
helper.offset(0, -1); //shift buttons upward
|
||||||
for (ItemView<T> view : views) {
|
for (ItemView<T> view : views) {
|
||||||
helper.include(view.getButton(), viewButtonWidth, fieldHeight);
|
helper.include(view.getButton(), viewButtonWidth, fieldHeight);
|
||||||
helper.offset(-1, 0);
|
helper.offset(-1, 0);
|
||||||
}
|
}
|
||||||
helper.include(btnViewOptions, viewButtonWidth, fieldHeight);
|
helper.include(btnViewOptions, viewButtonWidth, fieldHeight);
|
||||||
helper.newLine(1);
|
helper.newLine(2);
|
||||||
if (currentView.getPnlOptions().isVisible()) {
|
if (currentView.getPnlOptions().isVisible()) {
|
||||||
helper.fillLine(currentView.getPnlOptions(), fieldHeight + 4);
|
helper.fillLine(currentView.getPnlOptions(), fieldHeight + 4);
|
||||||
helper.newLine(2);
|
helper.newLine(3);
|
||||||
}
|
}
|
||||||
helper.fill(currentView.getScroller());
|
helper.fill(currentView.getScroller());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user