Script v1.7.1.0
- AI
- Animals
- Contracts
- Debug
- Economy
- Effects
- Events
- Farms
- GUI
- Handtools
- I3d
- Materials
- Misc
- Objects
- AnimatedMapObject
- AnimatedObject
- AnimatedObjectEvent
- Bale
- Basketball
- Bga
- BgaSellStation
- BunkerSilo
- BuyingStation
- DigitalDisplay
- DogBall
- HelpIcons
- LoadingStation
- NightIllumination
- Nightlight2
- NightlightFlicker
- PhysicsObject
- Rotator
- SellingStation
- SimParticleSystem
- Storage
- StorageSystem
- SunAdmirer
- TourIcons
- UnloadingStation
- VehicleSellingPoint
- WildlifeSpawner
- Placeables
- Player
- Shop
- Sounds
- Specializations
- Triggers
- Utils
- Vehicles
- Weather
Engine v1.7.1.0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- Overlays
- Particle System
- Physics
- Rendering
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- XML
- general
Foundation Reference
DigitalDisplay
Functionsload
DescriptionDefinitionload()Code
21 | function DigitalDisplay:load(id, xmlFile, key) |
22 | |
23 | self.rootNode = id |
24 | self.baseNode = I3DUtil.indexToObject(id, getXMLString(xmlFile, key.."#baseNode")) |
25 | self.precision = getXMLInt(xmlFile, key.."#precision") or 0 |
26 | self.showZero = Utils.getNoNil(getXMLBool(xmlFile, key.."#showZero"), true) |
27 | |
28 | if self.baseNode == nil then |
29 | return false |
30 | end |
31 | |
32 | return true |
33 | end |
new
DescriptionDefinitionnew()Code
14 | function DigitalDisplay:new(customMt) |
15 | local self = setmetatable({}, customMt or DigitalDisplay_mt) |
16 | return self |
17 | end |
setValue
DescriptionDefinitionsetValue()Code
37 | function DigitalDisplay:setValue(value) |
38 | if self.baseNode ~= nil then |
39 | I3DUtil.setNumberShaderByValue(self.baseNode, math.max(0, value), self.precision, self.showZero) |
40 | end |
41 | end |