Marked classes as client only
This commit is contained in:
parent
40af0b9ea8
commit
00509c03b2
15 changed files with 62 additions and 88 deletions
|
@ -10,6 +10,10 @@ import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import net.minecraft.client.gui.screens.Screen;
|
import net.minecraft.client.gui.screens.Screen;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public class TestScreen extends Screen {
|
public class TestScreen extends Screen {
|
||||||
public TestScreen(Component component) {
|
public TestScreen(Component component) {
|
||||||
super(component);
|
super(component);
|
||||||
|
@ -50,7 +54,7 @@ public class TestScreen extends Screen {
|
||||||
rows.addFiller();
|
rows.addFiller();
|
||||||
main.setChild(HorizontalStack.centered(rows));
|
main.setChild(HorizontalStack.centered(rows));
|
||||||
main.calculateLayout();
|
main.calculateLayout();
|
||||||
|
|
||||||
addRenderableWidget(main);
|
addRenderableWidget(main);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package org.betterx.ui.layout.components;
|
package org.betterx.ui.layout.components;
|
||||||
|
|
||||||
import org.betterx.ui.layout.components.input.MouseEvent;
|
|
||||||
import org.betterx.ui.layout.components.render.ComponentRenderer;
|
import org.betterx.ui.layout.components.render.ComponentRenderer;
|
||||||
import org.betterx.ui.layout.values.DynamicSize;
|
import org.betterx.ui.layout.values.DynamicSize;
|
||||||
import org.betterx.ui.layout.values.Rectangle;
|
import org.betterx.ui.layout.values.Rectangle;
|
||||||
|
@ -9,6 +8,10 @@ import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.Font;
|
import net.minecraft.client.gui.Font;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
class ButtonRenderer implements ComponentRenderer {
|
class ButtonRenderer implements ComponentRenderer {
|
||||||
Button linkedButton;
|
Button linkedButton;
|
||||||
|
|
||||||
|
@ -35,6 +38,7 @@ class ButtonRenderer implements ComponentRenderer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public class Button extends Component<ButtonRenderer> {
|
public class Button extends Component<ButtonRenderer> {
|
||||||
int mouseX, mouseY;
|
int mouseX, mouseY;
|
||||||
final net.minecraft.network.chat.Component component;
|
final net.minecraft.network.chat.Component component;
|
||||||
|
@ -57,18 +61,6 @@ public class Button extends Component<ButtonRenderer> {
|
||||||
this.onTooltip = onTooltip;
|
this.onTooltip = onTooltip;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onMouseEvent(MouseEvent event, int x, int y) {
|
|
||||||
mouseX = x;
|
|
||||||
mouseY = y;
|
|
||||||
if (vanillaButton != null && relativeBounds.contains(x, y)) {
|
|
||||||
if (event == MouseEvent.DOWN) return vanillaButton.mouseClicked(x, y, 0);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return super.onMouseEvent(event, x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onBoundsChanged() {
|
protected void onBoundsChanged() {
|
||||||
vanillaButton = new net.minecraft.client.gui.components.Button(
|
vanillaButton = new net.minecraft.client.gui.components.Button(
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package org.betterx.ui.layout.components;
|
package org.betterx.ui.layout.components;
|
||||||
|
|
||||||
import org.betterx.ui.layout.components.input.MouseEvent;
|
|
||||||
import org.betterx.ui.layout.components.render.ComponentRenderer;
|
import org.betterx.ui.layout.components.render.ComponentRenderer;
|
||||||
import org.betterx.ui.layout.values.Alignment;
|
import org.betterx.ui.layout.values.Alignment;
|
||||||
import org.betterx.ui.layout.values.DynamicSize;
|
import org.betterx.ui.layout.values.DynamicSize;
|
||||||
|
@ -9,6 +8,10 @@ import org.betterx.ui.layout.values.Rectangle;
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import net.minecraft.client.gui.components.events.GuiEventListener;
|
import net.minecraft.client.gui.components.events.GuiEventListener;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public abstract class Component<R extends ComponentRenderer> implements ComponentWithBounds, GuiEventListener {
|
public abstract class Component<R extends ComponentRenderer> implements ComponentWithBounds, GuiEventListener {
|
||||||
protected final R renderer;
|
protected final R renderer;
|
||||||
protected final DynamicSize width;
|
protected final DynamicSize width;
|
||||||
|
@ -86,14 +89,6 @@ public abstract class Component<R extends ComponentRenderer> implements Componen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean mouseEvent(MouseEvent event, int x, int y) {
|
|
||||||
return onMouseEvent(event, x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean onMouseEvent(MouseEvent event, int x, int y) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return super.toString() + "(" + relativeBounds + ", " + width.calculatedSize() + "x" + height.calculatedSize() + ")";
|
return super.toString() + "(" + relativeBounds + ", " + width.calculatedSize() + "x" + height.calculatedSize() + ")";
|
||||||
|
|
|
@ -2,6 +2,10 @@ package org.betterx.ui.layout.components;
|
||||||
|
|
||||||
import org.betterx.ui.layout.values.Rectangle;
|
import org.betterx.ui.layout.values.Rectangle;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public interface ComponentWithBounds {
|
public interface ComponentWithBounds {
|
||||||
Rectangle getRelativeBounds();
|
Rectangle getRelativeBounds();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,10 @@ package org.betterx.ui.layout.components;
|
||||||
|
|
||||||
import org.betterx.ui.layout.values.DynamicSize;
|
import org.betterx.ui.layout.values.DynamicSize;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public class Empty extends Component {
|
public class Empty extends Component {
|
||||||
public Empty(
|
public Empty(
|
||||||
DynamicSize width,
|
DynamicSize width,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package org.betterx.ui.layout.components;
|
package org.betterx.ui.layout.components;
|
||||||
|
|
||||||
import org.betterx.ui.layout.components.input.MouseEvent;
|
|
||||||
import org.betterx.ui.layout.components.input.RelativeContainerEventHandler;
|
import org.betterx.ui.layout.components.input.RelativeContainerEventHandler;
|
||||||
import org.betterx.ui.layout.components.render.ComponentRenderer;
|
import org.betterx.ui.layout.components.render.ComponentRenderer;
|
||||||
import org.betterx.ui.layout.values.Alignment;
|
import org.betterx.ui.layout.values.Alignment;
|
||||||
|
@ -10,10 +9,14 @@ import org.betterx.ui.layout.values.Rectangle;
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import net.minecraft.client.gui.components.events.GuiEventListener;
|
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.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public class HorizontalStack<R extends ComponentRenderer> extends Component<R> implements RelativeContainerEventHandler {
|
public class HorizontalStack<R extends ComponentRenderer> extends Component<R> implements RelativeContainerEventHandler {
|
||||||
protected final List<Component<?>> components = new LinkedList<>();
|
protected final List<Component<?>> components = new LinkedList<>();
|
||||||
|
|
||||||
|
@ -114,17 +117,6 @@ public class HorizontalStack<R extends ComponentRenderer> extends Component<R> i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
boolean mouseEvent(MouseEvent event, int x, int y) {
|
|
||||||
if (!onMouseEvent(event, x, y)) {
|
|
||||||
for (Component<?> c : components) {
|
|
||||||
if (c.mouseEvent(event, x - relativeBounds.left, y - relativeBounds.top))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static HorizontalStack<?> centered(Component<?> c) {
|
public static HorizontalStack<?> centered(Component<?> c) {
|
||||||
return new HorizontalStack<>(DynamicSize.relative(1), DynamicSize.relative(1)).addFiller().add(c).addFiller();
|
return new HorizontalStack<>(DynamicSize.relative(1), DynamicSize.relative(1)).addFiller().add(c).addFiller();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package org.betterx.ui.layout.components;
|
package org.betterx.ui.layout.components;
|
||||||
|
|
||||||
|
|
||||||
import org.betterx.ui.layout.components.input.MouseEvent;
|
|
||||||
import org.betterx.ui.layout.components.input.RelativeContainerEventHandler;
|
import org.betterx.ui.layout.components.input.RelativeContainerEventHandler;
|
||||||
import org.betterx.ui.layout.values.Rectangle;
|
import org.betterx.ui.layout.values.Rectangle;
|
||||||
|
|
||||||
|
@ -11,9 +10,13 @@ import net.minecraft.client.gui.components.events.GuiEventListener;
|
||||||
import net.minecraft.client.gui.narration.NarratableEntry;
|
import net.minecraft.client.gui.narration.NarratableEntry;
|
||||||
import net.minecraft.client.gui.narration.NarrationElementOutput;
|
import net.minecraft.client.gui.narration.NarrationElementOutput;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public class Panel implements ComponentWithBounds, RelativeContainerEventHandler, NarratableEntry, Widget {
|
public class Panel implements ComponentWithBounds, RelativeContainerEventHandler, NarratableEntry, Widget {
|
||||||
protected Component<?> child;
|
protected Component<?> child;
|
||||||
List<? extends GuiEventListener> listeners = List.of();
|
List<? extends GuiEventListener> listeners = List.of();
|
||||||
|
@ -28,13 +31,6 @@ public class Panel implements ComponentWithBounds, RelativeContainerEventHandler
|
||||||
listeners = List.of(c);
|
listeners = List.of(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean mouseEvent(MouseEvent event, int x, int y) {
|
|
||||||
if (child != null) {
|
|
||||||
return child.mouseEvent(event, x - bounds.left, y - bounds.top);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void calculateLayout() {
|
public void calculateLayout() {
|
||||||
if (child != null) {
|
if (child != null) {
|
||||||
child.updateContainerWidth(bounds.width);
|
child.updateContainerWidth(bounds.width);
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package org.betterx.ui.layout.components;
|
package org.betterx.ui.layout.components;
|
||||||
|
|
||||||
import org.betterx.ui.layout.components.input.MouseEvent;
|
|
||||||
import org.betterx.ui.layout.components.render.ComponentRenderer;
|
import org.betterx.ui.layout.components.render.ComponentRenderer;
|
||||||
import org.betterx.ui.layout.components.render.ScrollerRenderer;
|
import org.betterx.ui.layout.components.render.ScrollerRenderer;
|
||||||
import org.betterx.ui.layout.values.DynamicSize;
|
import org.betterx.ui.layout.values.DynamicSize;
|
||||||
|
@ -8,6 +7,10 @@ import org.betterx.ui.layout.values.Rectangle;
|
||||||
|
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public class VerticalScroll<R extends ComponentRenderer, RS extends ScrollerRenderer> extends Component<R> {
|
public class VerticalScroll<R extends ComponentRenderer, RS extends ScrollerRenderer> extends Component<R> {
|
||||||
protected Component<?> child;
|
protected Component<?> child;
|
||||||
protected final RS scrollerRenderer;
|
protected final RS scrollerRenderer;
|
||||||
|
@ -71,17 +74,6 @@ public class VerticalScroll<R extends ComponentRenderer, RS extends ScrollerRend
|
||||||
updateScrollViewMetrics();
|
updateScrollViewMetrics();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
boolean mouseEvent(MouseEvent event, int x, int y) {
|
|
||||||
if (!onMouseEvent(event, x, y)) {
|
|
||||||
if (child != null) {
|
|
||||||
if (child.mouseEvent(event, x - relativeBounds.left, y - relativeBounds.top - scrollerOffset()))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderInBounds(
|
protected void renderInBounds(
|
||||||
PoseStack poseStack,
|
PoseStack poseStack,
|
||||||
|
@ -113,27 +105,6 @@ public class VerticalScroll<R extends ComponentRenderer, RS extends ScrollerRend
|
||||||
private int mouseDownY = 0;
|
private int mouseDownY = 0;
|
||||||
private int scrollerDownY = 0;
|
private int scrollerDownY = 0;
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onMouseEvent(MouseEvent event, int x, int y) {
|
|
||||||
if (event == MouseEvent.DOWN) {
|
|
||||||
Rectangle scroller = scrollerRenderer.getScrollerBounds(relativeBounds);
|
|
||||||
Rectangle picker = scrollerRenderer.getPickerBounds(scroller, saveScrollerY(), scrollerHeight);
|
|
||||||
if (picker.contains(x, y)) {
|
|
||||||
mouseDown = true;
|
|
||||||
mouseDownY = y;
|
|
||||||
scrollerDownY = saveScrollerY();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else if (event == MouseEvent.UP) {
|
|
||||||
mouseDown = false;
|
|
||||||
} else if (event == MouseEvent.DRAG && mouseDown) {
|
|
||||||
int delta = y - mouseDownY;
|
|
||||||
scrollerY = scrollerDownY + delta;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return mouseDown;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void updateScrollViewMetrics() {
|
protected void updateScrollViewMetrics() {
|
||||||
final int view = relativeBounds.height;
|
final int view = relativeBounds.height;
|
||||||
final int content = child.relativeBounds.height;
|
final int content = child.relativeBounds.height;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package org.betterx.ui.layout.components;
|
package org.betterx.ui.layout.components;
|
||||||
|
|
||||||
|
|
||||||
import org.betterx.ui.layout.components.input.MouseEvent;
|
|
||||||
import org.betterx.ui.layout.components.input.RelativeContainerEventHandler;
|
import org.betterx.ui.layout.components.input.RelativeContainerEventHandler;
|
||||||
import org.betterx.ui.layout.components.render.ComponentRenderer;
|
import org.betterx.ui.layout.components.render.ComponentRenderer;
|
||||||
import org.betterx.ui.layout.values.Alignment;
|
import org.betterx.ui.layout.values.Alignment;
|
||||||
|
@ -11,10 +10,14 @@ import org.betterx.ui.layout.values.Rectangle;
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import net.minecraft.client.gui.components.events.GuiEventListener;
|
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.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public class VerticalStack<R extends ComponentRenderer> extends Component<R> implements RelativeContainerEventHandler {
|
public class VerticalStack<R extends ComponentRenderer> extends Component<R> implements RelativeContainerEventHandler {
|
||||||
protected final List<Component<?>> components = new LinkedList<>();
|
protected final List<Component<?>> components = new LinkedList<>();
|
||||||
|
|
||||||
|
@ -113,17 +116,6 @@ public class VerticalStack<R extends ComponentRenderer> extends Component<R> imp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
boolean mouseEvent(MouseEvent event, int x, int y) {
|
|
||||||
if (!onMouseEvent(event, x, y)) {
|
|
||||||
for (Component<?> c : components) {
|
|
||||||
if (c.mouseEvent(event, x - relativeBounds.left, y - relativeBounds.top))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static VerticalStack<?> centered(Component<?> c) {
|
public static VerticalStack<?> centered(Component<?> c) {
|
||||||
return new VerticalStack<>(DynamicSize.relative(1), DynamicSize.relative(1)).addFiller().add(c).addFiller();
|
return new VerticalStack<>(DynamicSize.relative(1), DynamicSize.relative(1)).addFiller().add(c).addFiller();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,10 @@ import org.betterx.ui.layout.values.Rectangle;
|
||||||
|
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public interface ComponentRenderer {
|
public interface ComponentRenderer {
|
||||||
void renderInBounds(PoseStack stack, int x, int y, float a, Rectangle bounds, Rectangle clipRect);
|
void renderInBounds(PoseStack stack, int x, int y, float a, Rectangle bounds, Rectangle clipRect);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,10 @@ package org.betterx.ui.layout.components.render;
|
||||||
|
|
||||||
import org.betterx.ui.layout.values.Rectangle;
|
import org.betterx.ui.layout.values.Rectangle;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public interface ScrollerRenderer {
|
public interface ScrollerRenderer {
|
||||||
default int scrollerHeight() {
|
default int scrollerHeight() {
|
||||||
return 16;
|
return 16;
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
package org.betterx.ui.layout.values;
|
package org.betterx.ui.layout.values;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public enum Alignment {
|
public enum Alignment {
|
||||||
MIN, MAX, CENTER
|
MIN, MAX, CENTER
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
package org.betterx.ui.layout.values;
|
package org.betterx.ui.layout.values;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public class DynamicSize {
|
public class DynamicSize {
|
||||||
private SizeType sizeType;
|
private SizeType sizeType;
|
||||||
private int calculatedSize;
|
private int calculatedSize;
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
package org.betterx.ui.layout.values;
|
package org.betterx.ui.layout.values;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public class Rectangle {
|
public class Rectangle {
|
||||||
public static final Rectangle ZERO = new Rectangle(0, 0, 0, 0);
|
public static final Rectangle ZERO = new Rectangle(0, 0, 0, 0);
|
||||||
public final int left;
|
public final int left;
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
package org.betterx.ui.layout.values;
|
package org.betterx.ui.layout.values;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
|
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public interface SizeType {
|
public interface SizeType {
|
||||||
FitContent FIT_CONTENT = new FitContent();
|
FitContent FIT_CONTENT = new FitContent();
|
||||||
FitContentOrFill FIT_CONTENT_OR_FILL = new FitContentOrFill();
|
FitContentOrFill FIT_CONTENT_OR_FILL = new FitContentOrFill();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue