EnergyBar¶
A themed energy-level indicator (looked up in the current theme as "energy_bar"), filled with a solid color up to energy / capacity.
Shares ProgressBar's rendering core but defaults to a bottom-up fill and an energy-flavored color, matching how most tech mods orient a power gauge.
Parameters¶
-
energy: The current stored amount (see
ArchieEnergyStorage.getStoredAmount). -
capacity: The maximum capacity (see
ArchieEnergyStorage.getCapacity); a non-positive value renders as empty rather than dividing by zero. -
modifier: Additional modifiers applied to the outer container.
-
direction: Which edge the fill grows from.
-
fillColor: ARGB color of the filled portion.
-
variant: The theme variant used for the track texture.
@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.