LUADOC - Farming Simulator 22

SideNotificationMobile

Description
HUD side notification element for mobile version Custom sub class of side notification with different uv's and text size
Parent
SideNotification
Functions

createBackground

Description
Create the background overlay.
Definition
createBackground()
Code
33function SideNotificationMobile:createBackground(hudAtlasPath)
34 local overlay = SideNotificationMobile:superClass().createBackground(self, hudAtlasPath)
35
36 overlay:setUVs(GuiUtils.getUVs(SideNotificationMobile.UV.DEFAULT_BACKGROUND))
37 overlay:setColor(unpack(SideNotificationMobile.COLOR.DEFAULT_BACKGROUND))
38
39 return overlay
40end

new

Description
Create a new SideNotificationMobile.
Definition
new(string hudAtlasPath)
Arguments
stringhudAtlasPathPath to the HUD atlas texture
Return Values
tableSideNotificationMobileinstance
Code
19function SideNotificationMobile.new(hudAtlasPath)
20 return SideNotificationMobile:superClass().new(SideNotificationMobile_mt, hudAtlasPath)
21end

storeScaledValues

Description
Store scaled positioning, size and offset values.
Definition
storeScaledValues()
Code
25function SideNotificationMobile:storeScaledValues()
26 SideNotificationMobile:superClass().storeScaledValues(self)
27
28 self.textSize = self:scalePixelToScreenHeight(SideNotificationMobile.TEXT_SIZE.DEFAULT_NOTIFICATION)
29end