Add status indicators

Allow removal of elements from gui containers
This commit is contained in:
johni0702
2015-10-04 21:15:06 +02:00
parent aa3eb463ee
commit fc4dc86355
3 changed files with 19 additions and 0 deletions

View File

@@ -107,6 +107,14 @@ public abstract class AbstractGuiContainer<T extends AbstractGuiContainer<T>>
return getThis();
}
@Override
public T removeElement(GuiElement element) {
if (elements.remove(element) != null) {
layedOutElements.remove(element);
}
return getThis();
}
@Override
public void draw(GuiRenderer renderer, ReadableDimension size, RenderInfo renderInfo) {
try {

View File

@@ -39,5 +39,6 @@ public interface GuiContainer<T extends GuiContainer<T>> extends ComposedGuiElem
Map<GuiElement, LayoutData> getElements();
T addElements(LayoutData layoutData, GuiElement...elements);
T removeElement(GuiElement element);
}