Skip to content

net.kernelpanicsoft.archie.gui.composables.basic

Functions

getTextSize

fun getTextSize(
    text: Component, 
    scale: Float = 1.0f, 
    font: Font = Minecraft.getInstance().font
): Size

Returns the rendered pixel size (width × height) of text at the given scale.

Spacer

@Composable



fun Spacer(modifier: Modifier = Modifier)

An invisible layout composable that expands to fill available space.

Text

@Composable



fun Text(
    text: Component, 
    fontScale: Float = 1.0f, 
    font: Font = Minecraft.getInstance().font, 
    color: Int = 0xFFFFFFFF.toInt(), 
    modifier: Modifier = Modifier
)

Renders a Component using Minecraft's font renderer.

Texture

@Composable



fun Texture(
    loc: ResourceLocation, 
    uOffset: Float, 
    vOffset: Float, 
    u: Int, 
    v: Int, 
    textureWidth: Int, 
    textureHeight: Int, 
    modifier: Modifier = Modifier
)

Renders a sprite region from a texture atlas using UV coordinates.