drawSystemBar

open fun drawSystemBar(ship: ShipAPI, intendedColor: Color, fill: Float, blendTime: Float)

Draws a small UI bar next to the ship's system

    MagicUI.drawSystemBar(
        ship,
        new Color(255,0,0),
        shieldTime/MAX_SHIELD_TIME,
        0
);

Parameters

ship

Ship concerned (the element will only be drawn if that ship is the player ship)

intendedColor

Color of the filling. If null, the filling will be UI-green

fill

Filling level

blendTime

Time to smoothly switch between colors. Can be set to 0 for instant changes


open fun drawSystemBar(ship: ShipAPI, boxLoc: Vector2f, intendedColor: Color, fill: Float, blendTime: Float)

Draws a small UI bar at a given location.

Parameters

ship

Ship concerned (the element will only be drawn if that ship is the player ship)

boxLoc

Where to draw the bar.

intendedColor

Color of the filling. If null, the filling will be UI-green

fill

Filling level

blendTime

Time to smoothly switch between colors. Can be set to 0 for instant changes