Script v1_7_1_0
- AI
- Animals
- Collections
- Contracts
- Debug
- Economy
- Elements
- EnvironmentalScore
- Errors
- Events
- GUI
- AnimalScreen
- AnimationElement
- BitmapElement
- BoxLayoutElement
- BreadcrumbsElement
- ButtonElement
- ButtonOverlay
- ChatWindow
- CheckedOptionElement
- ClearElement
- ColorPickButtonElement
- ConstructionScreen
- ContextActionDisplay
- ControlBarDisplay
- DialogElement
- DynamicFadedBitmapElement
- FillLevelsDisplay
- FlowLayoutElement
- FocusManager
- FrameElement
- FrameReferenceElement
- GameInfoDisplay
- GameInfoDisplayMobile
- GamePausedDisplay
- Gui
- GuiDataSource
- GuiElement
- GuiMixin
- GuiOverlay
- GuiProfile
- GuiSoundPlayer
- GuiTopDownCamera
- GuiTopDownCursor
- GuiUtils
- HUDDisplayElement
- HUDElement
- HUDFrameElement
- HUDPopupMessage
- HUDSliderElement
- HUDTextDisplay
- IndexChangeSubjectMixin
- IndexStateElement
- InfoDisplay
- InfoHUDBox
- InGameIcon
- IngameMap
- IngameMapElement
- InputGlyphElement
- InputGlyphElementUI
- InputHelpDisplay
- KeyValueInfoHUDBox
- ListElement
- ListItemElement
- MapOverlayGenerator
- MixerWagonHUDExtension
- MultiTextOptionElement
- MultiValueTween
- Overlay
- PagingElement
- PictureElement
- PlatformIconElement
- PlayerControlPadDisplay
- PlaySampleMixin
- RenderElement
- RoundStatusBar
- ScreenElement
- ScrollingLayoutElement
- SettingsModel
- SideNotification
- SideNotificationMobile
- SliderElement
- SpeakerDisplay
- SpeedMeterDisplay
- SpeedSliderDisplay
- StatusBar
- SteeringSliderDisplay
- TabbedMenu
- TabbedMenuFrameElement
- TabbedMenuWithDetails
- TableElement
- TableHeaderElement
- TerrainLayerElement
- TextBackdropElement
- TextElement
- TextInputElement
- ThreePartBitmapElement
- TimerElement
- ToggleButtonElement
- TopNotification
- Tween
- TweenSequence
- VariableWorkWidthHUDExten...
- VehicleHUDExtension
- VehicleSchemaDisplay
- VideoElement
- WardrobeScreen
- Handtools
- Hud
- I3d
- Input
- Jobs
- Maps
- Materials
- Misc
- Objects
- Parameters
- Placeables
- Placement
- Player
- Shop
- Sounds
- Specialization
- Specializations
- StateMachine
- Statistics
- Tasks
- Triggers
- Utils
- Vehicles
Engine v1_7_1_0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- general
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- NoteNode
- Overlays
- Particle System
- Physics
- Rendering
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- VoiceChat
- XML
Foundation Reference
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 |