GE Lua Documentation

Press F to search!

onOnlineStateChanged

Definition


-- @/lua/ge/extensions/core/online.lua:22

-- sends the current state to the user interface. It can request it via online.requestState()
local function onOnlineStateChanged(connected)
  guihooks.trigger('OnlineStateChanged', connected)
  -- send steam data as well if available
  if OnlineServiceProvider and OnlineServiceProvider.accountID ~= "" then
    -- TODO: Rename to ProviderInfo or OnlineInfo as it's not Steam specific.
    guihooks.trigger('SteamInfo', {
      working = OnlineServiceProvider.isWorking,
      playerName = OnlineServiceProvider.playerName,
      branch = OnlineServiceProvider.branch,
      language = OnlineServiceProvider.language,
      loggedin = OnlineServiceProvider.accountLoggedIn
    })
  end
end

Callers

@/lua/ge/extensions/core/repository.lua

local function onOnlineStateChanged( connected )
  runSubscription()
@/lua/ge/extensions/core/online.lua
local function sendUIState()
  onOnlineStateChanged(Engine.Online.isAuthenticated())
end