Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

UI, Input & Scripting Systems

24. Widget / UI System (~60+ widgets)

Layout Widgets

WidgetPurpose
BackgroundWidgetBackground panel
ScrollPanelWidgetScrollable container
ScrollItemWidgetItem in scroll panel
GridLayoutGrid layout container
ListLayoutList layout container

Input Widgets

WidgetPurpose
ButtonWidgetClickable button
CheckboxWidgetToggle checkbox
DropDownButtonWidgetDropdown selection
TextFieldWidgetText input field
PasswordFieldWidgetPassword input
SliderWidgetSlider control
ExponentialSliderWidgetExponential slider
HueSliderWidgetHue selection slider
HotkeyEntryWidgetHotkey binding input
MenuButtonWidgetMenu-style button

Display Widgets

WidgetPurpose
LabelWidgetText label
LabelWithHighlightWidgetLabel with highlights
LabelWithTooltipWidgetLabel with tooltip
LabelForInputWidgetLabel for form input
ImageWidgetImage display
SpriteWidgetSprite display
RGBASpriteWidgetRGBA sprite
VideoPlayerWidgetVideo playback
ColorBlockWidgetSolid color block
ColorMixerWidgetColor mixer
GradientColorBlockWidgetGradient color

Game-Specific Widgets

WidgetPurpose
RadarWidgetMinimap
ProductionPaletteWidgetBuild palette
ProductionTabsWidgetBuild tabs
ProductionTypeButtonWidgetBuild category buttons
SupportPowersWidgetSuperweapon panel
SupportPowerTimerWidgetSuperweapon timers
ResourceBarWidgetResource/money display
ControlGroupsWidgetControl group buttons
WorldInteractionControllerWidgetWorld click handling
ViewportControllerWidgetCamera control
WorldButtonWidgetClick on world
WorldLabelWithTooltipWidgetWorld-space label

Observer Widgets

WidgetPurpose
ObserverArmyIconsWidgetObserver army composition
ObserverProductionIconsWidgetObserver production tracking
ObserverSupportPowerIconsWidgetObserver superweapon tracking
StrategicProgressWidgetStrategic score display

Preview Widgets

WidgetPurpose
MapPreviewWidgetMap thumbnail
ActorPreviewWidgetActor preview
GeneratedMapPreviewWidgetGenerated map preview
TerrainTemplatePreviewWidgetTerrain template preview
ResourcePreviewWidgetResource type preview

Utility Widgets

WidgetPurpose
TooltipContainerWidgetTooltip container
ClientTooltipRegionWidgetClient tooltip region
MouseAttachmentWidgetMouse-attached element
LogicKeyListenerWidgetKey event listener
LogicTickerWidgetTick event listener
ProgressBarWidgetProgress bar
BadgeWidgetBadge display
TextNotificationsDisplayWidgetText notification area
ConfirmationDialogsConfirmation dialog helper
SelectionUtilsSelection helper utils
WidgetUtilsWidget utility functions

Graph/Debug Widgets

WidgetPurpose
PerfGraphWidgetPerformance graph
LineGraphWidgetLine graph
ScrollableLineGraphWidgetScrollable line graph

25. Widget Logic System (~40+ logic classes)

Logic classes bind widgets to game state and user actions.

LogicPurpose
MainMenuLogicMain menu flow
CreditsLogicCredits screen
IntroductionPromptLogicFirst-run intro
SystemInfoPromptLogicSystem info display
VersionLabelLogicVersion display

Game Browser Logic

LogicPurpose
ServerListLogicServer browser (29KB)
ServerCreationLogicCreate game dialog
MultiplayerLogicMultiplayer menu
DirectConnectLogicDirect IP connect
ConnectionLogicConnection status
DisconnectWatcherLogicDisconnect detection
MapChooserLogicMap selection (20KB)
MapGeneratorLogicMap generator UI (15KB)
MissionBrowserLogicSingle player missions (19KB)
GameSaveBrowserLogicSave game browser
EncyclopediaLogicIn-game encyclopedia

Replay Logic

LogicPurpose
ReplayBrowserLogicReplay browser (26KB)
ReplayUtilsReplay utility functions

Profile Logic

LogicPurpose
LocalProfileLogicLocal player profile
LoadLocalPlayerProfileLogicProfile loading
RegisteredProfileTooltipLogicRegistered player tooltip
AnonymousProfileTooltipLogicAnonymous player tooltip
PlayerProfileBadgesLogicBadge display
BotTooltipLogicAI bot tooltip

Asset/Content Logic

