Script v1.7.1.0
- AI
- Animals
- Contracts
- Debug
- Economy
- Effects
- Events
- Farms
- GUI
- Handtools
- I3d
- Materials
- Misc
- Objects
- 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
- JointConstructor:setActors
- JointConstructor:setJointTransforms
- addDifferential
- addForce
- addImpulse
- addTorque
- addTorqueImpulse
- addVehicleLink
- computeWheelShapeTireForces
- createCCT
- createWheelShape
- getAngularDamping
- getAngularVelocity
- getCCTCollisionFlags
- getCenterOfMass
- getCollisionMask
- getDensity
- getLinearDamping
- getLinearVelocity
- getMass
- getMotorRotationSpeed
- getRigidBodyType
- getVelocityAtLocalPos
- getVelocityAtWorldPos
- getVolume
- getWheelShapeAxleSpeed
- getWheelShapeContactForce
- getWheelShapeContactNormal
- getWheelShapeContactObject
- getWheelShapeContactPoint
- getWheelShapePosition
- getWheelShapeSlip
- moveCCT
- overlapBox
- overlapSphere
- raycastAll
- raycastClosest
- removeCCT
- setAngularDamping
- setAngularVelocity
- setCenterOfMass
- setCollisionMask
- setFrictionVelocity
- setJointDrive
- setLinearDamping
- setLinearVelocity
- setMass
- setRigidBodyType
- setSolverIterationCount
- setWheelShapeForcePoint
- setWheelShapeProps
- setWheelShapeTireFriction
- simulatePhysics
- simulatePhysicsTimeScale
- updateDifferential
- Rendering
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- XML
- general
Foundation Reference
GuiMixin
DescriptionGuiElement mixin base class. Implements base functionality for GUI element mixins. All other GUI mixins should be descendants of this class.Functions
addTo
DescriptionAdd a mixin to a GuiElement. Adds mixin methods to the element which can then be used. A mixin's state is located in "element[mixinType]".Definition
addTo()Code
41 | function GuiMixin:addTo(guiElement) |
42 | if not guiElement[self.mixinType] then |
43 | guiElement[self.mixinType] = self |
44 | guiElement.hasIncluded = self.hasIncluded |
45 | |
46 | return true |
47 | else |
48 | return false |
49 | end |
50 | end |
clone
DescriptionClone this mixin's state from a source to a destination GuiElement instance.Definition
clone()Code
68 | function GuiMixin:clone(srcGuiElement, dstGuiElement) |
69 | -- implement in subclasses to copy mixin state between decorated GuiElement instances |
70 | end |
cloneMixin
DescriptionClone mixin states for a mixin type from a source to a destination GuiElement instance.Definition
cloneMixin()Code
62 | function GuiMixin.cloneMixin(mixinType, srcGuiElement, dstGuiElement) |
63 | mixinType:clone(srcGuiElement, dstGuiElement) |
64 | end |
hasIncluded
DescriptionDetermine if a GuiElement has a mixin type included.Definition
hasIncluded(guiElement GuiElement, mixinType GuiMixin)Arguments
guiElement | GuiElement | instance |
mixinType | GuiMixin | class reference |
56 | function GuiMixin.hasIncluded(guiElement, mixinType) |
57 | return guiElement[mixinType] ~= nil |
58 | end |
new
DescriptionCreate a new GuiMixin instance. Subclasses need to provide their class type table for identification.Definition
new(class Class, mixinType Class)Arguments
class | Class | metatable |
mixinType | Class | type table |
New | instance |
23 | function GuiMixin.new(class, mixinType) |
24 | if class == nil then |
25 | class = GuiMixin_mt |
26 | end |
27 | |
28 | if mixinType == nil then |
29 | mixinType = GuiMixin |
30 | end |
31 | |
32 | local self = setmetatable({}, class) |
33 | self.mixinType = mixinType |
34 | |
35 | return self |
36 | end |