I don't need to test my programs. I have an error-correcting modem.

UE3:UIDataStore_OnlineGameSearch (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> UIRoot >> UIDataProvider >> UIDataStore >> UIDataStore_Remote >> UIDataStore_OnlineGameSearch
Package: 
Engine
Implemented interfaces
UIListElementCellProvider, UIListElementProvider
Direct subclass:
UTDataStore_GameSearchBase
This class in other games:
UDK

This class is responsible for mapping properties in an OnlineGameSearch object to something that the UI system can consume. It exposes two things DesiredSettings and SearchResults. DesiredSettings is just publishes the properties/string settings of an online game settings and SearchResults is the set of games found by the search.

NOTE: Each game needs to derive at least one class from this one in order to expose the game's specific search class(es)

Properties

ActiveSearchIndex

Type: int

the index into the set of providers/searches for the query that is currently active

Default value: -1

GameInterface

Type: OnlineGameInterface

Cached game interface pointer

GameSearchCfgList

Type: array<GameSearchCfg>

Modifiers: const

The set of game searches and results

OnlineSub

Type: OnlineSubsystem

Cached online subsystem pointer

SearchResultsName

Type: name

Modifiers: const

Cached FName for faster compares

Default value: 'SearchResults'

SelectedIndex

Type: int

The index into the set of providers/searches for the query that the user most recently requested

Default values

Property Value
Tag 'OnlineGameSearch'
WriteAccessType ACCESS_WriteAll

Structs

GameSearchCfg

Modifiers: native

Holds the items needed for keeping a list of game searches around

class<OnlineGameSearch> GameSearchClass 
The OnlineGameSeach derived class to load and populate the UI with
class<OnlineGameSettings> DefaultGameSettingsClass 
The OnlineGameSettings derived class to use as the default data
class<UIDataProvider_Settings> SearchResultsProviderClass 
The data provider to use for each search result that is returned. Useful when

a game wishes to create "meta" properties from search results.

UIDataProvider_Settings DesiredSettingsProvider 
Publishes the desired settings from the game search object
array<UIDataProvider_Settings> SearchResults 
Array of providers that handle the search results
OnlineGameSearch Search 
OnlineGameSearch object that will be exposed to the UI
name SearchName 
For finding via name

Functions

Native functions

AddJoinableOfflineServer

native function AddJoinableOfflineServer (const out string OwningPlayerId, const out string ServerName, const out string ServerIP)

As above, but allows you to provide an IP address for the server; which can be used to attempt a direct connect

AddOfflineServer

native function AddOfflineServer (const out string OwningPlayerId, const out string ServerName)

Adds an offline placeholder server to the list of results Used to keep history and favorites in the list after a search comes back without them

Parameters:

  • OwningPlayerId - the id of the player who created this server (last known)
  • ServerName - the description of the server (last known)

BuildSearchResults

native function BuildSearchResults ()

Tells this provider to rebuild it's array data

Events

GetActiveGameSearch

event OnlineGameSearch GetActiveGameSearch ()

returns the game search object that last submitted a server query

GetCurrentGameSearch

event OnlineGameSearch GetCurrentGameSearch ()

Returns the game search object that is currently selected

GetSearchResultFromIndex

event bool GetSearchResultFromIndex (int ListIndex, out OnlineGameSearch.OnlineGameSearchResult Result)

Returns the search result for the list index specified

Parameters:

  • ListIndex - the index to find the result for

Returns:

the search results (empty if out of bounds)

Init

event Init ()

Registers the delegate with the online subsystem

MoveToNext

event MoveToNext (optional bool bInvalidateExistingSearchResults)

Moves to the next item in the list

Parameters:

  • bInvalidateExistingSearchResults - specify FALSE to keep previous searches (i.e. for other gametypes) in memory; default behavior is to clear all search results when switching to a different item in the game search list

MoveToPrevious

event MoveToPrevious (optional bool bInvalidateExistingSearchResults)

Moves to the previous item in the list

Parameters:

  • bInvalidateExistingSearchResults - specify FALSE to keep previous searches (i.e. for other gametypes) in memory; default behavior is to clear all search results when switching to a different item in the game search list

SetCurrentByIndex

event SetCurrentByIndex (int NewIndex, optional bool bInvalidateExistingSearchResults)

Sets the index into the list of game search to use

Parameters:

  • NewIndex - the new index to use
  • bInvalidateExistingSearchResults - specify FALSE to keep previous searches (i.e. for other gametypes) in memory; default behavior is to clear all search results when switching to a different item in the game search list

SetCurrentByName

event SetCurrentByName (name SearchName, optional bool bInvalidateExistingSearchResults)

Sets the index into the list of game settings to use

Parameters:

  • SearchName - the name of the search to find
  • bInvalidateExistingSearchResults - specify FALSE to keep previous searches (i.e. for other gametypes) in memory; default behavior is to clear all search results when switching to a different item in the game search list

ShowHostGamercard

event bool ShowHostGamercard (byte ControllerIndex, int ListIndex)

Displays the gamercard for the specified host

Parameters:

  • ControllerIndex - the ControllerId for the player displaying the gamercard
  • ListIndex - the item in the list to display the gamercard for

SubmitGameSearch

event bool SubmitGameSearch (byte ControllerIndex, optional bool bInvalidateExistingSearchResults)

Called to kick off an online game search and set up all of the delegates needed

Parameters:

  • ControllerIndex - the ControllerId for the player to perform the search for
  • bInvalidateExistingSearchResults - specify FALSE to keep previous searches (i.e. for other gametypes) in memory; default behavior is to clear all search results when switching to a different item in the game search list

Returns:

TRUE if the search call works, FALSE otherwise

Other instance functions

ClearAllSearchResults

function ClearAllSearchResults ()

Attempts to clear the server query results for all gametypes

FindSearchConfigurationIndex

function int FindSearchConfigurationIndex (name SearchTag)

Find the index of the search configuration element which has the specified tag.

Parameters:

  • SearchTag - the name of the search configuration to find

Returns:

the index of the search configuration with a tag matching the input value or INDEX_NONE if none were found.

InvalidateCurrentSearchResults

function bool InvalidateCurrentSearchResults ()

Attempts to free the results from the last search that was submitted.

OnSearchComplete

function OnSearchComplete (bool bWasSuccessful)

Called by the online subsystem when the game search has completed

Parameters:

  • bWasSuccessful - true if the async action completed without error, false if there was an error

OverrideQuerySubmission

protected function bool OverrideQuerySubmission (byte ControllerId, OnlineGameSearch Search)

Worker for SubmitGameSeach; allows child classes to perform additional work before the query is submitted.

Parameters:

  • ControllerId - the index of the controller for the player to perform the search for.
  • Search - the search object that will be used to generate the query.

Returns:

TRUE to prevent SubmitGameSeach from submitting the search (such as when you do this step yourself).