LogicPurpose
AssetBrowserLogicAsset browser (23KB)
ColorPickerLogicColor picker dialog

Hotkey Logic

LogicPurpose
SingleHotkeyBaseLogicBase hotkey handler
MusicHotkeyLogicMusic hotkeys
MuteHotkeyLogicMute toggle
MuteIndicatorLogicMute indicator
ScreenshotHotkeyLogicScreenshot capture
DepthPreviewHotkeysLogicDepth preview
MusicPlayerLogicMusic player UI

Settings Logic

  • Settings/ subdirectory — audio, display, input, game settings panels

Lobby Logic

  • Lobby/ subdirectory — lobby UI, player slots, options, chat

Ingame Logic

  • Ingame/ subdirectory — in-game HUD, observer panels, chat

Editor Logic

  • Editor/ subdirectory — map editor tools, actors, terrain

Installation Logic

  • Installation/ subdirectory — content installation, mod download

Debug Logic

LogicPurpose
PerfDebugLogicPerformance debug panel
TabCompletionLogicChat/console tab completion
SimpleTooltipLogicBasic tooltip
ButtonTooltipLogicButton tooltip

26. Order System

Order Generators

GeneratorPurpose
UnitOrderGeneratorDefault unit command processing (8KB)
OrderGeneratorBase order generator class
PlaceBuildingOrderGeneratorBuilding placement orders (11KB)
GuardOrderGeneratorGuard command orders
BeaconOrderGeneratorMap beacon placement
RepairOrderGeneratorRepair command orders
GlobalButtonOrderGeneratorGlobal button commands
ForceModifiersOrderGeneratorForce-attack/force-move modifiers

Order Targeters

TargeterPurpose
UnitOrderTargeterStandard unit targeting
DeployOrderTargeterDeploy/unpack targeting
EnterAlliedActorTargeterEnter allied actor targeting

Order Validation

TraitPurpose
ValidateOrderWorld-level order validation
OrderEffectsVisual/audio feedback for orders

27. Lua Scripting API (Mission Scripting)

Global APIs (16 modules)

GlobalPurpose
ActorCreate actors, get actors by name/tag
AngleAngle type helpers
BeaconMap beacon placement
CameraCamera position & movement
ColorColor construction
CoordinateGlobalsCPos, WPos, WVec, WDist, WAngle construction
DateTimeGame time queries
LightingGlobal lighting control
MapMap queries (terrain, actors in area, center, bounds)
MediaPlay speech, sound, music, display messages
PlayerGet player objects
RadarRadar ping creation
ReinforcementsSpawn reinforcements (ground, air, paradrop)
TriggerEvent triggers (on killed, on idle, on timer, etc.)
UserInterfaceUI manipulation
UtilsUtility functions (random, do, skip)

Actor Properties (34 property groups)

PropertiesPurpose
AircraftPropertiesAircraft control (land, resupply, return)
AirstrikePropertiesAirstrike targeting
AmmoPoolPropertiesAmmo management
CapturePropertiesCapture commands
CarryallPropertiesCarryall commands
CloakPropertiesCloak control
CombatPropertiesAttack, stop, guard commands
ConditionPropertiesGrant/revoke conditions
DeliveryPropertiesDelivery commands
DemolitionPropertiesDemolition commands
DiplomacyPropertiesStance changes
GainsExperiencePropertiesXP management
GeneralPropertiesCommon properties (owner, type, location, health, kill, destroy, etc.)
GuardPropertiesGuard commands
HarvesterPropertiesHarvest, find resources
HealthPropertiesHealth queries and modification
InstantlyRepairsPropertiesInstant repair commands
MissionObjectivePropertiesAdd/complete objectives
MobilePropertiesMove, patrol, scatter, stop
NukePropertiesNuke launch
ParadropPropertiesParadrop execution
ParatroopersPropertiesParatroopers power activation
PlayerConditionPropertiesPlayer-level conditions
PlayerExperiencePropertiesPlayer XP
PlayerPropertiesPlayer queries (faction, cash, color, team, etc.)
PlayerStatsPropertiesGame statistics
PowerPropertiesPower queries
ProductionPropertiesBuild/produce commands
RepairableBuildingPropertiesBuilding repair
ResourcePropertiesResource queries
ScaredCatPropertiesPanic command
SellablePropertiesSell command
TransformPropertiesTransform command
TransportPropertiesLoad, unload, passenger queries

Script Infrastructure

ClassPurpose
LuaScriptScript loading and execution
ScriptTriggersTrigger implementations
CallLuaFuncLua function invocation
MediaMedia playback API