Script v1_7_1_0
- AI
- Animals
- Collections
- Contracts
- Debug
- Economy
- Elements
- EnvironmentalScore
- Errors
- Events
- GUI
- AnimalScreen
- AnimationElement
- BitmapElement
- BoxLayoutElement
- BreadcrumbsElement
- ButtonElement
- ButtonOverlay
- ChatWindow
- CheckedOptionElement
- ClearElement
- ColorPickButtonElement
- ConstructionScreen
- ContextActionDisplay
- ControlBarDisplay
- DialogElement
- DynamicFadedBitmapElement
- FillLevelsDisplay
- FlowLayoutElement
- FocusManager
- FrameElement
- FrameReferenceElement
- GameInfoDisplay
- GameInfoDisplayMobile
- GamePausedDisplay
- Gui
- GuiDataSource
- GuiElement
- GuiMixin
- GuiOverlay
- GuiProfile
- GuiSoundPlayer
- GuiTopDownCamera
- GuiTopDownCursor
- GuiUtils
- HUDDisplayElement
- HUDElement
- HUDFrameElement
- HUDPopupMessage
- HUDSliderElement
- HUDTextDisplay
- IndexChangeSubjectMixin
- IndexStateElement
- InfoDisplay
- InfoHUDBox
- InGameIcon
- IngameMap
- IngameMapElement
- InputGlyphElement
- InputGlyphElementUI
- InputHelpDisplay
- KeyValueInfoHUDBox
- ListElement
- ListItemElement
- MapOverlayGenerator
- MixerWagonHUDExtension
- MultiTextOptionElement
- MultiValueTween
- Overlay
- PagingElement
- PictureElement
- PlatformIconElement
- PlayerControlPadDisplay
- PlaySampleMixin
- RenderElement
- RoundStatusBar
- ScreenElement
- ScrollingLayoutElement
- SettingsModel
- SideNotification
- SideNotificationMobile
- SliderElement
- SpeakerDisplay
- SpeedMeterDisplay
- SpeedSliderDisplay
- StatusBar
- SteeringSliderDisplay
- TabbedMenu
- TabbedMenuFrameElement
- TabbedMenuWithDetails
- TableElement
- TableHeaderElement
- TerrainLayerElement
- TextBackdropElement
- TextElement
- TextInputElement
- ThreePartBitmapElement
- TimerElement
- ToggleButtonElement
- TopNotification
- Tween
- TweenSequence
- VariableWorkWidthHUDExten...
- VehicleHUDExtension
- VehicleSchemaDisplay
- VideoElement
- WardrobeScreen
- Handtools
- Hud
- I3d
- Input
- Jobs
- Maps
- Materials
- Misc
- Objects
- Parameters
- Placeables
- Placement
- Player
- Shop
- Sounds
- Specialization
- Specializations
- StateMachine
- Statistics
- Tasks
- Triggers
- Utils
- Vehicles
Engine v1_7_1_0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- general
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- NoteNode
- Overlays
- Particle System
- Physics
- Rendering
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- VoiceChat
- XML
Foundation Reference
PlatformIconElement
DescriptionDisplay a platform icon, depending on current and set platform.Parent
BitmapElementFunctions
copyAttributes
DescriptionDefinitioncopyAttributes()Code
31 | function PlatformIconElement:copyAttributes(src) |
32 | PlatformIconElement:superClass().copyAttributes(self, src) |
33 | |
34 | self.platformId = src.platformId |
35 | end |
delete
DescriptionDefinitiondelete()Code
25 | function PlatformIconElement:delete() |
26 | PlatformIconElement:superClass().delete(self) |
27 | end |
new
DescriptionDefinitionnew()Code
17 | function PlatformIconElement.new(target, custom_mt) |
18 | local self = PlatformIconElement:superClass().new(target, custom_mt or PlatformIconElement_mt) |
19 | |
20 | return self |
21 | end |
setPlatformId
DescriptionSet the terrain layer to renderDefinition
setPlatformId()Code
39 | function PlatformIconElement:setPlatformId(platformId) |
40 | local useOtherIcon = false |
41 | |
42 | -- On some platforms we can only show the icon for the same platform |
43 | if GS_PLATFORM_ID == PlatformId.PS4 or GS_PLATFORM_ID == PlatformId.PS5 then |
44 | if platformId ~= PlatformId.PS4 and platformId ~= PlatformId.PS5 then |
45 | useOtherIcon = true |
46 | end |
47 | elseif GS_PLATFORM_ID == PlatformId.XBOX_ONE or GS_PLATFORM_ID == PlatformId.XBOX_SERIES then |
48 | if platformId ~= PlatformId.XBOX_ONE and platformId ~= PlatformId.XBOX_SERIES then |
49 | useOtherIcon = true |
50 | end |
51 | end |
52 | |
53 | if useOtherIcon then |
54 | platformId = 0 |
55 | end |
56 | |
57 | self:setImageUVs(nil, unpack(GuiUtils.getUVs(PlatformIconElement.UVS[platformId]))) |
58 | end |