Worst-case scenario: the UEd Goblin wipes the map and burns down your house.

UE3:UIDataStore_OnlineGameSearch (UDK)

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

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[edit]

ActiveSearchIndex[edit]

Type: int

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

Default value: -1

GameInterface[edit]

Type: OnlineGameInterface

Cached game interface pointer

GameSearchCfgList[edit]

Type: array<GameSearchCfg>

Modifiers: const

The set of game searches and results

OnlineSub[edit]

Type: OnlineSubsystem

Cached online subsystem pointer

SearchResultsName[edit]

Type: name

Modifiers: const

Cached FName for faster compares

Default value: 'SearchResults'

SelectedIndex[edit]

Type: int

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

Default values[edit]

Property Value
Tag 'OnlineGameSearch'
WriteAccessType ACCESS_WriteAll

Structs[edit]

GameSearchCfg[edit]

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[edit]

Native functions[edit]

BuildSearchResults[edit]

native function BuildSearchResults ()

Tells this provider to rebuild it's array data

Events[edit]

GetActiveGameSearch[edit]

event OnlineGameSearch GetActiveGameSearch ()

returns the game search object that last submitted a server query

GetCurrentGameSearch[edit]

event OnlineGameSearch GetCurrentGameSearch ()

Returns the game search object that is currently selected

GetSearchResultFromIndex[edit]

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[edit]

event Init ()

Registers the delegate with the online subsystem

MoveToNext[edit]

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[edit]

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[edit]

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[edit]

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[edit]

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[edit]

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[edit]

ClearAllSearchResults[edit]

function ClearAllSearchResults ()

Attempts to clear the server query results for all gametypes

FindSearchConfigurationIndex[edit]

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[edit]

function bool InvalidateCurrentSearchResults ()

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

OnSearchComplete[edit]

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[edit]

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).