Renamed
This commit is contained in:
parent
1ceccb2685
commit
43324ba5e9
4 changed files with 13 additions and 5 deletions
|
@ -8,18 +8,22 @@ import org.betterx.ui.layout.values.Rectangle;
|
|||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import net.minecraft.client.gui.components.events.GuiEventListener;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public abstract class Stack<R extends ComponentRenderer, T extends Stack<R, T>> extends Component<R> implements RelativeContainerEventHandler {
|
||||
@Environment(EnvType.CLIENT)
|
||||
public abstract class AbstractStack<R extends ComponentRenderer, T extends AbstractStack<R, T>> extends Component<R> implements RelativeContainerEventHandler {
|
||||
protected final List<Component<?>> components = new LinkedList<>();
|
||||
|
||||
public Stack(DynamicSize width, DynamicSize height) {
|
||||
public AbstractStack(DynamicSize width, DynamicSize height) {
|
||||
this(width, height, null);
|
||||
}
|
||||
|
||||
public Stack(DynamicSize width, DynamicSize height, R renderer) {
|
||||
public AbstractStack(DynamicSize width, DynamicSize height, R renderer) {
|
||||
super(width, height, renderer);
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package org.betterx.ui.layout.components;
|
||||
|
||||
public class AbstractVanillaComponent {
|
||||
}
|
|
@ -9,7 +9,7 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class HorizontalStack<R extends ComponentRenderer> extends Stack<R, HorizontalStack<R>> implements RelativeContainerEventHandler {
|
||||
public class HorizontalStack<R extends ComponentRenderer> extends AbstractStack<R, HorizontalStack<R>> implements RelativeContainerEventHandler {
|
||||
public HorizontalStack(DynamicSize width, DynamicSize height) {
|
||||
super(width, height);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class VerticalStack<R extends ComponentRenderer> extends Stack<R, VerticalStack<R>> implements RelativeContainerEventHandler {
|
||||
public class VerticalStack<R extends ComponentRenderer> extends AbstractStack<R, VerticalStack<R>> implements RelativeContainerEventHandler {
|
||||
public VerticalStack(DynamicSize width, DynamicSize height) {
|
||||
super(width, height);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue