118 KiB
Module api.gui🔗
Contains all GUI functionality apart from react.
[Expand All] [Collapse All]
global record Gui fireReactEvent: function(name : string, param : any)
fireGuiScriptEvent: function(id : string, name : string, param : any): any
record HighlightStyle Square: HighlightStyle
Circle: HighlightStyle
end
record SpawnHudImageParams iconPath: FilePath
color: Vec4f
entity: Engine.Entity
position: Vec3f
end
spawnEphemeralHudImage: function(iconPath : FilePath, entity : Engine.Entity, color : Vec4f, position : Vec3f, overrideDuration : number, fadeIn : boolean, fadeOut : boolean, rev0 : integer)
spawnEphemeralHudImageOnPath: function(iconPath : FilePath, pos0 : Vec3f, pos1 : Vec3f, pos0 : Vec3f, pos1 : Vec3f, speed : number, scale : number, maxDistance : number)
closeAllWindows: function()
record SelectionDetails new: function(): SelectionDetails
record Type None: Type
Line: Type
Station: Type
Signal: Type
Stop: Type
Waypoint: Type
TransportNetworkEdge: Type
World: Type
Marker: Type
Town: Type
end
interface DataType kind: Type
end
record Line line: Engine.Entity
stop: integer
waypoint: integer
end
record Station new: function(): Station
stationGroup: Engine.Entity
flatStationTerminalIndex: integer
stationTerminal: StationTerminal
end
record Signal signalList: Engine.Entity
signalIndex: integer
end
record Stop new: function(): Stop
station: SelectionDetails.Station
line: Engine.Entity
stopIndex: integer
end
record Waypoint line: Engine.Entity
stopIndex: integer
waypointIndex: integer
tag: integer
end
record TransportNetworkEdge new: function(): TransportNetworkEdge
snap: EdgePos
end
record World new: function(): World
pos: Vec3f
water: boolean
end
record Marker new: function(): Marker
marker: string
fireSelectEntity: boolean
pos: Vec3f
entity: Engine.Entity
end
record Town new: function(): Town
townEntity: Engine.Entity
districtType: LandUseType
districtCenter: Vec3f
end
data: DataType
end
record WorldEvent pos: {number, number, number}
water: boolean
end
record Mouse record Event record Type Pressed: Type
Released: Type
Clicked: Type
Entered: Type
Exited: Type
Moved: Type
Wheel: Type
DoubleClicked: Type
PressedOutside: Type
end
type: Type
button: integer
x: integer
y: integer
xrel: integer
yrel: integer
handled: boolean
end
getTerrainPosition: function(): Vec3f
hasTerrainPosition: function(): boolean
end
record Key record State Up: State
Pressed: State
end
record InputEvent dir: State
repeated: boolean
isGamepadEvent: function(InputEvent): boolean
isKeyboardEvent: function(InputEvent): boolean
getKey: function(InputEvent): integer
getKeyMod: function(InputEvent): integer
end
record Event data: InputEvent
isPressed: function(Event): boolean
end
end
record DataTransferItem new: function(ResName, any): DataTransferItem
type: ResName
data: any
end
record DnD record Event record Type Drop: Type
DragStarted: Type
DragEntered: Type
DragExited: Type
end
type: Type
end
setCursor: function(cursor : integer)
addTransferData: function(dragStartEvent : Event, item : DataTransferItem)
getAllTransferData: function(): {DataTransferItem}
end
record InputAction record InputActionState Disabled: InputActionState
Inactive: InputActionState
Enabled: InputActionState
end
record InvokeData record Status Triggered: Status
Repeat: Status
PressedStep: Status
EndReleased: Status
EndAborted: Status
end
status: Status
end
modifierOnlyActionIsActive: function(inputActionId : string): boolean
hasConflicts: function(keyCmdDefinitions : {string : {KeyComboDef}}, inputActionId : string, keyComboDef : KeyComboDef): string
findDuplicatesOf: function(inputActionId : string): {string}
getFixedKeyCmdDefs: function(keyCmdDefinitions : {string : {KeyComboDef}}, inputActionId : string, keyComboDef : KeyComboDef): {string : {KeyComboDef}}
end
record ById setVisibilityByClass: function(idOrTag : string, visible : boolean, idOnly : boolean)
setEnabled: function(idOrTag : string, enabled : boolean, idOnly : boolean)
setHighlighted: function(idOrTag : string, highlighted : boolean, style : HighlightStyle, color : Vec3f, idOnly : boolean)
isVisible: function(id : string): boolean
isVisibleRecursive: function(id : string): boolean
setVisible: function(id : string, visible : boolean)
resetMovedWindowPosition: function(id : string)
getSize: function(id : string): Vec2f
end
record Camera setManualCamera: function(center : Vec2f, distance : number)
getCameraData: function(): Vec5f
setCameraData: function(Vec5f : Vec5f)
getHeightAboveTerrain: function(): number
focusEntity: function(entity : Engine.Entity)
focusPosition: function(position : Vec3f, distance : number)
takeScreenshot: function(scale : integer)
getFollowEntity: function(): {Engine.Entity, Engine.Revision}
followEntity: function(entity : Engine.Entity, jump : boolean)
enterFollowCameraCockpit: function(entity : Engine.Entity)
leaveFollowCameraCockpit: function()
isFreeCameraMouseAttached: function(): boolean
toggleFreeCameraMouseAttachment: function()
toggleFreeCamera: function()
world2Screen: function(Vec3f): Vec2i
screen2World: function(Vec3f): Vec3f
getEye: function(): Vec3f
getCenter: function(): Vec3f
getNearFar: function(): Vec2f
getSize: function(): Vec2i
traceToTerrain: function(worldPos : Vec3f, farPos : Vec3f, zOffset : number, numSteps : integer): Vec3f | nil
end
record Sound letVehicleHorn: function(vehicleEntity : Engine.Entity)
playRandomSoundEffect: function(paths : {FilePath})
end
record MusicPlayer goBack: function()
goForward: function()
togglePause: function()
getTitle: function(): string
getArtist: function(): string
hasPlaylist: function(): boolean
getPlaylistIndex: function(): integer
setTrackListFromPlayList: function(playlist : string, startPaused : boolean, offset : number)
setPlaylist: function(playlist : string)
getPlaylist: function(): string
isPlaying: function(): boolean
playTrack: function(trackName : string, offset : number)
playTrackFile: function(filePath : string, offset : number)
getTrackLength: function(): number
getTrackElapsedTime: function(): number
getGain: function(): number
setGain: function(gain : number)
setTrackList: function(trackList : {{string, string, boolean}}, enableRepeat : boolean)
addTrackList: function(trackList : {{string, string, boolean}}, enableRepeat : boolean)
setContextTag: function(contextTag : string)
end
record VoiceOverManager stop: function()
play: function(voiceOverRes : string, delayInSeconds : number)
isPlaying: function(voiceOverRes : string): boolean
isPlayingAny: function(): boolean
getPlaying: function(): ResName
end
record ByEntity isLineEmptyOrVisible: function(Engine.Entity : Engine.Entity): boolean
isVisible: function(Engine.Entity : Engine.Entity): boolean
isVehicleVisible: function(Engine.Entity : Engine.Entity): boolean
end
record ContextHelper record SubjectState Visible: SubjectState
Focused: SubjectState
end
collectSubjectStates: function(idsOfInterest : {string}): {string : SubjectState}
getIdsOfActiveTool: function(): {string}
end
record Construction setAngle: function(angle : number)
modify: function(construction : Engine.Entity)
getBrushIcons: function(): {string}
provideDustWheneverPossible: function(proposal : Proposal, proposalData : ProposalData)
getRefundableEntities: function(): {{Engine.Entity, integer}, {Engine.Revision, integer}}
updateRefundableEntities: function(resultEntities : {Engine.Entity}, proposal : Proposal.StreetProposal)
end
record Mission getMission: function(): string
getCampaign: function(): string
setZone: function(key : string, polygon : {Vec2f}, draw : boolean, drawColor : Vec4f, prohibitBuilding : boolean, playAnimation : boolean, zOffset : number)
setZoneCircle: function(key : string, center : Vec2f, radius : number, draw : boolean, drawColor : Vec4f, prohibitBuilding : boolean, playAnimation : boolean, zOffset : number)
removeZone: function(key : string)
setMarkerAtPosition: function(key : string, pos : Vec3f, type : string, scaling : number, isSelectable : boolean, fireSelectEntity : boolean)
setMarkerAtEntity: function(key : string, entity : Engine.Entity, type : string, scaling : number, isSelectable : boolean, fireSelectEntity : boolean)
removeMarker: function(key : string)
setMovePathVisualizationAtEntity: function(key : string, entity : Engine.Entity, color : Vec3f)
removeMovePathVisualization: function(key : string)
playCutscene: function(filePath : string, resolveLanguageFolder : boolean, entityToEntityMap : {Engine.Entity : Engine.Entity})
isCutscenePlaying: function(): boolean
getCutsceneElapsedTime: function(): number
end
record Game isSavegameUIBlocked: function(): boolean
setInGameMenuPause: function(pause : boolean)
getGuiSaveData: function(modId : string): {<any type> : <any type>}
setGuiSaveData: function(modId : string, data : {<any type> : <any type>})
getEstimatedMaximumGameSpeed: function(): integer
isMapEditor: function(): boolean
getDefaultSavegameId: function(): string
setEnvironment: function(environment : ResName)
getEnvironment: function(): ResName
end
record Guide record GuidePosition Left: GuidePosition
Right: GuidePosition
Above: GuidePosition
Below: GuidePosition
end
record FreeGuidePosition High: FreeGuidePosition
Low: FreeGuidePosition
end
record GuideTarget new: function(string, GuidePosition): GuideTarget
idOrTag: string
position: GuidePosition
end
trySpawnGuideById: function({GuideTarget}, string, string): boolean
trySpawnGuideFree: function(FreeGuidePosition, string, string): boolean
completeGuideById: function({GuideTarget}): boolean
end
record Rendering setEnvironment: function(environment : Environment)
getEnvironment: function(): Environment
spawnDust: function(bbMin : Vec3f, bbMax : Vec3f, transf : Mat4f)
getFrameTime01: function(): number
end
record Map setMapSeedText: function(seed : string)
reloadMaterialIndexManagerPipeline: function()
openTerrainEditor: function()
closeTerrainEditor: function()
end
record BenchMark record SimTime frameTime: integer
gameTime: integer
end
getBeginFrameTimes: function(): {integer}
getEventTimes: function(): {integer}
getCoreStepTimes: function(): {integer}
getRenderTimes: function(): {integer}
getSwapTimes: function(): {integer}
getReplicateTimes: function(): {SimTime}
getCommandTimes: function(): {SimTime}
getGameStepTimes: function(): {SimTime}
end
record Debug selectEntity: function(entity : Engine.Entity)
end
record Achievements areStatsDisabled: function(): boolean
unlockAchievement: function(achievement : string)
isAchievementUnlockable: function(achievement : string): boolean
isAchievementUnlocked: function(achievement : string): boolean
updateStat: function(playerStat : string, value : number)
setStat: function(playerStat : string, value : number)
getStatValue: function(playerStat : string): number
setStatExtraData: function(playerStat : string, data : {<any type> : <any type>})
getStatExtraData: function(playerStat : string): {<any type> : <any type>}
setEarnedSFX: function(sfx : {FilePath})
end
record GenericRep getAllOfType: function(typeName : string, includeInvisible : boolean): {integer}
end
record Backend record LegalDocument title: string
text: string
end
isInitialized: function(): boolean
hasLegalDocuments: function()
getLegalDocuments: function(): {PdxLegalDocumentType}
isAccountLoggedIn: function(): boolean
loginAccount: function(string, string): PdxFuture<PdxLoginResult>
logoutAccount: function(): PdxFuture<PdxResult>
getAccountInfo: function(): PdxFuture<PdxAccountInfo>
getProfile: function(boolean): PdxFuture<PdxProfileResult>
createProfile: function(string, boolean): PdxFuture<PdxResult>
renameProfile: function(string, boolean): PdxFuture<PdxResult>
getCountries: function(): {PdxCountry}
getLegalDocument: function(PdxLegalDocumentType): PdxFuture<PdxLegalDocument>
createAccount: function(string, string, string, integer, boolean): PdxFuture<PdxResult>
supportsAccountLinking: function(): boolean
getThirdPartyLinkState: function(): PdxFuture<PdxThirdPartyLinkState>
getThirdPartyAutoLoginPromptState: function(): PdxThirdPartyAutoLoginPromptState
setThirdPartyAutoLoginPromptState: function(PdxThirdPartyAutoLoginPromptState)
linkThirdPartyAccount: function(): PdxFuture<PdxResult>
unlinkThirdPartyAccount: function(): PdxFuture<PdxResult>
loginThirdPartyAccount: function(): PdxFuture<PdxLoginResult>
end
mouse: Mouse
key: Key
dnd: DnD
inputAction: InputAction
byId: ById
camera: Camera
sound: Sound
musicPlayer: MusicPlayer
backend: Backend
voiceOverManager: VoiceOverManager
byEntity: ByEntity
contextHelper: ContextHelper
construction: Construction
mission: Mission
guide: Guide
game: Game
map: Map
benchMark: BenchMark
rendering: Rendering
debug: Debug
achievements: Achievements
genericRep: GenericRep
StyleSheet: StyleSheet
NinePatch: NinePatch
end
global record NinePatch new: function(): NinePatch
fileName: string
horizontal: {integer}
vertical: {integer}
flipHorizontally: boolean
repeatHorizontally: boolean
repeatVertically: boolean
repeatFactor: number
end
global record StyleSheet new: function(): StyleSheet
backgroundColor: Vec4f
backgroundColor1: Vec4f
backgroundColor2: Vec4f
backgroundImage1: NinePatch
backgroundImage2: NinePatch
borderWidth: Vec4f
borderColor: Vec4f
color: Vec4f
size: Vec2f
padding: Vec4f
fontSize: integer
borderImage: NinePatch
anchorPoint: Vec2f
end
Category: main🔗
Gui🔗
[Expand All] [Collapse All]
global record Gui fireReactEvent: function(name : string, param : any)
fireGuiScriptEvent: function(id : string, name : string, param : any): any
record HighlightStyle Square: HighlightStyle
Circle: HighlightStyle
end
record SpawnHudImageParams iconPath: FilePath
color: Vec4f
entity: Engine.Entity
position: Vec3f
end
spawnEphemeralHudImage: function(iconPath : FilePath, entity : Engine.Entity, color : Vec4f, position : Vec3f, overrideDuration : number, fadeIn : boolean, fadeOut : boolean, rev0 : integer)
spawnEphemeralHudImageOnPath: function(iconPath : FilePath, pos0 : Vec3f, pos1 : Vec3f, pos0 : Vec3f, pos1 : Vec3f, speed : number, scale : number, maxDistance : number)
closeAllWindows: function()
record SelectionDetails new: function(): SelectionDetails
record Type None: Type
Line: Type
Station: Type
Signal: Type
Stop: Type
Waypoint: Type
TransportNetworkEdge: Type
World: Type
Marker: Type
Town: Type
end
interface DataType kind: Type
end
record Line line: Engine.Entity
stop: integer
waypoint: integer
end
record Station new: function(): Station
stationGroup: Engine.Entity
flatStationTerminalIndex: integer
stationTerminal: StationTerminal
end
record Signal signalList: Engine.Entity
signalIndex: integer
end
record Stop new: function(): Stop
station: SelectionDetails.Station
line: Engine.Entity
stopIndex: integer
end
record Waypoint line: Engine.Entity
stopIndex: integer
waypointIndex: integer
tag: integer
end
record TransportNetworkEdge new: function(): TransportNetworkEdge
snap: EdgePos
end
record World new: function(): World
pos: Vec3f
water: boolean
end
record Marker new: function(): Marker
marker: string
fireSelectEntity: boolean
pos: Vec3f
entity: Engine.Entity
end
record Town new: function(): Town
townEntity: Engine.Entity
districtType: LandUseType
districtCenter: Vec3f
end
data: DataType
end
record WorldEvent pos: {number, number, number}
water: boolean
end
record Mouse record Event record Type Pressed: Type
Released: Type
Clicked: Type
Entered: Type
Exited: Type
Moved: Type
Wheel: Type
DoubleClicked: Type
PressedOutside: Type
end
type: Type
button: integer
x: integer
y: integer
xrel: integer
yrel: integer
handled: boolean
end
getTerrainPosition: function(): Vec3f
hasTerrainPosition: function(): boolean
end
record Key record State Up: State
Pressed: State
end
record InputEvent dir: State
repeated: boolean
isGamepadEvent: function(InputEvent): boolean
isKeyboardEvent: function(InputEvent): boolean
getKey: function(InputEvent): integer
getKeyMod: function(InputEvent): integer
end
record Event data: InputEvent
isPressed: function(Event): boolean
end
end
record DataTransferItem new: function(ResName, any): DataTransferItem
type: ResName
data: any
end
record DnD record Event record Type Drop: Type
DragStarted: Type
DragEntered: Type
DragExited: Type
end
type: Type
end
setCursor: function(cursor : integer)
addTransferData: function(dragStartEvent : Event, item : DataTransferItem)
getAllTransferData: function(): {DataTransferItem}
end
record InputAction record InputActionState Disabled: InputActionState
Inactive: InputActionState
Enabled: InputActionState
end
record InvokeData record Status Triggered: Status
Repeat: Status
PressedStep: Status
EndReleased: Status
EndAborted: Status
end
status: Status
end
modifierOnlyActionIsActive: function(inputActionId : string): boolean
hasConflicts: function(keyCmdDefinitions : {string : {KeyComboDef}}, inputActionId : string, keyComboDef : KeyComboDef): string
findDuplicatesOf: function(inputActionId : string): {string}
getFixedKeyCmdDefs: function(keyCmdDefinitions : {string : {KeyComboDef}}, inputActionId : string, keyComboDef : KeyComboDef): {string : {KeyComboDef}}
end
record ById setVisibilityByClass: function(idOrTag : string, visible : boolean, idOnly : boolean)
setEnabled: function(idOrTag : string, enabled : boolean, idOnly : boolean)
setHighlighted: function(idOrTag : string, highlighted : boolean, style : HighlightStyle, color : Vec3f, idOnly : boolean)
isVisible: function(id : string): boolean
isVisibleRecursive: function(id : string): boolean
setVisible: function(id : string, visible : boolean)
resetMovedWindowPosition: function(id : string)
getSize: function(id : string): Vec2f
end
record Camera setManualCamera: function(center : Vec2f, distance : number)
getCameraData: function(): Vec5f
setCameraData: function(Vec5f : Vec5f)
getHeightAboveTerrain: function(): number
focusEntity: function(entity : Engine.Entity)
focusPosition: function(position : Vec3f, distance : number)
takeScreenshot: function(scale : integer)
getFollowEntity: function(): {Engine.Entity, Engine.Revision}
followEntity: function(entity : Engine.Entity, jump : boolean)
enterFollowCameraCockpit: function(entity : Engine.Entity)
leaveFollowCameraCockpit: function()
isFreeCameraMouseAttached: function(): boolean
toggleFreeCameraMouseAttachment: function()
toggleFreeCamera: function()
world2Screen: function(Vec3f): Vec2i
screen2World: function(Vec3f): Vec3f
getEye: function(): Vec3f
getCenter: function(): Vec3f
getNearFar: function(): Vec2f
getSize: function(): Vec2i
traceToTerrain: function(worldPos : Vec3f, farPos : Vec3f, zOffset : number, numSteps : integer): Vec3f | nil
end
record Sound letVehicleHorn: function(vehicleEntity : Engine.Entity)
playRandomSoundEffect: function(paths : {FilePath})
end
record MusicPlayer goBack: function()
goForward: function()
togglePause: function()
getTitle: function(): string
getArtist: function(): string
hasPlaylist: function(): boolean
getPlaylistIndex: function(): integer
setTrackListFromPlayList: function(playlist : string, startPaused : boolean, offset : number)
setPlaylist: function(playlist : string)
getPlaylist: function(): string
isPlaying: function(): boolean
playTrack: function(trackName : string, offset : number)
playTrackFile: function(filePath : string, offset : number)
getTrackLength: function(): number
getTrackElapsedTime: function(): number
getGain: function(): number
setGain: function(gain : number)
setTrackList: function(trackList : {{string, string, boolean}}, enableRepeat : boolean)
addTrackList: function(trackList : {{string, string, boolean}}, enableRepeat : boolean)
setContextTag: function(contextTag : string)
end
record VoiceOverManager stop: function()
play: function(voiceOverRes : string, delayInSeconds : number)
isPlaying: function(voiceOverRes : string): boolean
isPlayingAny: function(): boolean
getPlaying: function(): ResName
end
record ByEntity isLineEmptyOrVisible: function(Engine.Entity : Engine.Entity): boolean
isVisible: function(Engine.Entity : Engine.Entity): boolean
isVehicleVisible: function(Engine.Entity : Engine.Entity): boolean
end
record ContextHelper record SubjectState Visible: SubjectState
Focused: SubjectState
end
collectSubjectStates: function(idsOfInterest : {string}): {string : SubjectState}
getIdsOfActiveTool: function(): {string}
end
record Construction setAngle: function(angle : number)
modify: function(construction : Engine.Entity)
getBrushIcons: function(): {string}
provideDustWheneverPossible: function(proposal : Proposal, proposalData : ProposalData)
getRefundableEntities: function(): {{Engine.Entity, integer}, {Engine.Revision, integer}}
updateRefundableEntities: function(resultEntities : {Engine.Entity}, proposal : Proposal.StreetProposal)
end
record Mission getMission: function(): string
getCampaign: function(): string
setZone: function(key : string, polygon : {Vec2f}, draw : boolean, drawColor : Vec4f, prohibitBuilding : boolean, playAnimation : boolean, zOffset : number)
setZoneCircle: function(key : string, center : Vec2f, radius : number, draw : boolean, drawColor : Vec4f, prohibitBuilding : boolean, playAnimation : boolean, zOffset : number)
removeZone: function(key : string)
setMarkerAtPosition: function(key : string, pos : Vec3f, type : string, scaling : number, isSelectable : boolean, fireSelectEntity : boolean)
setMarkerAtEntity: function(key : string, entity : Engine.Entity, type : string, scaling : number, isSelectable : boolean, fireSelectEntity : boolean)
removeMarker: function(key : string)
setMovePathVisualizationAtEntity: function(key : string, entity : Engine.Entity, color : Vec3f)
removeMovePathVisualization: function(key : string)
playCutscene: function(filePath : string, resolveLanguageFolder : boolean, entityToEntityMap : {Engine.Entity : Engine.Entity})
isCutscenePlaying: function(): boolean
getCutsceneElapsedTime: function(): number
end
record Game isSavegameUIBlocked: function(): boolean
setInGameMenuPause: function(pause : boolean)
getGuiSaveData: function(modId : string): {<any type> : <any type>}
setGuiSaveData: function(modId : string, data : {<any type> : <any type>})
getEstimatedMaximumGameSpeed: function(): integer
isMapEditor: function(): boolean
getDefaultSavegameId: function(): string
setEnvironment: function(environment : ResName)
getEnvironment: function(): ResName
end
record Guide record GuidePosition Left: GuidePosition
Right: GuidePosition
Above: GuidePosition
Below: GuidePosition
end
record FreeGuidePosition High: FreeGuidePosition
Low: FreeGuidePosition
end
record GuideTarget new: function(string, GuidePosition): GuideTarget
idOrTag: string
position: GuidePosition
end
trySpawnGuideById: function({GuideTarget}, string, string): boolean
trySpawnGuideFree: function(FreeGuidePosition, string, string): boolean
completeGuideById: function({GuideTarget}): boolean
end
record Rendering setEnvironment: function(environment : Environment)
getEnvironment: function(): Environment
spawnDust: function(bbMin : Vec3f, bbMax : Vec3f, transf : Mat4f)
getFrameTime01: function(): number
end
record Map setMapSeedText: function(seed : string)
reloadMaterialIndexManagerPipeline: function()
openTerrainEditor: function()
closeTerrainEditor: function()
end
record BenchMark record SimTime frameTime: integer
gameTime: integer
end
getBeginFrameTimes: function(): {integer}
getEventTimes: function(): {integer}
getCoreStepTimes: function(): {integer}
getRenderTimes: function(): {integer}
getSwapTimes: function(): {integer}
getReplicateTimes: function(): {SimTime}
getCommandTimes: function(): {SimTime}
getGameStepTimes: function(): {SimTime}
end
record Debug selectEntity: function(entity : Engine.Entity)
end
record Achievements areStatsDisabled: function(): boolean
unlockAchievement: function(achievement : string)
isAchievementUnlockable: function(achievement : string): boolean
isAchievementUnlocked: function(achievement : string): boolean
updateStat: function(playerStat : string, value : number)
setStat: function(playerStat : string, value : number)
getStatValue: function(playerStat : string): number
setStatExtraData: function(playerStat : string, data : {<any type> : <any type>})
getStatExtraData: function(playerStat : string): {<any type> : <any type>}
setEarnedSFX: function(sfx : {FilePath})
end
record GenericRep getAllOfType: function(typeName : string, includeInvisible : boolean): {integer}
end
record Backend record LegalDocument title: string
text: string
end
isInitialized: function(): boolean
hasLegalDocuments: function()
getLegalDocuments: function(): {PdxLegalDocumentType}
isAccountLoggedIn: function(): boolean
loginAccount: function(string, string): PdxFuture<PdxLoginResult>
logoutAccount: function(): PdxFuture<PdxResult>
getAccountInfo: function(): PdxFuture<PdxAccountInfo>
getProfile: function(boolean): PdxFuture<PdxProfileResult>
createProfile: function(string, boolean): PdxFuture<PdxResult>
renameProfile: function(string, boolean): PdxFuture<PdxResult>
getCountries: function(): {PdxCountry}
getLegalDocument: function(PdxLegalDocumentType): PdxFuture<PdxLegalDocument>
createAccount: function(string, string, string, integer, boolean): PdxFuture<PdxResult>
supportsAccountLinking: function(): boolean
getThirdPartyLinkState: function(): PdxFuture<PdxThirdPartyLinkState>
getThirdPartyAutoLoginPromptState: function(): PdxThirdPartyAutoLoginPromptState
setThirdPartyAutoLoginPromptState: function(PdxThirdPartyAutoLoginPromptState)
linkThirdPartyAccount: function(): PdxFuture<PdxResult>
unlinkThirdPartyAccount: function(): PdxFuture<PdxResult>
loginThirdPartyAccount: function(): PdxFuture<PdxLoginResult>
end
mouse: Mouse
key: Key
dnd: DnD
inputAction: InputAction
byId: ById
camera: Camera
sound: Sound
musicPlayer: MusicPlayer
backend: Backend
voiceOverManager: VoiceOverManager
byEntity: ByEntity
contextHelper: ContextHelper
construction: Construction
mission: Mission
guide: Guide
game: Game
map: Map
benchMark: BenchMark
rendering: Rendering
debug: Debug
achievements: Achievements
genericRep: GenericRep
StyleSheet: StyleSheet
NinePatch: NinePatch
end
Main GUI interface
Gui.fireReactEvent🔗
function Gui.fireReactEvent(name : string, param : any)
Fire a react event (same as react.fireEvent() but from outside of react)
Parameters
name:string— the event nameparam:any— the event parameter
Gui.fireGuiScriptEvent🔗
function Gui.fireGuiScriptEvent(id : string, name : string, param : any): any
Fire a game gui script event.
This event is meant to be handled by game scripts (guiHandleEvent), not by react.onEvent().
It differs from react.fireEvent in that it allows to return a value (like an error string to prevent the operation)
Parameters
id:string— the component idname:string— the event nameparam:any— event-specific parameters
Returns
any— the result from the event handler
Gui.HighlightStyle🔗
record Gui.HighlightStyle Square: HighlightStyle
Circle: HighlightStyle
end
Gui.HighlightStyle.Square🔗
Gui.HighlightStyle.Square: HighlightStyle
Gui.HighlightStyle.Circle🔗
Gui.HighlightStyle.Circle: HighlightStyle
Gui.SpawnHudImageParams🔗
record Gui.SpawnHudImageParams iconPath: FilePath
color: Vec4f
entity: Engine.Entity
position: Vec3f
end
Gui.SpawnHudImageParams.iconPath🔗
Gui.SpawnHudImageParams.iconPath: FilePath
Mandatory path to the icon
Gui.SpawnHudImageParams.color🔗
Gui.SpawnHudImageParams.color: Vec4f
Optional color. If set, the icon is expected to be grayscale.
Gui.SpawnHudImageParams.entity🔗
Gui.SpawnHudImageParams.entity: Engine.Entity
Optional entity (if not used, specify position)
Gui.SpawnHudImageParams.position🔗
Gui.SpawnHudImageParams.position: Vec3f
Optional position (if not used, position of the entity is used)
Gui.spawnEphemeralHudImage🔗
function Gui.spawnEphemeralHudImage(iconPath : FilePath, entity : Engine.Entity, color : Vec4f, position : Vec3f, overrideDuration : number, fadeIn : boolean, fadeOut : boolean, rev0 : integer)
Spawn a short-lived floating image as a hud-icon
Parameters
iconPath:FilePath— The icon to be usedentity:Engine.Entity— Optional entity (if not used, you must specify position instead)color:Vec4f— Optional color (if not used, the icon is expected to have color channels)position:Vec3f— Optional position (if not used, position is obtained from the entity)overrideDuration:number— Optional duration in secondsfadeIn:boolean— Optional: Start invisible and fade in (default: false)fadeOut:boolean— Optional: Slowly fade out at the end (default: true)rev0:integer— Optional revision0 (if not used, defaults to api.engine.getRevision(entity).num[1])
Gui.spawnEphemeralHudImageOnPath🔗
function Gui.spawnEphemeralHudImageOnPath(iconPath : FilePath, pos0 : Vec3f, pos1 : Vec3f, pos0 : Vec3f, pos1 : Vec3f, speed : number, scale : number, maxDistance : number)
Spawns a short icon that follows a path
Parameters
iconPath:FilePath— The icon to be usedpos0:Vec3f— The starting position of the iconpos1:Vec3f— The end position of the iconpos0:Vec3f— The starting tangent of the iconpos1:Vec3f— The end tangent of the iconspeed:number— The speed (in m/s) of the iconscale:number— A scaling factor for the size of the iconmaxDistance:number— The maximal distance at which the icon will be rendered
Gui.closeAllWindows🔗
function Gui.closeAllWindows()
Close all windows
Gui.SelectionDetails🔗
[Expand All] [Collapse All]
record Gui.SelectionDetails new: function(): SelectionDetails
record Type None: Type
Line: Type
Station: Type
Signal: Type
Stop: Type
Waypoint: Type
TransportNetworkEdge: Type
World: Type
Marker: Type
Town: Type
end
interface DataType kind: Type
end
record Line line: Engine.Entity
stop: integer
waypoint: integer
end
record Station new: function(): Station
stationGroup: Engine.Entity
flatStationTerminalIndex: integer
stationTerminal: StationTerminal
end
record Signal signalList: Engine.Entity
signalIndex: integer
end
record Stop new: function(): Stop
station: SelectionDetails.Station
line: Engine.Entity
stopIndex: integer
end
record Waypoint line: Engine.Entity
stopIndex: integer
waypointIndex: integer
tag: integer
end
record TransportNetworkEdge new: function(): TransportNetworkEdge
snap: EdgePos
end
record World new: function(): World
pos: Vec3f
water: boolean
end
record Marker new: function(): Marker
marker: string
fireSelectEntity: boolean
pos: Vec3f
entity: Engine.Entity
end
record Town new: function(): Town
townEntity: Engine.Entity
districtType: LandUseType
districtCenter: Vec3f
end
data: DataType
end
Carries details about selection event
Gui.SelectionDetails.new()🔗
function Gui.SelectionDetails.new()(): SelectionDetails
Returns
SelectionDetails
Gui.SelectionDetails.new(SelectionDetails)🔗
function Gui.SelectionDetails.new(SelectionDetails)(SelectionDetails): SelectionDetails
Parameters
SelectionDetails
Returns
SelectionDetails
Gui.SelectionDetails.Type🔗
record Gui.SelectionDetails.Type None: Type
Line: Type
Station: Type
Signal: Type
Stop: Type
Waypoint: Type
TransportNetworkEdge: Type
World: Type
Marker: Type
Town: Type
end
Gui.SelectionDetails.Type.None🔗
Gui.SelectionDetails.Type.None: Type
Gui.SelectionDetails.Type.Line🔗
Gui.SelectionDetails.Type.Line: Type
Gui.SelectionDetails.Type.Station🔗
Gui.SelectionDetails.Type.Station: Type
Gui.SelectionDetails.Type.Signal🔗
Gui.SelectionDetails.Type.Signal: Type
Gui.SelectionDetails.Type.Stop🔗
Gui.SelectionDetails.Type.Stop: Type
Gui.SelectionDetails.Type.Waypoint🔗
Gui.SelectionDetails.Type.Waypoint: Type
Gui.SelectionDetails.Type.TransportNetworkEdge🔗
Gui.SelectionDetails.Type.TransportNetworkEdge: Type
Gui.SelectionDetails.Type.World🔗
Gui.SelectionDetails.Type.World: Type
Gui.SelectionDetails.Type.Marker🔗
Gui.SelectionDetails.Type.Marker: Type
Gui.SelectionDetails.Type.Town🔗
Gui.SelectionDetails.Type.Town: Type
Gui.SelectionDetails.DataType🔗
interface Gui.SelectionDetails.DataType kind: Type
end
Gui.SelectionDetails.DataType.kind🔗
Gui.SelectionDetails.DataType.kind: Type
Gui.SelectionDetails.Line🔗
record Gui.SelectionDetails.Line line: Engine.Entity
stop: integer
waypoint: integer
end
Carries details about selection event for a Line.
Gui.SelectionDetails.Line.line🔗
Gui.SelectionDetails.Line.line: Engine.Entity
The line entity
Gui.SelectionDetails.Line.stop🔗
Gui.SelectionDetails.Line.stop: integer
Stop index where the selected line segment starts
Gui.SelectionDetails.Line.waypoint🔗
Gui.SelectionDetails.Line.waypoint: integer
Waypoint index identifying the selected subsegment (-1: no waypoints, 0 = begins at stop, numWaypoints = ends at next stop)
Gui.SelectionDetails.Station🔗
record Gui.SelectionDetails.Station new: function(): Station
stationGroup: Engine.Entity
flatStationTerminalIndex: integer
stationTerminal: StationTerminal
end
Carries details about selection event for a Station, StationGroup or Terminal
Gui.SelectionDetails.Station.new🔗
function Gui.SelectionDetails.Station.new(): Station
Returns
Station
Gui.SelectionDetails.Station.stationGroup🔗
Gui.SelectionDetails.Station.stationGroup: Engine.Entity
The station group entity
Gui.SelectionDetails.Station.flatStationTerminalIndex🔗
Gui.SelectionDetails.Station.flatStationTerminalIndex: integer
Index in the the StationGroup's flattened list of station/terminals
Gui.SelectionDetails.Station.stationTerminal🔗
Gui.SelectionDetails.Station.stationTerminal: StationTerminal
Gui.SelectionDetails.Signal🔗
record Gui.SelectionDetails.Signal signalList: Engine.Entity
signalIndex: integer
end
Carries details about selection event for a Signal
Gui.SelectionDetails.Signal.signalList🔗
Gui.SelectionDetails.Signal.signalList: Engine.Entity
The signalList entity
Gui.SelectionDetails.Signal.signalIndex🔗
Gui.SelectionDetails.Signal.signalIndex: integer
Index of the actual signal in the the SignalList
Gui.SelectionDetails.Stop🔗
record Gui.SelectionDetails.Stop new: function(): Stop
station: SelectionDetails.Station
line: Engine.Entity
stopIndex: integer
end
Carries details about selection event for a Stop (terminal) inside a line
Gui.SelectionDetails.Stop.new🔗
function Gui.SelectionDetails.Stop.new(): Stop
Returns
Stop
Gui.SelectionDetails.Stop.station🔗
Gui.SelectionDetails.Stop.station: SelectionDetails.Station
The station / terminal
Gui.SelectionDetails.Stop.line🔗
Gui.SelectionDetails.Stop.line: Engine.Entity
The line entity
Gui.SelectionDetails.Stop.stopIndex🔗
Gui.SelectionDetails.Stop.stopIndex: integer
Index of the stop in the line
Gui.SelectionDetails.Waypoint🔗
record Gui.SelectionDetails.Waypoint line: Engine.Entity
stopIndex: integer
waypointIndex: integer
tag: integer
end
Carries details about selection event for a waypoint inside a line
Gui.SelectionDetails.Waypoint.line🔗
Gui.SelectionDetails.Waypoint.line: Engine.Entity
The line entity
Gui.SelectionDetails.Waypoint.stopIndex🔗
Gui.SelectionDetails.Waypoint.stopIndex: integer
Index of the stop in the line
Gui.SelectionDetails.Waypoint.waypointIndex🔗
Gui.SelectionDetails.Waypoint.waypointIndex: integer
Index of the waypoint in the line (index in stop.waypoints)
Gui.SelectionDetails.Waypoint.tag🔗
Gui.SelectionDetails.Waypoint.tag: integer
Gui.SelectionDetails.TransportNetworkEdge🔗
record Gui.SelectionDetails.TransportNetworkEdge new: function(): TransportNetworkEdge
snap: EdgePos
end
Carries details about selection event for a Transport Network Edge
Gui.SelectionDetails.TransportNetworkEdge.new🔗
function Gui.SelectionDetails.TransportNetworkEdge.new(): TransportNetworkEdge
Returns
TransportNetworkEdge
Gui.SelectionDetails.TransportNetworkEdge.snap🔗
Gui.SelectionDetails.TransportNetworkEdge.snap: EdgePos
Gui.SelectionDetails.World🔗
record Gui.SelectionDetails.World new: function(): World
pos: Vec3f
water: boolean
end
Carries details about the cursor location in the world.
Gui.SelectionDetails.World.new🔗
function Gui.SelectionDetails.World.new(): World
Returns
World
Gui.SelectionDetails.World.pos🔗
Gui.SelectionDetails.World.pos: Vec3f
Gui.SelectionDetails.World.water🔗
Gui.SelectionDetails.World.water: boolean
Gui.SelectionDetails.Marker🔗
record Gui.SelectionDetails.Marker new: function(): Marker
marker: string
fireSelectEntity: boolean
pos: Vec3f
entity: Engine.Entity
end
Carries details about selection event for a Marker.
Gui.SelectionDetails.Marker.new🔗
function Gui.SelectionDetails.Marker.new(): Marker
Returns
Marker
Gui.SelectionDetails.Marker.marker🔗
Gui.SelectionDetails.Marker.marker: string
Gui.SelectionDetails.Marker.fireSelectEntity🔗
Gui.SelectionDetails.Marker.fireSelectEntity: boolean
If true, select the underlying entity of the marker (default = true)
Gui.SelectionDetails.Marker.pos🔗
Gui.SelectionDetails.Marker.pos: Vec3f
Get the marker position (if it is a position marker)
Gui.SelectionDetails.Marker.entity🔗
Gui.SelectionDetails.Marker.entity: Engine.Entity
Get the marked entity (if it is an entity marker)
Gui.SelectionDetails.Town🔗
record Gui.SelectionDetails.Town new: function(): Town
townEntity: Engine.Entity
districtType: LandUseType
districtCenter: Vec3f
end
Carries details about selection event for a Town.
Gui.SelectionDetails.Town.new🔗
function Gui.SelectionDetails.Town.new(): Town
Returns
Town
Gui.SelectionDetails.Town.townEntity🔗
Gui.SelectionDetails.Town.townEntity: Engine.Entity
Gui.SelectionDetails.Town.districtType🔗
Gui.SelectionDetails.Town.districtType: LandUseType
Gui.SelectionDetails.Town.districtCenter🔗
Gui.SelectionDetails.Town.districtCenter: Vec3f
Gui.SelectionDetails.data🔗
Gui.SelectionDetails.data: DataType
Gui.WorldEvent🔗
record Gui.WorldEvent pos: {number, number, number}
water: boolean
end
Gui.WorldEvent.pos🔗
Gui.WorldEvent.pos: {number, number, number}
Gui.WorldEvent.water🔗
Gui.WorldEvent.water: boolean
Gui.Mouse🔗
[Expand All] [Collapse All]
record Gui.Mouse record Event record Type Pressed: Type
Released: Type
Clicked: Type
Entered: Type
Exited: Type
Moved: Type
Wheel: Type
DoubleClicked: Type
PressedOutside: Type
end
type: Type
button: integer
x: integer
y: integer
xrel: integer
yrel: integer
handled: boolean
end
getTerrainPosition: function(): Vec3f
hasTerrainPosition: function(): boolean
end
Gui.Mouse.Event🔗
[Expand All] [Collapse All]
record Gui.Mouse.Event record Type Pressed: Type
Released: Type
Clicked: Type
Entered: Type
Exited: Type
Moved: Type
Wheel: Type
DoubleClicked: Type
PressedOutside: Type
end
type: Type
button: integer
x: integer
y: integer
xrel: integer
yrel: integer
handled: boolean
end
Represents a mouse event
Gui.Mouse.Event.Type🔗
record Gui.Mouse.Event.Type Pressed: Type
Released: Type
Clicked: Type
Entered: Type
Exited: Type
Moved: Type
Wheel: Type
DoubleClicked: Type
PressedOutside: Type
end
Gui.Mouse.Event.Type.Pressed🔗
Gui.Mouse.Event.Type.Pressed: Type
Gui.Mouse.Event.Type.Released🔗
Gui.Mouse.Event.Type.Released: Type
Gui.Mouse.Event.Type.Clicked🔗
Gui.Mouse.Event.Type.Clicked: Type
Gui.Mouse.Event.Type.Entered🔗
Gui.Mouse.Event.Type.Entered: Type
Gui.Mouse.Event.Type.Exited🔗
Gui.Mouse.Event.Type.Exited: Type
Gui.Mouse.Event.Type.Moved🔗
Gui.Mouse.Event.Type.Moved: Type
Gui.Mouse.Event.Type.Wheel🔗
Gui.Mouse.Event.Type.Wheel: Type
Gui.Mouse.Event.Type.DoubleClicked🔗
Gui.Mouse.Event.Type.DoubleClicked: Type
Gui.Mouse.Event.Type.PressedOutside🔗
Gui.Mouse.Event.Type.PressedOutside: Type
Gui.Mouse.Event.type🔗
Gui.Mouse.Event.type: Type
Event type.
Gui.Mouse.Event.button🔗
Gui.Mouse.Event.button: integer
Mouse button: 0 = left, 1 = middle, 2 = right.
Gui.Mouse.Event.x🔗
Gui.Mouse.Event.x: integer
Horizontal position of the mouse when event was triggered
Gui.Mouse.Event.y🔗
Gui.Mouse.Event.y: integer
Vertical position of the mouse when event was triggered
Gui.Mouse.Event.xrel🔗
Gui.Mouse.Event.xrel: integer
Relative horizontal movement.
Gui.Mouse.Event.yrel🔗
Gui.Mouse.Event.yrel: integer
Relative vertical movement.
Gui.Mouse.Event.handled🔗
Gui.Mouse.Event.handled: boolean
Whether the event was already handled by a child component.
Gui.Mouse.getTerrainPosition🔗
function Gui.Mouse.getTerrainPosition(): Vec3f
Gets the last valid terrain position pointed by the mouse.
Returns
Vec3f— coordinates of the terrain position
Gui.Mouse.hasTerrainPosition🔗
function Gui.Mouse.hasTerrainPosition(): boolean
Returns whether a valid terrain position is currently available.
Returns
boolean— boolean true if the mouse is pointing at the terrain
Gui.Key🔗
[Expand All] [Collapse All]
record Gui.Key record State Up: State
Pressed: State
end
record InputEvent dir: State
repeated: boolean
isGamepadEvent: function(InputEvent): boolean
isKeyboardEvent: function(InputEvent): boolean
getKey: function(InputEvent): integer
getKeyMod: function(InputEvent): integer
end
record Event data: InputEvent
isPressed: function(Event): boolean
end
end
Gui.Key.State🔗
record Gui.Key.State Up: State
Pressed: State
end
Gui.Key.State.Up🔗
Gui.Key.State.Up: State
Gui.Key.State.Pressed🔗
Gui.Key.State.Pressed: State
Gui.Key.InputEvent🔗
record Gui.Key.InputEvent dir: State
repeated: boolean
isGamepadEvent: function(InputEvent): boolean
isKeyboardEvent: function(InputEvent): boolean
getKey: function(InputEvent): integer
getKeyMod: function(InputEvent): integer
end
Gui.Key.InputEvent.dir🔗
Gui.Key.InputEvent.dir: State
Gui.Key.InputEvent.repeated🔗
Gui.Key.InputEvent.repeated: boolean
Gui.Key.InputEvent.isGamepadEvent🔗
function Gui.Key.InputEvent.isGamepadEvent(InputEvent): boolean
Returns whether this is a gamepad event.
Parameters
InputEvent
Returns
boolean
Gui.Key.InputEvent.isKeyboardEvent🔗
function Gui.Key.InputEvent.isKeyboardEvent(InputEvent): boolean
Returns whether this is a keyboard event.
Parameters
InputEvent
Returns
boolean
Gui.Key.InputEvent.getKey🔗
function Gui.Key.InputEvent.getKey(InputEvent): integer
Returns the key code.
Parameters
InputEvent
Returns
integer
Gui.Key.InputEvent.getKeyMod🔗
function Gui.Key.InputEvent.getKeyMod(InputEvent): integer
Returns key modifiers.
Parameters
InputEvent
Returns
integer
Gui.Key.Event🔗
record Gui.Key.Event data: InputEvent
isPressed: function(Event): boolean
end
Represents a key press event.
Gui.Key.Event.data🔗
Gui.Key.Event.data: InputEvent
Gui.Key.Event.isPressed🔗
function Gui.Key.Event.isPressed(Event): boolean
Returns whether the key is pressed.
Parameters
Event
Returns
boolean
Gui.DataTransferItem🔗
record Gui.DataTransferItem new: function(ResName, any): DataTransferItem
type: ResName
data: any
end
Gui.DataTransferItem.new🔗
function Gui.DataTransferItem.new(ResName, any): DataTransferItem
Parameters
ResNameany
Returns
DataTransferItem
Gui.DataTransferItem.type🔗
Gui.DataTransferItem.type: ResName
Gui.DataTransferItem.data🔗
Gui.DataTransferItem.data: any
Gui.DnD🔗
[Expand All] [Collapse All]
record Gui.DnD record Event record Type Drop: Type
DragStarted: Type
DragEntered: Type
DragExited: Type
end
type: Type
end
setCursor: function(cursor : integer)
addTransferData: function(dragStartEvent : Event, item : DataTransferItem)
getAllTransferData: function(): {DataTransferItem}
end
Gui.DnD.Event🔗
[Expand All] [Collapse All]
record Gui.DnD.Event record Type Drop: Type
DragStarted: Type
DragEntered: Type
DragExited: Type
end
type: Type
end
Represents drag & drop event
Gui.DnD.Event.Type🔗
record Gui.DnD.Event.Type Drop: Type
DragStarted: Type
DragEntered: Type
DragExited: Type
end
Gui.DnD.Event.Type.Drop🔗
Gui.DnD.Event.Type.Drop: Type
Gui.DnD.Event.Type.DragStarted🔗
Gui.DnD.Event.Type.DragStarted: Type
Gui.DnD.Event.Type.DragEntered🔗
Gui.DnD.Event.Type.DragEntered: Type
Gui.DnD.Event.Type.DragExited🔗
Gui.DnD.Event.Type.DragExited: Type
Gui.DnD.Event.type🔗
Gui.DnD.Event.type: Type
Event type.
Gui.DnD.setCursor🔗
function Gui.DnD.setCursor(cursor : integer)
Set cursor while dragging (will get reset when a new drag starts).
Parameters
cursor:integer— the cursor id
Gui.DnD.addTransferData🔗
function Gui.DnD.addTransferData(dragStartEvent : Event, item : DataTransferItem)
Add transfer data to the current drag & drop operation.
Parameters
dragStartEvent:Event— drag start event (must be Event.Type.DragStarted)item:DataTransferItem— transferable item
Gui.DnD.getAllTransferData🔗
function Gui.DnD.getAllTransferData(): {DataTransferItem}
Get current drag & drop data.
Returns
{DataTransferItem}— current transfer data list
Gui.InputAction🔗
[Expand All] [Collapse All]
record Gui.InputAction record InputActionState Disabled: InputActionState
Inactive: InputActionState
Enabled: InputActionState
end
record InvokeData record Status Triggered: Status
Repeat: Status
PressedStep: Status
EndReleased: Status
EndAborted: Status
end
status: Status
end
modifierOnlyActionIsActive: function(inputActionId : string): boolean
hasConflicts: function(keyCmdDefinitions : {string : {KeyComboDef}}, inputActionId : string, keyComboDef : KeyComboDef): string
findDuplicatesOf: function(inputActionId : string): {string}
getFixedKeyCmdDefs: function(keyCmdDefinitions : {string : {KeyComboDef}}, inputActionId : string, keyComboDef : KeyComboDef): {string : {KeyComboDef}}
end
Gui.InputAction.InputActionState🔗
record Gui.InputAction.InputActionState Disabled: InputActionState
Inactive: InputActionState
Enabled: InputActionState
end
Gui.InputAction.InputActionState.Disabled🔗
Gui.InputAction.InputActionState.Disabled: InputActionState
Gui.InputAction.InputActionState.Inactive🔗
Gui.InputAction.InputActionState.Inactive: InputActionState
Gui.InputAction.InputActionState.Enabled🔗
Gui.InputAction.InputActionState.Enabled: InputActionState
Gui.InputAction.InvokeData🔗
[Expand All] [Collapse All]
record Gui.InputAction.InvokeData record Status Triggered: Status
Repeat: Status
PressedStep: Status
EndReleased: Status
EndAborted: Status
end
status: Status
end
Additional info about the invocation of an input action event
Gui.InputAction.InvokeData.Status🔗
record Gui.InputAction.InvokeData.Status Triggered: Status
Repeat: Status
PressedStep: Status
EndReleased: Status
EndAborted: Status
end
Status type of the InputActionInvokeData
Gui.InputAction.InvokeData.Status.Triggered🔗
Gui.InputAction.InvokeData.Status.Triggered: Status
Gui.InputAction.InvokeData.Status.Repeat🔗
Gui.InputAction.InvokeData.Status.Repeat: Status
Gui.InputAction.InvokeData.Status.PressedStep🔗
Gui.InputAction.InvokeData.Status.PressedStep: Status
Gui.InputAction.InvokeData.Status.EndReleased🔗
Gui.InputAction.InvokeData.Status.EndReleased: Status
Gui.InputAction.InvokeData.Status.EndAborted🔗
Gui.InputAction.InvokeData.Status.EndAborted: Status
Gui.InputAction.InvokeData.status🔗
Gui.InputAction.InvokeData.status: Status
status of the action.
Gui.InputAction.modifierOnlyActionIsActive🔗
function Gui.InputAction.modifierOnlyActionIsActive(inputActionId : string): boolean
Checks if a modifier-only action is currently active.
Parameters
inputActionId:string— the input action identifier
Returns
boolean— True if active.
Gui.InputAction.hasConflicts🔗
function Gui.InputAction.hasConflicts(keyCmdDefinitions : {string : {KeyComboDef}}, inputActionId : string, keyComboDef : KeyComboDef): string
Checks for key binding conflicts.
Parameters
keyCmdDefinitions:{string : {KeyComboDef}}— Key command definitions.inputActionId:string— Input action id.keyComboDef:KeyComboDef— Key combo definition.
Returns
string— Conflict description (empty if no conflict).
Gui.InputAction.findDuplicatesOf🔗
function Gui.InputAction.findDuplicatesOf(inputActionId : string): {string}
Recursively find list of all IAs that should are duplicates of this one (i.e. duplicateOf == inputActionId and duplicatedKeybindings == true)
Parameters
inputActionId:string— Input action id.
Returns
{string}— Duplications of the IA
Gui.InputAction.getFixedKeyCmdDefs🔗
function Gui.InputAction.getFixedKeyCmdDefs(keyCmdDefinitions : {string : {KeyComboDef}}, inputActionId : string, keyComboDef : KeyComboDef): {string : {KeyComboDef}}
Resolves key binding conflicts and returns updated key command definitions.
Parameters
keyCmdDefinitions:{string : {KeyComboDef}}— Key command definitions.inputActionId:string— Input action id.keyComboDef:KeyComboDef— Key combo definition.
Returns
{string : {KeyComboDef}}— Fixed key command definitions or empty table if change not allowed.
Gui.ById🔗
record Gui.ById setVisibilityByClass: function(idOrTag : string, visible : boolean, idOnly : boolean)
setEnabled: function(idOrTag : string, enabled : boolean, idOnly : boolean)
setHighlighted: function(idOrTag : string, highlighted : boolean, style : HighlightStyle, color : Vec3f, idOnly : boolean)
isVisible: function(id : string): boolean
isVisibleRecursive: function(id : string): boolean
setVisible: function(id : string, visible : boolean)
resetMovedWindowPosition: function(id : string)
getSize: function(id : string): Vec2f
end
Gui.ById.setVisibilityByClass🔗
function Gui.ById.setVisibilityByClass(idOrTag : string, visible : boolean, idOnly : boolean)
Shows or hides a component.
Parameters
idOrTag:string— the component identifier or a tagvisible:boolean— whether visible or not (nil to reset the ruleidOnly:boolean— idOnly -> do not consider tags
Gui.ById.setEnabled🔗
function Gui.ById.setEnabled(idOrTag : string, enabled : boolean, idOnly : boolean)
Enables or disables a component.
Parameters
idOrTag:string— the component identifier or a tagenabled:boolean— whether enabled or not (nil sets to enabled and removes the rule)idOnly:boolean— idOnly -> do not consider tags
Gui.ById.setHighlighted🔗
function Gui.ById.setHighlighted(idOrTag : string, highlighted : boolean, style : HighlightStyle, color : Vec3f, idOnly : boolean)
Sets the highlighted state of a component.
Parameters
idOrTag:string— the component identifier or a taghighlighted:boolean— whether highlighted or not (nil sets to not highlighted and removes the rule)style:HighlightStyle— defaults to HighlightStyle::Circlecolor:Vec3f— the color of the highlight, defaults to yellowidOnly:boolean— idOnly -> do not consider tags
Gui.ById.isVisible🔗
function Gui.ById.isVisible(id : string): boolean
Checks if a UI component is visible by its id.
Parameters
id:string— the component identifier
Returns
boolean— true if the component is visible
Gui.ById.isVisibleRecursive🔗
function Gui.ById.isVisibleRecursive(id : string): boolean
Checks if a UI component and all its parents are visible by id.
Parameters
id:string— the component identifier
Returns
boolean— true if the component and all parents are visible
Gui.ById.setVisible🔗
function Gui.ById.setVisible(id : string, visible : boolean)
Sets the visibility of a UI component by its ID.
Parameters
id:string— the component identifiervisible:boolean— if the component should be visible
Gui.ById.resetMovedWindowPosition🔗
function Gui.ById.resetMovedWindowPosition(id : string)
Resets a window to its original position if it was moved by the user.
Parameters
id:string— string id the window identifier
Gui.ById.getSize🔗
function Gui.ById.getSize(id : string): Vec2f
Get width and height of UI component
Parameters
id:string— string id the window identifier
Returns
Vec2f— width and height
Gui.Camera🔗
record Gui.Camera setManualCamera: function(center : Vec2f, distance : number)
getCameraData: function(): Vec5f
setCameraData: function(Vec5f : Vec5f)
getHeightAboveTerrain: function(): number
focusEntity: function(entity : Engine.Entity)
focusPosition: function(position : Vec3f, distance : number)
takeScreenshot: function(scale : integer)
getFollowEntity: function(): {Engine.Entity, Engine.Revision}
followEntity: function(entity : Engine.Entity, jump : boolean)
enterFollowCameraCockpit: function(entity : Engine.Entity)
leaveFollowCameraCockpit: function()
isFreeCameraMouseAttached: function(): boolean
toggleFreeCameraMouseAttachment: function()
toggleFreeCamera: function()
world2Screen: function(Vec3f): Vec2i
screen2World: function(Vec3f): Vec3f
getEye: function(): Vec3f
getCenter: function(): Vec3f
getNearFar: function(): Vec2f
getSize: function(): Vec2i
traceToTerrain: function(worldPos : Vec3f, farPos : Vec3f, zOffset : number, numSteps : integer): Vec3f | nil
end
Gui.Camera.setManualCamera🔗
function Gui.Camera.setManualCamera(center : Vec2f, distance : number)
Sets camera to a given position/orientation.
Parameters
center:Vec2f— position on the map where the camera should point todistance:number— the distance from the position
Gui.Camera.getCameraData🔗
function Gui.Camera.getCameraData(): Vec5f
Obtains the current camera data.
Returns
Vec5f— the current camera data as a Vec5f {center.x, center.y, distance, angle, pitch}
Gui.Camera.setCameraData🔗
function Gui.Camera.setCameraData(Vec5f : Vec5f)
Set the camera data.
Parameters
Vec5f:Vec5f— set the camera data as a Vec5f {center.x, center.y, distance, angle, pitch}
Gui.Camera.getHeightAboveTerrain🔗
function Gui.Camera.getHeightAboveTerrain(): number
Obtains the current height above terrain.
Returns
number— the height of the camera above the terrain
Gui.Camera.focusEntity🔗
function Gui.Camera.focusEntity(entity : Engine.Entity)
Focuses the camera on an entity.
Parameters
entity:Engine.Entity— the id of the entity that should be focused on
Gui.Camera.focusPosition🔗
function Gui.Camera.focusPosition(position : Vec3f, distance : number)
Focuses the camera on a position.
Parameters
position:Vec3f— the position that should be focuseddistance:number— the distance of the camera from the target
Gui.Camera.takeScreenshot🔗
function Gui.Camera.takeScreenshot(scale : integer)
Takes a screenshot and stores it in userdata folder
Parameters
scale:integer— image resolution
Gui.Camera.getFollowEntity🔗
function Gui.Camera.getFollowEntity(): {Engine.Entity, Engine.Revision}
Gets the entity currently being followed.
Returns
{Engine.Entity, Engine.Revision}— the entity being followed (and the entity revision)
Gui.Camera.followEntity🔗
function Gui.Camera.followEntity(entity : Engine.Entity, jump : boolean)
Sets camera to follow an Entity.
Parameters
entity:Engine.Entity— the id of the entity that should be followedjump:boolean— true if the camera should directly jump to the entity and not slide there
Gui.Camera.enterFollowCameraCockpit🔗
function Gui.Camera.enterFollowCameraCockpit(entity : Engine.Entity)
Enters the cockpit of an entity.
Parameters
entity:Engine.Entity— entity of the object to enter
Gui.Camera.leaveFollowCameraCockpit🔗
function Gui.Camera.leaveFollowCameraCockpit()
Leave the cockpit of an entity.
Gui.Camera.isFreeCameraMouseAttached🔗
function Gui.Camera.isFreeCameraMouseAttached(): boolean
Tells if mouse is attached to free cam or not
Returns
boolean— if mouse is attached (true) or not (false)
Gui.Camera.toggleFreeCameraMouseAttachment🔗
function Gui.Camera.toggleFreeCameraMouseAttachment()
Toggles mouse attachment
Gui.Camera.toggleFreeCamera🔗
function Gui.Camera.toggleFreeCamera()
Toggles free camera
Gui.Camera.world2Screen🔗
function Gui.Camera.world2Screen(Vec3f): Vec2i
Convert a 3D World position into a position on screen (in pixels)
Parameters
Vec3f
Returns
Vec2i
Gui.Camera.screen2World🔗
function Gui.Camera.screen2World(Vec3f): Vec3f
Convert a position on the screen (in pixels) (with depth [0, 1]) into a 3D World position
Parameters
Vec3f
Returns
Vec3f
Gui.Camera.getEye🔗
function Gui.Camera.getEye(): Vec3f
Get camera origin in world coordinates
Returns
Vec3f
Gui.Camera.getCenter🔗
function Gui.Camera.getCenter(): Vec3f
Get camera center ("look-at" pos) in world coordinates
Returns
Vec3f
Gui.Camera.getNearFar🔗
function Gui.Camera.getNearFar(): Vec2f
Get near and far distances of camera in x and y coordinates repsectively
Returns
Vec2f
Gui.Camera.getSize🔗
function Gui.Camera.getSize(): Vec2i
Width and height of the viewport, in pixels
Returns
Vec2i
Gui.Camera.traceToTerrain🔗
function Gui.Camera.traceToTerrain(worldPos : Vec3f, farPos : Vec3f, zOffset : number, numSteps : integer): Vec3f | nil
Trace a ray from worldPos to farPos, and find the intersection (if any) with the terrain, offsetted at zOffset
Parameters
worldPos:Vec3f— world position of starting point of rayfarPos:Vec3f— world position of end point of rayzOffset:number— offset to shift the terrain for intersectionnumSteps:integer— number of steps to perform for finding an intersection. more steps are more precise but cost more, 30 is a good compromise
Returns
Vec3f | nil
Gui.Sound🔗
record Gui.Sound letVehicleHorn: function(vehicleEntity : Engine.Entity)
playRandomSoundEffect: function(paths : {FilePath})
end
Gui.Sound.letVehicleHorn🔗
function Gui.Sound.letVehicleHorn(vehicleEntity : Engine.Entity)
Sounds the vehicle horn.
Parameters
vehicleEntity:Engine.Entity— the vehicle to sound the horn
Gui.Sound.playRandomSoundEffect🔗
function Gui.Sound.playRandomSoundEffect(paths : {FilePath})
Plays a single sound effect randomly selected of the provided selection.
Parameters
paths:{FilePath}— vector of strings paths of sound effects
Gui.MusicPlayer🔗
record Gui.MusicPlayer goBack: function()
goForward: function()
togglePause: function()
getTitle: function(): string
getArtist: function(): string
hasPlaylist: function(): boolean
getPlaylistIndex: function(): integer
setTrackListFromPlayList: function(playlist : string, startPaused : boolean, offset : number)
setPlaylist: function(playlist : string)
getPlaylist: function(): string
isPlaying: function(): boolean
playTrack: function(trackName : string, offset : number)
playTrackFile: function(filePath : string, offset : number)
getTrackLength: function(): number
getTrackElapsedTime: function(): number
getGain: function(): number
setGain: function(gain : number)
setTrackList: function(trackList : {{string, string, boolean}}, enableRepeat : boolean)
addTrackList: function(trackList : {{string, string, boolean}}, enableRepeat : boolean)
setContextTag: function(contextTag : string)
end
Gui.MusicPlayer.goBack🔗
function Gui.MusicPlayer.goBack()
Goes back to the previous track in the music player.
Gui.MusicPlayer.goForward🔗
function Gui.MusicPlayer.goForward()
Goes forward to the next track in the music player.
Gui.MusicPlayer.togglePause🔗
function Gui.MusicPlayer.togglePause()
Toggles pause/play state of the music player.
Gui.MusicPlayer.getTitle🔗
function Gui.MusicPlayer.getTitle(): string
Gets the title of the currently playing track.
Returns
string— the track title
Gui.MusicPlayer.getArtist🔗
function Gui.MusicPlayer.getArtist(): string
Gets the artist of the currently playing track.
Returns
string— the track artist
Gui.MusicPlayer.hasPlaylist🔗
function Gui.MusicPlayer.hasPlaylist(): boolean
Checks if the music player has tracks loaded.
Returns
boolean— true if the music player has tracks
Gui.MusicPlayer.getPlaylistIndex🔗
function Gui.MusicPlayer.getPlaylistIndex(): integer
Gets the current track index (1-based).
Returns
integer— the current track index
Gui.MusicPlayer.setTrackListFromPlayList🔗
function Gui.MusicPlayer.setTrackListFromPlayList(playlist : string, startPaused : boolean, offset : number)
Sets the current playlist.
The current track will only start after the current track ends. To trigger the new playlist immediately, call goForward() right after this call.
Parameters
playlist:string— the playlist resource namestartPaused:boolean— if set, does not play the playlist, just prepares itoffset:number— playback offset in seconds (optional)
Gui.MusicPlayer.setPlaylist🔗
function Gui.MusicPlayer.setPlaylist(playlist : string)
Sets the current playlist. Only available while in-game.
The current track will only start after the current track ends. To trigger the new playlist immediately, call goForward() right after this call.
Parameters
playlist:string— the playlist resource name
Gui.MusicPlayer.getPlaylist🔗
function Gui.MusicPlayer.getPlaylist(): string
Gets the current playlist. Only available while in-game.
Returns
string— the resource name of the current playlist
Gui.MusicPlayer.isPlaying🔗
function Gui.MusicPlayer.isPlaying(): boolean
Checks if the music player is currently playing.
Returns
boolean— true if music is playing
Gui.MusicPlayer.playTrack🔗
function Gui.MusicPlayer.playTrack(trackName : string, offset : number)
Plays a track by name.
Parameters
trackName:string— the name of the track to playoffset:number— playback offset in seconds (optional)
Gui.MusicPlayer.playTrackFile🔗
function Gui.MusicPlayer.playTrackFile(filePath : string, offset : number)
Plays a specific file that might not be part of the current track list
Parameters
filePath:string— the path to the track fileoffset:number— playback offset in seconds (optional)
Gui.MusicPlayer.getTrackLength🔗
function Gui.MusicPlayer.getTrackLength(): number
Gets the length (duration) of the current track
Returns
number— the track duration in second
Gui.MusicPlayer.getTrackElapsedTime🔗
function Gui.MusicPlayer.getTrackElapsedTime(): number
Gets the time of the current track
Returns
number— the current time of the current track
Gui.MusicPlayer.getGain🔗
function Gui.MusicPlayer.getGain(): number
Gets the current gain (volume) of the music player.
Returns
number— the gain value
Gui.MusicPlayer.setGain🔗
function Gui.MusicPlayer.setGain(gain : number)
Sets the gain (volume) of the music player.
Parameters
gain:number— the gain value
Gui.MusicPlayer.setTrackList🔗
function Gui.MusicPlayer.setTrackList(trackList : {{string, string, boolean}}, enableRepeat : boolean)
Sets the track list for the music player, replaces the current track list.
Parameters
trackList:{{string, string, boolean}}— array of tuples containing track name, file path, and repeat flagenableRepeat:boolean— true to enable repeat for the entire list
Gui.MusicPlayer.addTrackList🔗
function Gui.MusicPlayer.addTrackList(trackList : {{string, string, boolean}}, enableRepeat : boolean)
Adds a track list to the music player. This doesn't replace the existing tracks
and once the added tracks are finish, the track previously playing will resume
Parameters
trackList:{{string, string, boolean}}— array of tuples containing track name, file path, and repeat flagenableRepeat:boolean— true to enable repeat for the entire list
Gui.MusicPlayer.setContextTag🔗
function Gui.MusicPlayer.setContextTag(contextTag : string)
Sets the context tag for the music player.
The context tag can be used to change the variant of a playing track.
Parameters
contextTag:string— the context tag to set
Gui.VoiceOverManager🔗
record Gui.VoiceOverManager stop: function()
play: function(voiceOverRes : string, delayInSeconds : number)
isPlaying: function(voiceOverRes : string): boolean
isPlayingAny: function(): boolean
getPlaying: function(): ResName
end
Gui.VoiceOverManager.stop🔗
function Gui.VoiceOverManager.stop()
Stops the current voice over playing
Gui.VoiceOverManager.play🔗
function Gui.VoiceOverManager.play(voiceOverRes : string, delayInSeconds : number)
Plays a new voice over
Parameters
voiceOverRes:string— the file path to the voice over to playdelayInSeconds:number— delay before the voice over starts
Gui.VoiceOverManager.isPlaying🔗
function Gui.VoiceOverManager.isPlaying(voiceOverRes : string): boolean
Checks whether a specific voice over is playing
Parameters
voiceOverRes:string— the voice over file to check
Returns
boolean— true if the voice over file is playing
Gui.VoiceOverManager.isPlayingAny🔗
function Gui.VoiceOverManager.isPlayingAny(): boolean
Checks whether any voice over is current playing
Returns
boolean— true if any voice over is playing
Gui.VoiceOverManager.getPlaying🔗
function Gui.VoiceOverManager.getPlaying(): ResName
Checks whether any voice over is current playing and returns the file path if one is playing
Returns
ResName— file path if any voice over is playing
Gui.ByEntity🔗
record Gui.ByEntity isLineEmptyOrVisible: function(Engine.Entity : Engine.Entity): boolean
isVisible: function(Engine.Entity : Engine.Entity): boolean
isVehicleVisible: function(Engine.Entity : Engine.Entity): boolean
end
Gui.ByEntity.isLineEmptyOrVisible🔗
function Gui.ByEntity.isLineEmptyOrVisible(Engine.Entity : Engine.Entity): boolean
Checks if line is empty or visible
Parameters
Engine.Entity:Engine.Entity— the line entity to check
Returns
boolean— true if the line is empty or visible
Gui.ByEntity.isVisible🔗
function Gui.ByEntity.isVisible(Engine.Entity : Engine.Entity): boolean
Checks if an entity is visible
Parameters
Engine.Entity:Engine.Entity— the entity to check
Returns
boolean— true if the entity is visible
Gui.ByEntity.isVehicleVisible🔗
function Gui.ByEntity.isVehicleVisible(Engine.Entity : Engine.Entity): boolean
Checks if vehicle is visible
Parameters
Engine.Entity:Engine.Entity— the vehicle entity to check
Returns
boolean— true if the vehicle is visible
Gui.ContextHelper🔗
[Expand All] [Collapse All]
record Gui.ContextHelper record SubjectState Visible: SubjectState
Focused: SubjectState
end
collectSubjectStates: function(idsOfInterest : {string}): {string : SubjectState}
getIdsOfActiveTool: function(): {string}
end
Gui.ContextHelper.SubjectState🔗
record Gui.ContextHelper.SubjectState Visible: SubjectState
Focused: SubjectState
end
Gui.ContextHelper.SubjectState.Visible🔗
Gui.ContextHelper.SubjectState.Visible: SubjectState
Gui.ContextHelper.SubjectState.Focused🔗
Gui.ContextHelper.SubjectState.Focused: SubjectState
Gui.ContextHelper.collectSubjectStates🔗
function Gui.ContextHelper.collectSubjectStates(idsOfInterest : {string}): {string : SubjectState}
Collects subject states for given ids
Parameters
idsOfInterest:{string}— ids to collect states for
Returns
{string : SubjectState}
Gui.ContextHelper.getIdsOfActiveTool🔗
function Gui.ContextHelper.getIdsOfActiveTool(): {string}
Returns
{string}
Gui.Construction🔗
record Gui.Construction setAngle: function(angle : number)
modify: function(construction : Engine.Entity)
getBrushIcons: function(): {string}
provideDustWheneverPossible: function(proposal : Proposal, proposalData : ProposalData)
getRefundableEntities: function(): {{Engine.Entity, integer}, {Engine.Revision, integer}}
updateRefundableEntities: function(resultEntities : {Engine.Entity}, proposal : Proposal.StreetProposal)
end
Gui.Construction.setAngle🔗
function Gui.Construction.setAngle(angle : number)
Sets the default construction angle for constructions.
Parameters
angle:number— the default construction angle
Gui.Construction.modify🔗
function Gui.Construction.modify(construction : Engine.Entity)
Modifies a construction
Parameters
construction:Engine.Entity— the construction entity
Gui.Construction.getBrushIcons🔗
function Gui.Construction.getBrushIcons(): {string}
Returns brush icons for construction menu
Returns
{string}— paths to brush icons for the construction menu
Gui.Construction.provideDustWheneverPossible🔗
function Gui.Construction.provideDustWheneverPossible(proposal : Proposal, proposalData : ProposalData)
Provides dust effects for proposal
Parameters
proposal:Proposal— the proposalproposalData:ProposalData— the proposal data
Gui.Construction.getRefundableEntities🔗
function Gui.Construction.getRefundableEntities(): {{Engine.Entity, integer}, {Engine.Revision, integer}}
Returns
{{Engine.Entity, integer}, {Engine.Revision, integer}}
Gui.Construction.updateRefundableEntities🔗
function Gui.Construction.updateRefundableEntities(resultEntities : {Engine.Entity}, proposal : Proposal.StreetProposal)
Updates refundable entities
Parameters
resultEntities:{Engine.Entity}— result entitiesproposal:Proposal.StreetProposal— the street proposal
Gui.Mission🔗
record Gui.Mission getMission: function(): string
getCampaign: function(): string
setZone: function(key : string, polygon : {Vec2f}, draw : boolean, drawColor : Vec4f, prohibitBuilding : boolean, playAnimation : boolean, zOffset : number)
setZoneCircle: function(key : string, center : Vec2f, radius : number, draw : boolean, drawColor : Vec4f, prohibitBuilding : boolean, playAnimation : boolean, zOffset : number)
removeZone: function(key : string)
setMarkerAtPosition: function(key : string, pos : Vec3f, type : string, scaling : number, isSelectable : boolean, fireSelectEntity : boolean)
setMarkerAtEntity: function(key : string, entity : Engine.Entity, type : string, scaling : number, isSelectable : boolean, fireSelectEntity : boolean)
removeMarker: function(key : string)
setMovePathVisualizationAtEntity: function(key : string, entity : Engine.Entity, color : Vec3f)
removeMovePathVisualization: function(key : string)
playCutscene: function(filePath : string, resolveLanguageFolder : boolean, entityToEntityMap : {Engine.Entity : Engine.Entity})
isCutscenePlaying: function(): boolean
getCutsceneElapsedTime: function(): number
end
Gui.Mission.getMission🔗
function Gui.Mission.getMission(): string
Get the current mission
Returns
string— the mission name
Gui.Mission.getCampaign🔗
function Gui.Mission.getCampaign(): string
Get the current campaign
Returns
string— the campaign name
Gui.Mission.setZone🔗
function Gui.Mission.setZone(key : string, polygon : {Vec2f}, draw : boolean, drawColor : Vec4f, prohibitBuilding : boolean, playAnimation : boolean, zOffset : number)
Adds a zone
Parameters
key:string— the key (name) of the zonepolygon:{Vec2f}— the shape of the zone as a list of 2d positiondraw:boolean— if the zone should be drawndrawColor:Vec4f— the color of the zoneprohibitBuilding:boolean— if prevented or not to build inside the zoneplayAnimation:boolean— if player zone animation (optional), default to truezOffset:number— (optional), default to terrain level
Gui.Mission.setZoneCircle🔗
function Gui.Mission.setZoneCircle(key : string, center : Vec2f, radius : number, draw : boolean, drawColor : Vec4f, prohibitBuilding : boolean, playAnimation : boolean, zOffset : number)
Adds a zone as a cylinder
Parameters
key:string— the key (name) of the zonecenter:Vec2f— the center of the zoneradius:number— the radius of the zonedraw:boolean— if the zone should be drawndrawColor:Vec4f— the color of the zoneprohibitBuilding:boolean— if prevented or not to build inside the zoneplayAnimation:boolean— if player zone animation (optional), default to truezOffset:number— (optional), default to terrain level
Gui.Mission.removeZone🔗
function Gui.Mission.removeZone(key : string)
Removes a zone
Parameters
key:string— the key of the zone
Gui.Mission.setMarkerAtPosition🔗
function Gui.Mission.setMarkerAtPosition(key : string, pos : Vec3f, type : string, scaling : number, isSelectable : boolean, fireSelectEntity : boolean)
Sets marker at the given position
Parameters
key:string— the key of the markerpos:Vec3f— the position of the markertype:string— type of marker (optional)scaling:number— scaling of marker (optional)isSelectable:boolean— whether marker is selectablefireSelectEntity:boolean— whether selecting the marker also selects the underlying entity (default is true)
Gui.Mission.setMarkerAtEntity🔗
function Gui.Mission.setMarkerAtEntity(key : string, entity : Engine.Entity, type : string, scaling : number, isSelectable : boolean, fireSelectEntity : boolean)
Sets marker at the given entity
Parameters
key:string— the key of the markerentity:Engine.Entity— the entitytype:string— optional typescaling:number— optional scalingisSelectable:boolean— whether marker is selectablefireSelectEntity:boolean— whether selecting the marker also selects the underlying entity (default is true)
Gui.Mission.removeMarker🔗
function Gui.Mission.removeMarker(key : string)
Removes a marker
Parameters
key:string— the key of the marker
Gui.Mission.setMovePathVisualizationAtEntity🔗
function Gui.Mission.setMovePathVisualizationAtEntity(key : string, entity : Engine.Entity, color : Vec3f)
Renderes the move path of an entity dynamically
ATTENTION: at the moment, only ships are supported.
Parameters
key:string— unique keyentity:Engine.Entity— entitycolor:Vec3f— optional color
Gui.Mission.removeMovePathVisualization🔗
function Gui.Mission.removeMovePathVisualization(key : string)
Removes the move path of an entity dynamically
Parameters
key:string— unique key
Gui.Mission.playCutscene🔗
function Gui.Mission.playCutscene(filePath : string, resolveLanguageFolder : boolean, entityToEntityMap : {Engine.Entity : Engine.Entity})
Plays a cutscene.
Parameters
filePath:string— the filepath to the cutscene keyframe definition that should be playedresolveLanguageFolder:boolean— automatically resolve the selected keyframe file by languageentityToEntityMap:{Engine.Entity : Engine.Entity}— maps entities from the keyframe file to possible runtime entities
Gui.Mission.isCutscenePlaying🔗
function Gui.Mission.isCutscenePlaying(): boolean
Checks if a cutscene is currently playing.
Returns
boolean
Gui.Mission.getCutsceneElapsedTime🔗
function Gui.Mission.getCutsceneElapsedTime(): number
Return the current cutscene time for syncing mission related systems to the cutscene
Returns
number— the actual simulated cutscene time
Gui.Game🔗
record Gui.Game isSavegameUIBlocked: function(): boolean
setInGameMenuPause: function(pause : boolean)
getGuiSaveData: function(modId : string): {<any type> : <any type>}
setGuiSaveData: function(modId : string, data : {<any type> : <any type>})
getEstimatedMaximumGameSpeed: function(): integer
isMapEditor: function(): boolean
getDefaultSavegameId: function(): string
setEnvironment: function(environment : ResName)
getEnvironment: function(): ResName
end
Gui.Game.isSavegameUIBlocked🔗
function Gui.Game.isSavegameUIBlocked(): boolean
Returns if the UI is blocked by a savegame in progress
Returns
boolean— true if the ui is blocked by a savegame
Gui.Game.setInGameMenuPause🔗
function Gui.Game.setInGameMenuPause(pause : boolean)
Sets if the game pause menu is open
Parameters
pause:boolean— true if the user is in the pause menu
Gui.Game.getGuiSaveData🔗
function Gui.Game.getGuiSaveData(modId : string): {<any type> : <any type>}
Returns the GUI SaveData
Parameters
modId:string— the mod to get the user data for
Returns
{<any type> : <any type>}— the userData as a lua table
Gui.Game.setGuiSaveData🔗
function Gui.Game.setGuiSaveData(modId : string, data : {<any type> : <any type>})
Sets the GUI SaveData
Parameters
modId:string— the mod to set the user data fordata:{<any type> : <any type>}— the user data
Gui.Game.getEstimatedMaximumGameSpeed🔗
function Gui.Game.getEstimatedMaximumGameSpeed(): integer
Returns the (estimated) maximum possible game speed based on actual simulation timings.
Only available in GUI thread.
Returns
integer— maximum game speed (or 0 if not enough data available)
Gui.Game.isMapEditor🔗
function Gui.Game.isMapEditor(): boolean
Returns if the game is currently in the map editor
Returns
boolean— true if in the map editor
Gui.Game.getDefaultSavegameId🔗
function Gui.Game.getDefaultSavegameId(): string
Returns the default savegame id
Returns
string— the default savegame id
Gui.Game.setEnvironment🔗
function Gui.Game.setEnvironment(environment : ResName)
Sets an environment. This value is saved in the GUI SaveData and will be restored on next load.
Changing it will not change the current environment, for that api.gui.rendering.setEnvironment needs to be as well called.
Parameters
environment:ResName— the resource name for the environment
Gui.Game.getEnvironment🔗
function Gui.Game.getEnvironment(): ResName
Returns the resource name of the current environment
Returns
ResName— the environment resource name
Gui.Guide🔗
[Expand All] [Collapse All]
record Gui.Guide record GuidePosition Left: GuidePosition
Right: GuidePosition
Above: GuidePosition
Below: GuidePosition
end
record FreeGuidePosition High: FreeGuidePosition
Low: FreeGuidePosition
end
record GuideTarget new: function(string, GuidePosition): GuideTarget
idOrTag: string
position: GuidePosition
end
trySpawnGuideById: function({GuideTarget}, string, string): boolean
trySpawnGuideFree: function(FreeGuidePosition, string, string): boolean
completeGuideById: function({GuideTarget}): boolean
end
Gui.Guide.GuidePosition🔗
record Gui.Guide.GuidePosition Left: GuidePosition
Right: GuidePosition
Above: GuidePosition
Below: GuidePosition
end
Gui positioning of the guide "bookmark" with respect to target component
Gui.Guide.GuidePosition.Left🔗
Gui.Guide.GuidePosition.Left: GuidePosition
Gui.Guide.GuidePosition.Right🔗
Gui.Guide.GuidePosition.Right: GuidePosition
Gui.Guide.GuidePosition.Above🔗
Gui.Guide.GuidePosition.Above: GuidePosition
Gui.Guide.GuidePosition.Below🔗
Gui.Guide.GuidePosition.Below: GuidePosition
Gui.Guide.FreeGuidePosition🔗
record Gui.Guide.FreeGuidePosition High: FreeGuidePosition
Low: FreeGuidePosition
end
Gui positioning of the guide "bookmark" with respect to the entire screen
Gui.Guide.FreeGuidePosition.High🔗
Gui.Guide.FreeGuidePosition.High: FreeGuidePosition
Gui.Guide.FreeGuidePosition.Low🔗
Gui.Guide.FreeGuidePosition.Low: FreeGuidePosition
Gui.Guide.GuideTarget🔗
record Gui.Guide.GuideTarget new: function(string, GuidePosition): GuideTarget
idOrTag: string
position: GuidePosition
end
A target component for the guide system
Gui.Guide.GuideTarget.new🔗
function Gui.Guide.GuideTarget.new(string, GuidePosition): GuideTarget
Parameters
stringGuidePosition
Returns
GuideTarget
Gui.Guide.GuideTarget.idOrTag🔗
Gui.Guide.GuideTarget.idOrTag: string
Gui.Guide.GuideTarget.position🔗
Gui.Guide.GuideTarget.position: GuidePosition
Gui.Guide.trySpawnGuideById🔗
function Gui.Guide.trySpawnGuideById({GuideTarget}, string, string): boolean
Parameters
{GuideTarget}stringstring
Returns
boolean
Gui.Guide.trySpawnGuideFree🔗
function Gui.Guide.trySpawnGuideFree(FreeGuidePosition, string, string): boolean
Parameters
FreeGuidePositionstringstring
Returns
boolean
Gui.Guide.completeGuideById🔗
function Gui.Guide.completeGuideById({GuideTarget}): boolean
Parameters
{GuideTarget}
Returns
boolean
Gui.Rendering🔗
record Gui.Rendering setEnvironment: function(environment : Environment)
getEnvironment: function(): Environment
spawnDust: function(bbMin : Vec3f, bbMax : Vec3f, transf : Mat4f)
getFrameTime01: function(): number
end
Gui.Rendering.setEnvironment🔗
function Gui.Rendering.setEnvironment(environment : Environment)
Sets an environment. This will change the current environment, but will not persist the environment resource name.
It might be necessary to as well call api.gui.game.setEnvironment if a different environment resource is set.
Parameters
environment:Environment— the description for the environment
Gui.Rendering.getEnvironment🔗
function Gui.Rendering.getEnvironment(): Environment
Returns the current environment data
Returns
Environment— the current environment data
Gui.Rendering.spawnDust🔗
function Gui.Rendering.spawnDust(bbMin : Vec3f, bbMax : Vec3f, transf : Mat4f)
Makes a dust cloud appear
Parameters
bbMin:Vec3f— bounding box minbbMax:Vec3f— bounding box maxtransf:Mat4f— transformation matrix
Gui.Rendering.getFrameTime01🔗
function Gui.Rendering.getFrameTime01(): number
Returns
number
Gui.Map🔗
record Gui.Map setMapSeedText: function(seed : string)
reloadMaterialIndexManagerPipeline: function()
openTerrainEditor: function()
closeTerrainEditor: function()
end
Gui.Map.setMapSeedText🔗
function Gui.Map.setMapSeedText(seed : string)
Sets seed for the map. Only available in GUI thread.
Parameters
seed:string— the seed
Gui.Map.reloadMaterialIndexManagerPipeline🔗
function Gui.Map.reloadMaterialIndexManagerPipeline()
Reloads the material index manager pipeline.
Gui.Map.openTerrainEditor🔗
function Gui.Map.openTerrainEditor()
Gui.Map.closeTerrainEditor🔗
function Gui.Map.closeTerrainEditor()
Gui.BenchMark🔗
[Expand All] [Collapse All]
record Gui.BenchMark record SimTime frameTime: integer
gameTime: integer
end
getBeginFrameTimes: function(): {integer}
getEventTimes: function(): {integer}
getCoreStepTimes: function(): {integer}
getRenderTimes: function(): {integer}
getSwapTimes: function(): {integer}
getReplicateTimes: function(): {SimTime}
getCommandTimes: function(): {SimTime}
getGameStepTimes: function(): {SimTime}
end
Gui.BenchMark.SimTime🔗
record Gui.BenchMark.SimTime frameTime: integer
gameTime: integer
end
Simulation time frame along with game time at moment of capture
Gui.BenchMark.SimTime.frameTime🔗
Gui.BenchMark.SimTime.frameTime: integer
Gui.BenchMark.SimTime.gameTime🔗
Gui.BenchMark.SimTime.gameTime: integer
Gui.BenchMark.getBeginFrameTimes🔗
function Gui.BenchMark.getBeginFrameTimes(): {integer}
Returns the rendering preparation time
Returns
{integer}
Gui.BenchMark.getEventTimes🔗
function Gui.BenchMark.getEventTimes(): {integer}
Returns the events processing time
Returns
{integer}
Gui.BenchMark.getCoreStepTimes🔗
function Gui.BenchMark.getCoreStepTimes(): {integer}
Returns the gui update time
Returns
{integer}
Gui.BenchMark.getRenderTimes🔗
function Gui.BenchMark.getRenderTimes(): {integer}
Returns the rendering time
Returns
{integer}
Gui.BenchMark.getSwapTimes🔗
function Gui.BenchMark.getSwapTimes(): {integer}
Returns the rendering finish time
Returns
{integer}
Gui.BenchMark.getReplicateTimes🔗
function Gui.BenchMark.getReplicateTimes(): {SimTime}
Returns the sync time between gui and simulation. Only available in GUI thread.
Returns
{SimTime}
Gui.BenchMark.getCommandTimes🔗
function Gui.BenchMark.getCommandTimes(): {SimTime}
Returns commands processing time. Only available in GUI thread.
Returns
{SimTime}
Gui.BenchMark.getGameStepTimes🔗
function Gui.BenchMark.getGameStepTimes(): {SimTime}
Returns the simulation update time. Only available in GUI thread.
Returns
{SimTime}
Gui.Debug🔗
record Gui.Debug selectEntity: function(entity : Engine.Entity)
end
Gui.Debug.selectEntity🔗
function Gui.Debug.selectEntity(entity : Engine.Entity)
Set the current debug entity
Parameters
entity:Engine.Entity— the entity
Gui.Achievements🔗
record Gui.Achievements areStatsDisabled: function(): boolean
unlockAchievement: function(achievement : string)
isAchievementUnlockable: function(achievement : string): boolean
isAchievementUnlocked: function(achievement : string): boolean
updateStat: function(playerStat : string, value : number)
setStat: function(playerStat : string, value : number)
getStatValue: function(playerStat : string): number
setStatExtraData: function(playerStat : string, data : {<any type> : <any type>})
getStatExtraData: function(playerStat : string): {<any type> : <any type>}
setEarnedSFX: function(sfx : {FilePath})
end
Gui.Achievements.areStatsDisabled🔗
function Gui.Achievements.areStatsDisabled(): boolean
Checkes whether player stats are disabled
Returns
boolean— true if player stats are disabled
Gui.Achievements.unlockAchievement🔗
function Gui.Achievements.unlockAchievement(achievement : string)
Unlocks an achievement based on its string id
Parameters
achievement:string— achievement to unlock
Gui.Achievements.isAchievementUnlockable🔗
function Gui.Achievements.isAchievementUnlockable(achievement : string): boolean
Checks whether an achievement can be unlocked
Parameters
achievement:string— achievement to check
Returns
boolean— true if the achievement can be unlocked
Gui.Achievements.isAchievementUnlocked🔗
function Gui.Achievements.isAchievementUnlocked(achievement : string): boolean
Checks whether an achievement is unlocked (completed)
Parameters
achievement:string— achievement to check
Returns
boolean— true if the achievement is unlocked
Gui.Achievements.updateStat🔗
function Gui.Achievements.updateStat(playerStat : string, value : number)
Increments a player stat value by the provided value
Parameters
playerStat:string— the stat id to updatevalue:number— the value to add to the stat
Gui.Achievements.setStat🔗
function Gui.Achievements.setStat(playerStat : string, value : number)
Sets a player stat value, replacing the current value by the provided one
Parameters
playerStat:string— the stat id to updatevalue:number— the value to add to the stat
Gui.Achievements.getStatValue🔗
function Gui.Achievements.getStatValue(playerStat : string): number
Gets a player stat value
Parameters
playerStat:string— the stat id to get
Returns
number— the current value of the stat
Gui.Achievements.setStatExtraData🔗
function Gui.Achievements.setStatExtraData(playerStat : string, data : {<any type> : <any type>})
Sets extra data associated with a stat.
Extra data are stored locally in the player profile and allow tracking of more informations if necessary.
Parameters
playerStat:string— the stat id to set the extra data fordata:{<any type> : <any type>}— the extra data to set
Gui.Achievements.getStatExtraData🔗
function Gui.Achievements.getStatExtraData(playerStat : string): {<any type> : <any type>}
Gets extra data associated with a stat.
Extra data are stored locally in the player profile and allow tracking of more informations if necessary.
Parameters
playerStat:string— the stat id to get the extra data for
Returns
{<any type> : <any type>}— the extra data
Gui.Achievements.setEarnedSFX🔗
function Gui.Achievements.setEarnedSFX(sfx : {FilePath})
Set sound effect(s) to be played when an achievement is earned.
Parameters
sfx:{FilePath}— vector of filepaths pointing to .wav files with according sound effect(s)
Gui.GenericRep🔗
record Gui.GenericRep getAllOfType: function(typeName : string, includeInvisible : boolean): {integer}
end
Gui.GenericRep.getAllOfType🔗
function Gui.GenericRep.getAllOfType(typeName : string, includeInvisible : boolean): {integer}
Gets all the Genereic Resource Type of a given type name
Only allows typeName in { "guiresoverwrite", "gui_res" }, for other types, use api.res.genericRep
Parameters
typeName:string— the type nameincludeInvisible:boolean— whether to include invisible resources
Returns
{integer}
Gui.Backend🔗
[Expand All] [Collapse All]
record Gui.Backend record LegalDocument title: string
text: string
end
isInitialized: function(): boolean
hasLegalDocuments: function()
getLegalDocuments: function(): {PdxLegalDocumentType}
isAccountLoggedIn: function(): boolean
loginAccount: function(string, string): PdxFuture<PdxLoginResult>
logoutAccount: function(): PdxFuture<PdxResult>
getAccountInfo: function(): PdxFuture<PdxAccountInfo>
getProfile: function(boolean): PdxFuture<PdxProfileResult>
createProfile: function(string, boolean): PdxFuture<PdxResult>
renameProfile: function(string, boolean): PdxFuture<PdxResult>
getCountries: function(): {PdxCountry}
getLegalDocument: function(PdxLegalDocumentType): PdxFuture<PdxLegalDocument>
createAccount: function(string, string, string, integer, boolean): PdxFuture<PdxResult>
supportsAccountLinking: function(): boolean
getThirdPartyLinkState: function(): PdxFuture<PdxThirdPartyLinkState>
getThirdPartyAutoLoginPromptState: function(): PdxThirdPartyAutoLoginPromptState
setThirdPartyAutoLoginPromptState: function(PdxThirdPartyAutoLoginPromptState)
linkThirdPartyAccount: function(): PdxFuture<PdxResult>
unlinkThirdPartyAccount: function(): PdxFuture<PdxResult>
loginThirdPartyAccount: function(): PdxFuture<PdxLoginResult>
end
Gui.Backend.LegalDocument🔗
record Gui.Backend.LegalDocument title: string
text: string
end
Gui.Backend.LegalDocument.title🔗
Gui.Backend.LegalDocument.title: string
Gui.Backend.LegalDocument.text🔗
Gui.Backend.LegalDocument.text: string
Gui.Backend.isInitialized🔗
function Gui.Backend.isInitialized(): boolean
Returns
boolean
Gui.Backend.hasLegalDocuments🔗
function Gui.Backend.hasLegalDocuments()
Gui.Backend.getLegalDocuments🔗
function Gui.Backend.getLegalDocuments(): {PdxLegalDocumentType}
Returns
{PdxLegalDocumentType}
Gui.Backend.isAccountLoggedIn🔗
function Gui.Backend.isAccountLoggedIn(): boolean
Returns
boolean
Gui.Backend.loginAccount🔗
function Gui.Backend.loginAccount(string, string): PdxFuture<PdxLoginResult>
Parameters
stringstring
Returns
PdxFuture<PdxLoginResult>
Gui.Backend.logoutAccount🔗
function Gui.Backend.logoutAccount(): PdxFuture<PdxResult>
Returns
PdxFuture<PdxResult>
Gui.Backend.getAccountInfo🔗
function Gui.Backend.getAccountInfo(): PdxFuture<PdxAccountInfo>
Returns
PdxFuture<PdxAccountInfo>
Gui.Backend.getProfile🔗
function Gui.Backend.getProfile(boolean): PdxFuture<PdxProfileResult>
Parameters
boolean
Returns
PdxFuture<PdxProfileResult>
Gui.Backend.createProfile🔗
function Gui.Backend.createProfile(string, boolean): PdxFuture<PdxResult>
Parameters
stringboolean
Returns
PdxFuture<PdxResult>
Gui.Backend.renameProfile🔗
function Gui.Backend.renameProfile(string, boolean): PdxFuture<PdxResult>
Parameters
stringboolean
Returns
PdxFuture<PdxResult>
Gui.Backend.getCountries🔗
function Gui.Backend.getCountries(): {PdxCountry}
Returns
{PdxCountry}
Gui.Backend.getLegalDocument🔗
function Gui.Backend.getLegalDocument(PdxLegalDocumentType): PdxFuture<PdxLegalDocument>
Parameters
PdxLegalDocumentType
Returns
PdxFuture<PdxLegalDocument>
Gui.Backend.createAccount🔗
function Gui.Backend.createAccount(string, string, string, integer, boolean): PdxFuture<PdxResult>
Parameters
stringstringstringintegerboolean
Returns
PdxFuture<PdxResult>
Gui.Backend.supportsAccountLinking🔗
function Gui.Backend.supportsAccountLinking(): boolean
Returns
boolean
Gui.Backend.getThirdPartyLinkState🔗
function Gui.Backend.getThirdPartyLinkState(): PdxFuture<PdxThirdPartyLinkState>
Returns
PdxFuture<PdxThirdPartyLinkState>
Gui.Backend.getThirdPartyAutoLoginPromptState🔗
function Gui.Backend.getThirdPartyAutoLoginPromptState(): PdxThirdPartyAutoLoginPromptState
Returns
PdxThirdPartyAutoLoginPromptState
Gui.Backend.setThirdPartyAutoLoginPromptState🔗
function Gui.Backend.setThirdPartyAutoLoginPromptState(PdxThirdPartyAutoLoginPromptState)
Parameters
PdxThirdPartyAutoLoginPromptState
Gui.Backend.linkThirdPartyAccount🔗
function Gui.Backend.linkThirdPartyAccount(): PdxFuture<PdxResult>
Returns
PdxFuture<PdxResult>
Gui.Backend.unlinkThirdPartyAccount🔗
function Gui.Backend.unlinkThirdPartyAccount(): PdxFuture<PdxResult>
Returns
PdxFuture<PdxResult>
Gui.Backend.loginThirdPartyAccount🔗
function Gui.Backend.loginThirdPartyAccount(): PdxFuture<PdxLoginResult>
Returns
PdxFuture<PdxLoginResult>
Gui.mouse🔗
Gui.mouse: Mouse
Gui.key🔗
Gui.key: Key
Gui.dnd🔗
Gui.dnd: DnD
Gui.inputAction🔗
Gui.inputAction: InputAction
Gui.byId🔗
Gui.byId: ById
Gui.camera🔗
Gui.camera: Camera
Gui.sound🔗
Gui.sound: Sound
Gui.musicPlayer🔗
Gui.musicPlayer: MusicPlayer
Gui.backend🔗
Gui.backend: Backend
Gui.voiceOverManager🔗
Gui.voiceOverManager: VoiceOverManager
Gui.byEntity🔗
Gui.byEntity: ByEntity
Gui.contextHelper🔗
Gui.contextHelper: ContextHelper
Gui.construction🔗
Gui.construction: Construction
Gui.mission🔗
Gui.mission: Mission
Gui.guide🔗
Gui.guide: Guide
Gui.game🔗
Gui.game: Game
Gui.map🔗
Gui.map: Map
Gui.benchMark🔗
Gui.benchMark: BenchMark
Gui.rendering🔗
Gui.rendering: Rendering
Gui.debug🔗
Gui.debug: Debug
Gui.achievements🔗
Gui.achievements: Achievements
Gui.genericRep🔗
Gui.genericRep: GenericRep
Gui.StyleSheet🔗
Gui.StyleSheet: StyleSheet
Gui.NinePatch🔗
Gui.NinePatch: NinePatch
Category: globals🔗
NinePatch🔗
global record NinePatch new: function(): NinePatch
fileName: string
horizontal: {integer}
vertical: {integer}
flipHorizontally: boolean
repeatHorizontally: boolean
repeatVertically: boolean
repeatFactor: number
end
Nine-patch image description.
NinePatch.new🔗
function NinePatch.new(): NinePatch
Returns
NinePatch
NinePatch.fileName🔗
NinePatch.fileName: string
NinePatch.horizontal🔗
NinePatch.horizontal: {integer}
NinePatch.vertical🔗
NinePatch.vertical: {integer}
NinePatch.flipHorizontally🔗
NinePatch.flipHorizontally: boolean
NinePatch.repeatHorizontally🔗
NinePatch.repeatHorizontally: boolean
NinePatch.repeatVertically🔗
NinePatch.repeatVertically: boolean
NinePatch.repeatFactor🔗
NinePatch.repeatFactor: number
Repeat factor (must be positive).
StyleSheet🔗
global record StyleSheet new: function(): StyleSheet
backgroundColor: Vec4f
backgroundColor1: Vec4f
backgroundColor2: Vec4f
backgroundImage1: NinePatch
backgroundImage2: NinePatch
borderWidth: Vec4f
borderColor: Vec4f
color: Vec4f
size: Vec2f
padding: Vec4f
fontSize: integer
borderImage: NinePatch
anchorPoint: Vec2f
end
Stylesheet used by GUI components.
StyleSheet.new🔗
function StyleSheet.new(): StyleSheet
Returns
StyleSheet
StyleSheet.backgroundColor🔗
StyleSheet.backgroundColor: Vec4f
StyleSheet.backgroundColor1🔗
StyleSheet.backgroundColor1: Vec4f
StyleSheet.backgroundColor2🔗
StyleSheet.backgroundColor2: Vec4f
StyleSheet.backgroundImage1🔗
StyleSheet.backgroundImage1: NinePatch
StyleSheet.backgroundImage2🔗
StyleSheet.backgroundImage2: NinePatch
StyleSheet.borderWidth🔗
StyleSheet.borderWidth: Vec4f
StyleSheet.borderColor🔗
StyleSheet.borderColor: Vec4f
StyleSheet.color🔗
StyleSheet.color: Vec4f
StyleSheet.size🔗
StyleSheet.size: Vec2f
StyleSheet.padding🔗
StyleSheet.padding: Vec4f
StyleSheet.fontSize🔗
StyleSheet.fontSize: integer
StyleSheet.borderImage🔗
StyleSheet.borderImage: NinePatch
StyleSheet.anchorPoint🔗
StyleSheet.anchorPoint: Vec2f