Avorion Script API Documentation
UIVerticalLister
This class gets a rect and aligns given elements in a list style inside the rect. Considers properties like margin and padding between the elements.
This object is only available on the client.
function UIVerticalLister(Rect rect, int padding, int margin)
Parameters
padding
margin
Returns
A new instance of UIVerticalLister
| property Rect inner | [read-only] |
| property int margin | [write-only] |
| property int marginBottom |
| property int marginLeft |
| property int marginRight |
| property int marginTop |
| property int padding | [write-only] |
| property int paddingBottom |
| property int paddingLeft |
| property int paddingRight |
| property int paddingTop |
| property Rect rect |
function var getBottomLeftRect(Rect rect)
Aligns the given rect to a specific side
Parameters
Returns
nothing
function Rect getBottomRect(Rect rect)
Aligns the given rect to a specific side
Parameters
Returns
A copy of the given rect, aligned to the specific side
function var getBottomRightRect(Rect rect)
Aligns the given rect to a specific side
Parameters
Returns
nothing
function var getCenterRect(Rect rect)
Aligns the given rect to a specific side
Parameters
Returns
nothing
function var getLeftRect(Rect rect)
Aligns the given rect to a specific side
Parameters
Returns
nothing
function var getRightRect(Rect rect)
Aligns the given rect to a specific side
Parameters
Returns
nothing
function var getTopLeftRect(Rect rect)
Aligns the given rect to a specific side
Parameters
Returns
nothing
function var getTopRect(Rect rect)
Aligns the given rect to a specific side
Parameters
Returns
nothing
function var getTopRightRect(Rect rect)
Aligns the given rect to a specific side
Parameters
Returns
nothing
function var hasEnoughSpace(float vec)
Checks if there is enough space to fit a rect with the given height into the lister's remaining rect
Parameters
Returns
true if there's enough space, false if not
function Rect nextQuadraticRect()
function Rect nextRect(float height)
Returns the next rect of a certain height that would be created. The rect will have the full width of the rect given to the lister.
Parameters
Returns
The Rect
function UIElement placeCenter(vec2 vec)
Uses the given vector to create a Rect of size Rect(0, 0, vec.x, vec.y), places it in the list and centers it
Parameters
Returns
The aligned rect
function UIElement placeElementBottom(UIElement element)
Aligns the given UI element to a specific side
Parameters
Returns
A reference to the given UI element
function UIElement placeElementBottomLeft(UIElement element)
Aligns the given UI element to a specific side
Parameters
Returns
A reference to the given UI element
function UIElement placeElementBottomRight(UIElement element)
Aligns the given UI element to a specific side
Parameters
Returns
A reference to the given UI element
function UIElement placeElementCenter(UIElement element)
Aligns the given UI element to a specific side
Parameters
Returns
A reference to the given UI element
function UIElement placeElementLeft(UIElement element)
Aligns the given UI element to a specific side
Parameters
Returns
A reference to the given UI element
function UIElement placeElementRight(UIElement element)
Aligns the given UI element to a specific side
Parameters
Returns
A reference to the given UI element
function UIElement placeElementTop(UIElement element)
Aligns the given UI element to a specific side
Parameters
Returns
A reference to the given UI element
function UIElement placeElementTopLeft(UIElement element)
Aligns the given UI element to a specific side
Parameters
Returns
A reference to the given UI element
function UIElement placeElementTopRight(UIElement element)
Aligns the given UI element to a specific side
Parameters
Returns
A reference to the given UI element
function UIElement placeLeft(vec2 vec)
Uses the given vector to create a Rect of size Rect(0, 0, vec.x, vec.y), places it in the list and aligns it to the left
Parameters
Returns
The aligned rect
function UIElement placeRight(vec2 vec)
Uses the given vector to create a Rect of size Rect(0, 0, vec.x, vec.y), places it in the list and aligns it to the right
Parameters
Returns
The aligned rect
function var setMargin(int left, int right, int top, int bottom)
Parameters
right margin on the right side
top margin on the top side
bottom margin on the bottom side
Returns
nothing
function var setPadding(int left, int right, int top, int bottom)
Parameters
right padding on the right side
top padding on the top side
bottom padding on the bottom side
Returns
nothing
Callbacks Alliance [Client] Callbacks Alliance [Server] Callbacks Alliance [Server] Callbacks Entity Callbacks Galaxy Callbacks Player Callbacks Player [Client] Callbacks Sector Callbacks Server Callbacks
Command Entity FactionDatabase PlanGenerator Player Sector Server UsableInventoryItem
Boarding BspTree CargoBay ControlUnit DeletionTimer DirectFlightPhysics DockingPositions Durability EnergySystem Engine FighterAI Hangar InteractionText Owner Physics Plan ReadOnlyBoarding ReadOnlyBspTree ReadOnlyCargoBay ReadOnlyControlUnit ReadOnlyDeletionTimer ReadOnlyEnergySystem ReadOnlyEngine ReadOnlyFighterAI ReadOnlyHangar ReadOnlyInteractionText ReadOnlyOwner ReadOnlyPhysics ReadOnlyPlan ReadOnlyShipAI ReadOnlyShipSystem ReadOnlyTorpedoAI [Server] [Client] [Server] [Client] ReadOnlyTorpedoAI [Server] [Client] [Server] [Client] ReadOnlyTorpedoLauncher ReadOnlyTurretBases ReadOnlyVelocity ReadOnlyWeapons ReadOnlyWormHole Shield ShipAI ShipSystem SystemUpgradeLoot Thrusters Torpedo TorpedoAI TorpedoLauncher Turret TurretAI TurretBases Velocity Weapons WormHole
AllianceMember AllianceRank BlockPlan BlockPlanBlock BlockStatistics Box Color ControlUnitSeat CraftDesign Crew CrewMan CrewProfession DebugInfo dvec2 dvec3 dvec4 Entity EntityDescriptor FighterTemplate Format GameSettings HighResolutionTimer Inventory InventoryTurret ivec2 ivec3 ivec4 Language Mail Material Matrix ModManager NamedFormat PlanBspTree PlanetSpecifics PlanGenerationStage PlanPart PlanStyle PlayerId PluralForm Profiler QuadTree Random Rarity Ray ReadOnlyEntity Rect Relation SectorView Seed Sphere SystemUpgradeTemplate Timer Tooltip TooltipLine TorpedoTemplate TradingGood TurretDesign TurretDesignPart TurretTemplate UsableInventoryItem Uuid VanillaInventoryItem vec2 vec3 vec4 Version Weapon
EntityIcon EntityTooltip PlanMesh ReadOnlyIcon ReadOnlyPlanMesh ReadOnlyScriptUI ReadOnlyTooltip ScriptUI
Achievements Alliance [Client] ClientSettings CraftDesignSelectionItem Faction [Client] Galaxy [Client] GalaxyMap GameInput InputWindow InventoryReferenceSelectionItem InventorySelectionItem Keyboard LaserFX Mouse Music Planet Player [Client] PlayerWindow Sector [Client] SelectionItem SoundSource TooltipRenderer TurretDesignSelectionItem
AllianceTab ArrowLine Button [Client] [Client] Button [Client] [Client] CheckBox ComboBox CraftPortrait Frame Hud InventorySelection Label Line ListBox ListBoxEx MapArrowLine MultiLineTextBox NumbersBar Picture PlanDisplayer ProgressBar SavedDesignsSelection ScrollFrame Selection ShipWindow Slider StatisticsBar Tab TabbedWindow TextBox TextField Tree UIArbitraryHorizontalSplitter UIArbitraryVerticalSplitter UIContainer UIElement UIGridSplitter UIHorizontalLister UIHorizontalMultiSplitter UIHorizontalSplitter UIOrganizer UIRect UIRenderer UIVerticalLister UIVerticalMultiSplitter UIVerticalSplitter ValueComboBox Window
EntityTransferrer FighterController Loot ReadOnlyEntityTransferrer ReadOnlyFighterController ReadOnlyLoot ReadOnlyTurretController ReadOnlyWreckageCreator TurretController WreckageCreator
Alliance [Server] Faction [Server] Galaxy [Server] Player [Server] ReadOnlySector Sector [Server] Server
AIState AlliancePrivilege BeamShape BlockShading BlockType BoxType ChatChannel ChatMessageType ComponentType ControlAction ControlActionBit CoolingType CrewProfessionType DamageSource DamageType DeletionType Difficulty EntityArrivalType EntityType FighterOrders FighterStartError FighterType FontType ImpactParticles InventoryItemType KeyboardKey ListBoxEntryType MalusReason MaterialType MoonType MouseButton PlanetType PlayerStateType ProjectileShape RarityType RelationStatus SavedDesignType SectorChangeType SoundType StatsBonuses TransformationFeature TurretAutoFireMode WeaponAppearance WeaponCategory
This is the official documentation for the scripting API of Avorion. This documentation is automatically generated and not necessarily complete. Depending on the context in which functions exist, some documentation such as descriptions, return values or variable names or types may be missing.
Work in Progress. Documentation of Avorion Version: 1.0 r22021 59065310fc1a