net.kernelpanicsoft.archie.gui.composables.basic¶
Types¶
ProgressDirection¶
enum ProgressDirection : Enum<ProgressDirection>
Which edge of a ProgressBar/net.kernelpanicsoft.archie.gui.composables.basic.EnergyBar the fill grows from.
Functions¶
Divider¶
Draws a thin horizontal or vertical separator line.
EnergyBar¶
@Composable
fun EnergyBar(
storage: ArchieEnergyStorage,
modifier: Modifier = Modifier,
direction: ProgressDirection = ProgressDirection.BOTTOM_TO_TOP,
fillColor: Int = 0xFFFF5C33.toInt(),
variant: String = ThemeVariants.DEFAULT
)
Convenience overload reading directly from an ArchieEnergyStorage.
A themed energy-level indicator (looked up in the current theme as "energy_bar"), filled with a solid color up to energy / capacity.
FluidTank¶
A themed fluid-level indicator (looked up in the current theme as "fluid_tank"): a tank frame sprite with the real fluid texture and tint (via FluidStackHooks) filling it bottom-up to fluid.amount / capacity.
getTextSize¶
fun getTextSize(
text: Component,
scale: Float = 1.0f,
font: Font = requireMinecraftClient.font
): Size
HorizontalDivider¶
@Stable
@Composable
fun HorizontalDivider(
modifier: Modifier = Modifier,
color: Int = KColor.GRAY.argb,
thickness: Int = 1
)
Convenience horizontal divider.
Icon¶
Convenience wrapper around Texture for fixed-size icon sprites.
Label¶
ProgressBar¶
@Composable
fun ProgressBar(
progress: Float,
modifier: Modifier = Modifier,
direction: ProgressDirection = ProgressDirection.LEFT_TO_RIGHT,
fillColor: Int = 0xFF6BA8FF.toInt(),
variant: String = ThemeVariants.DEFAULT
)
A themed linear progress indicator: an empty-track sprite from the current theme (looked up as "progress_bar"), filled with a solid color up to progress.
Spacer¶
An invisible layout composable that expands to fill available space.
Text¶
Renders a Component using Minecraft's font renderer.
Texture¶
Renders a sprite or texture region using UV coordinates.
VerticalDivider¶
@Stable
@Composable
fun VerticalDivider(
modifier: Modifier = Modifier,
color: Int = KColor.GRAY.argb,
thickness: Int = 1
)
Convenience vertical divider.