Skip to main content
Skip to main content

InfoDisplay

InfoDisplay

Description

HUD player information

Parent

HUDDisplay

Functions

getDisplayHeight

Description

Definition

getDisplayHeight()

Code

function InfoDisplay:getDisplayHeight()
if self.isEnabled then
return self.totalHeight
else
return 0
end
end

setScale

Description

Set this element's UI scale factor.

Definition

setScale(float uiScale)

Arguments

floatuiScaleUI scale factor

Code

function InfoDisplay:setScale(uiScale)
InfoDisplay:superClass().setScale( self , uiScale)

for _, box in ipairs( self.boxes) do
box:setScale(uiScale)
end
end

storeScaledValues

Description

Store scaled position and size values.

Definition

storeScaledValues()

Code

function InfoDisplay:storeScaledValues()
self:setPosition(g_hudAnchorRight, g_hudAnchorBottom)

self.boxMarginY = self:scalePixelToScreenHeight( 5 )
end