Package org.moddingx.libx.screen.text
Interface ComponentLayout
public interface ComponentLayout
A layout that aligns components on a
TextScreen
.-
Method Summary
Modifier and TypeMethodDescriptionalignComponents
(net.minecraft.client.gui.Font font, int width) Aligns some components for the screen.static ComponentLayout
simple
(net.minecraft.network.chat.Component... content) Creates a simpleComponentLayout
that aligns the given components below each other.static ComponentLayout
simple
(net.minecraft.network.chat.Component title, List<net.minecraft.network.chat.Component> content) Creates a simpleComponentLayout
that aligns the given components below each other.default net.minecraft.network.chat.Component
title()
Gets the screen title if available.
-
Method Details
-
title
Gets the screen title if available. -
alignComponents
Aligns some components for the screen.- Parameters:
font
- The font that is used to display the content.width
- The available screen width
-
simple
Creates a simpleComponentLayout
that aligns the given components below each other. -
simple
static ComponentLayout simple(@Nullable net.minecraft.network.chat.Component title, List<net.minecraft.network.chat.Component> content) Creates a simpleComponentLayout
that aligns the given components below each other. The title is displayed centered above the other text.
-