Script v1_7_1_0
- AI
- Animals
- Collections
- Contracts
- Debug
- Economy
- Elements
- EnvironmentalScore
- Errors
- Events
- GUI
- Handtools
- Hud
- I3d
- Input
- Jobs
- Maps
- Materials
- Misc
- Objects
- Parameters
- Placeables
- Placement
- Player
- Shop
- Sounds
- Specialization
- Specializations
- StateMachine
- Statistics
- Tasks
- Triggers
- Utils
- Vehicles
Engine v1_7_1_0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- general
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- NoteNode
- Overlays
- Particle System
- Physics
- Rendering
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- VoiceChat
- XML
Foundation Reference
TextBackdropElement
DescriptionElement that sizes depending on the size of its child text elementParent
BitmapElementFunctions
copyAttributes
DescriptionDefinitioncopyAttributes()Code
42 | function TextBackdropElement:copyAttributes(src) |
43 | TextBackdropElement:superClass().copyAttributes(self, src) |
44 | |
45 | self.padding = table.copy(src.padding) |
46 | end |
loadFromXML
DescriptionDefinitionloadFromXML()Code
26 | function TextBackdropElement:loadFromXML(xmlFile, key) |
27 | TextBackdropElement:superClass().loadFromXML(self, xmlFile, key) |
28 | |
29 | self.padding = GuiUtils.getNormalizedValues(getXMLString(xmlFile, key.."#padding"), self.outputSize, self.padding) |
30 | end |
loadProfile
DescriptionDefinitionloadProfile()Code
34 | function TextBackdropElement:loadProfile(profile, applyProfile) |
35 | TextBackdropElement:superClass().loadProfile(self, profile, applyProfile) |
36 | |
37 | self.padding = GuiUtils.getNormalizedValues(profile:getValue("padding"), self.outputSize, self.padding) |
38 | end |
new
DescriptionDefinitionnew()Code
16 | function TextBackdropElement.new(target, custom_mt) |
17 | local self = BitmapElement.new(target, custom_mt or TextBackdropElement_mt) |
18 | |
19 | self.padding = {0, 0, 0, 0} -- left, top, right, bottom |
20 | |
21 | return self |
22 | end |