Add status indicators
Allow removal of elements from gui containers
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user