Skip to main content

Onlinestatus

Based on game build 714014 | Last updated: 2026-03-08

Overview

OnlineStatus is a UI widget that dynamically displays the player's current online status—such as offline, family-shared, or connected—as text on the main screen. It extends Widget and updates its display based on network state checks (TheSim:IsBorrowed(), TheFrontEnd:GetIsOfflineMode(), TheSim:IsLoggedOn(), TheNet:IsOnlineMode(), and TheNet:GetIsServer()). It is intended for use in the main menu or persistent UI contexts.

Usage example

-- Create and show the online status widget
local online_status = OnlineStatus(true) -- enable borrowed info
online_status:Show()
-- The widget automatically updates its text via OnUpdate() when added to the UI tree

Dependencies & tags

Components used: None identified
Tags: None identified

Properties

PropertyTypeDefault ValueDescription
show_borrowed_infobooleanfalseControls whether family-sharing status is displayed.
fixed_rootWidgetnilRoot widget container with proportional scaling and centered anchors.
textTextnilMain display text for status messages (positioned at (378, 345)).
debug_connectionsTextnilOptional debug text (visible only in dev builds) showing connection state.

Main functions

OnUpdate()

  • Description: Updates the displayed status text based on the current network state. This method is called periodically when the widget is active.
  • Parameters: None.
  • Returns: Nothing.
  • Error states: None. Behavior is deterministic based on runtime state.

Events & listeners

Not applicable.