MagicUI

open class MagicUI

Draws a small UI charge-bar/tick box next to the normal ship-system for special systems.

Author

Dark.Revenant, Tartiflette, LazyWizard, Snrasha

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun addBar(ship: ShipAPI, fill: Float, innerColor: Color, borderColor: Color, secondFill: Float, screenPos: Vector2f)
open fun addBar(ship: ShipAPI, fill: Float, innerColor: Color, borderColor: Color, secondFill: Float, screenPos: Vector2f, boxHeight: Float, boxWidth: Float, drawBorders: Boolean)
Draws a UI bar.
Link copied to clipboard
open fun addInterfaceStatusBar(ship: ShipAPI, boxLoc: Vector2f, fill: Float, innerColor: Color, borderColor: Color, secondfill: Float)
Draws a small UI bar above the flux bar.
Link copied to clipboard
open fun addInterfaceStatusNumber(ship: ShipAPI, number: Int, numberPos: Vector2f)
Draw number at the right of the percent bar.
Link copied to clipboard
open fun addInterfaceStatusText(ship: ShipAPI, text: String, textLoc: Vector2f)
Draw the text with the font victor14.
Link copied to clipboard
open fun addStatusText(ship: ShipAPI, text: String, textColor: Color, screenPos: Vector2f)
Draw text with the font victor10 where you want on the screen.
Link copied to clipboard
open fun addText(ship: ShipAPI, text: String, textColor: Color, screenPos: Vector2f, openGLStack: Boolean)
Draw text with the font Victor14 where you want on the screen.
Link copied to clipboard
open fun addTextNonScaling(ship: ShipAPI, text: String, textColor: Color, screenPos: Vector2f, openGLStack: Boolean)
Draw text with the font Victor14 where you want on the screen.
Link copied to clipboard
open fun closeGL11ForText()
GL11 to close, when you want render text of Lazyfont.
Link copied to clipboard
GL11 to end after rendering LazyFont text.
Link copied to clipboard
Ends OpenGL state for rendering in HUD coordinates Will do nothing if setViewportOpenGLCalls is set to false.
Link copied to clipboard
open fun drawHUDStatusBar(ship: ShipAPI, fill: Float, innerColor: Color, borderColor: Color, secondfill: Float, bottext: String, toptext: String, offset: Boolean)
Draw a status bar next to the player ship on the top left corner of the hud Can write two bits of text on its left side
Link copied to clipboard
open fun drawInterfaceStatusBar(ship: ShipAPI, fill: Float, innerColor: Color, borderColor: Color, secondFill: Float, text: String, number: Int)
Draw a third status bar above the Flux and Hull ones on the User Interface.
open fun drawInterfaceStatusBar(ship: ShipAPI, statusBarLoc: Vector2f, fill: Float, innerColor: Color, borderColor: Color, secondFill: Float, text: String, number: Int)
open fun drawInterfaceStatusBar(ship: ShipAPI, key: String, statusBarLoc: Vector2f, fill: Float, innerColor: Color, borderColor: Color, secondFill: Float, text: String, number: Int)
Draw a status bar at the desired position.
open fun drawInterfaceStatusBar(ship: ShipAPI, key: String, fill: Float, innerColor: Color, borderColor: Color, secondFill: Float, text: String, number: Int)
Draw a status bar above the Flux and Hull ones on the User Interface.
Link copied to clipboard
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
);
open fun drawSystemBar(ship: ShipAPI, boxLoc: Vector2f, intendedColor: Color, fill: Float, blendTime: Float)
Draws a small UI bar at a given location.
Link copied to clipboard
open fun drawSystemBox(ship: ShipAPI, intendedColor: Color, blendTime: Float)
Draws a small UI box next to the ship's system
open fun drawSystemBox(ship: ShipAPI, boxLoc: Vector2f, intendedColor: Color, blendTime: Float)
Draws a small UI box at a given location.
Link copied to clipboard
open fun getHUDRightOffset(ship: ShipAPI): Vector2f
Calculates a position above the selected weapon group in the HUD.
Link copied to clipboard
open fun getInterfaceOffsetFromStatusBars(ship: ShipAPI, variant: ShipVariantAPI): Vector2f
Get the UI Element Offset for the Third bar.
Link copied to clipboard
open fun getInterfaceOffsetFromSystemBar(ship: ShipAPI, variant: ShipVariantAPI): Vector2f
Get the UI Element Offset for the Shipsystem bar.
Link copied to clipboard
open fun getTextWidth(text: String): Float
Link copied to clipboard
Gets unscaled text width by unscaling the Victor14 font and then rescaling it.
Link copied to clipboard
open fun getUIElementOffset(ship: ShipAPI, variant: ShipVariantAPI, vec1: Vector2f, vec2: Vector2f): Vector2f
Get the UI Element Offset.
Link copied to clipboard
open fun openGL11ForText()
GL11 to start, when you want render text of Lazyfont.
Link copied to clipboard
GL11 to start rendering LazyFont text.
Link copied to clipboard
Sets OpenGL state for rendering in HUD coordinates Will do nothing if setViewportOpenGLCalls is set to false.
Link copied to clipboard
open fun scale(source: Vector2f): Vector2f
open fun scale(source: Vector2f, dest: Vector2f): Vector2f
Scales the vector by the UI_SCALING value.
open fun scale(source: Float): Float
Multiplies the float by the UI_SCALING value.
Link copied to clipboard
open fun scaledCopy(vec: Vector2f): Vector2f
Copies a vector and scales it by UI_SCALING.
Link copied to clipboard
open fun scaledVector(x: Float, y: Float): Vector2f
Scales two parameters by UI_SCALING into a Vector2f.
Link copied to clipboard
open fun setTextAligned(alignment: TextAlignment)
Link copied to clipboard
Remember to UNSET THIS after your rendering.
Link copied to clipboard
open fun shouldDrawHUD(ship: ShipAPI): Boolean

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val PERCENTBARPAD: Vector2f
Link copied to clipboard
val PERCENTBARVEC1: Vector2f
Link copied to clipboard
val PERCENTBARVEC2: Vector2f
Link copied to clipboard
Link copied to clipboard
val SYSTEMBARVEC1: Vector2f
Link copied to clipboard
val SYSTEMBARVEC2: Vector2f
Link copied to clipboard
open var TODRAW10: DrawableString
Link copied to clipboard
open var TODRAW14: DrawableString
Link copied to clipboard