Arma Reforger Script API
|
Public Member Functions | |
override void | OnMenuOpen () |
Opening menu - do server browser setup - TODO@wernerjak - cleanup open. | |
override void | OnMenuOpened () |
override void | OnMenuFocusGained () |
override void | OnMenuClose () |
Closing menu - clearing server browser data. | |
override void | OnMenuShow () |
void | OnActionRefresh () |
Bind action for refreshing server list. | |
void | Refresh () |
void | OnActionManualConnect () |
Bind action for opening dialog with manual connect to ip. | |
void | OnActionFilter () |
Bind action for switching to filter component. | |
void | OnActionBack () |
Bind action for leaving menu. | |
void | OnActionFavorite () |
Action for favoriting server. | |
void | OnActionDetails () |
Action for server details. | |
void | ActivateFilter (string filterName, bool enabled, bool processFilters=true) |
Find filter by it's internal name define in ServerBrowserFilterSet.conf Set filter enabled. | |
void | OnTabViewSwitch (SCR_TabViewComponent tabView, Widget w, int id) |
Set tab filters on switching tab view. | |
void | FilterScenarioId (string scenarioId) |
void | FilterHostedScenarioModId (string scenarioModId) |
void | SetFilteredScenario (MissionWorkshopItem scenario) |
void | JoinProcess_FindRoom (string params, EDirectJoinFormats format, bool publicNetwork) |
Initialize joining process to specific room. | |
void | JoinProcess_Init (Room roomToJoin) |
Initialize joining process to specific room. | |
Public Member Functions inherited from MenuRootBase | |
ScriptInvoker | GetOnMenuFocusGained () |
ScriptInvoker | GetOnMenuFocusLost () |
ScriptInvoker | GetOnMenuShow () |
ScriptInvoker | GetOnMenuHide () |
ScriptInvoker | GetOnMenuItem () |
ScriptInvoker | GetOnMenuUpdate () |
ScriptInvoker | GetOnMenuOpen () |
ScriptInvoker | GetOnMenuInit () |
ScriptInvoker | GetOnMenuClose () |
void | OnMenuClosed () |
void | InitChat () |
void | ShowChat () |
MenuRootComponent | GetRootComponent () |
SCR_DynamicFooterComponent | GetFooterComponent () |
override void | OnMenuFocusGained () |
override void | OnMenuFocusLost () |
override void | OnMenuShow () |
override void | OnMenuHide () |
override void | OnMenuItem (string menuItemName, bool changed, bool finished) |
override void | OnMenuUpdate (float tDelta) |
override void | OnMenuOpen () |
override void | OnMenuInit () |
override void | OnMenuClose () |
override void | OnMenuInit () |
override void | OnMenuUpdate (float tDelta) |
override void | OnMenuOpen () |
override void | OnMenuOpened () |
override void | OnMenuClose () |
override void | OnMenuFocusGained () |
override void | OnMenuFocusLost () |
override void | OnMenuShow () |
override void | OnMenuHide () |
Static Public Member Functions | |
static void | OpenWithScenarioFilter (MissionWorkshopItem mission) |
Set to find server by mission workshop item. | |
static bool | IsServerPingAboveThreshold (Room room) |
static void | TryOpenServerBrowser () |
static void | TryOpenServerBrowserWithScenarioFilter (MissionWorkshopItem mission) |
Static Public Member Functions inherited from ChimeraMenuBase | |
static ChimeraMenuBase | CurrentChimeraMenu () |
static ChimeraMenuBase | GetOwnerMenu (Widget w) |
Returns parent menu of a widget. | |
Public Attributes | |
ref ScriptInvoker | m_OnAutoRefresh = new ScriptInvoker() |
Public Attributes inherited from ChimeraMenuBase | |
ref ScriptInvoker | m_OnTextEditContextChange = new ScriptInvoker |
ref ScriptInvoker | m_OnUpdate = new ScriptInvoker |
Static Public Attributes | |
const string | TAG_DETAILS_FALLBACK_SEACHING = "Searching" |
const string | TAG_DETAILS_FALLBACK_EMPTY = "Empty" |
const string | TAG_MESSAGE_SEARCHING = "SEARCHING" |
const string | TAG_MESSAGE_CONNECTING = "CONNECTING" |
const int | SERVER_LIST_VIEW_SIZE = 32 |
const int | ROOM_CONTENT_LOAD_DELAY = 500 |
const int | ROOM_REFRESH_RATE = 10 * 1000 |
static const int | HIGH_PING_SERVER_THRESHOLD = 200 |
Protected Member Functions | |
override void | OnMenuUpdate (float tDelta) |
Updating menu - continuous menu hanling. | |
void | UpdateNavigationButtons () |
void | OnActionTriggered (string action, float multiplier) |
void | OnServerEntryClickInteraction (float multiplier) |
void | OnServerEntryDoubleClick (SCR_ServerBrowserEntryComponent entry) |
Join to the room on double click on server entry. | |
void | OnEntryMouseButton (string tag) |
void | OnJoinButton () |
void | OnServerEntryClick (notnull SCR_ServerBrowserEntryComponent entry) |
Join to the room on double click on server entry. | |
void | WaitingForRunningBackend () |
Start looking for servers once backend is runnig. | |
bool | IsBackendReady () |
void | CheckBackendState () |
void | ShowTimeoutDialog () |
void | ConnectionTimeout () |
Fail wating for backend if takes too long. | |
void | OnConnectionTimeoutDialogConfirm () |
void | ClearConnectionTimeoutWaiting () |
void | OnRoomsFound (array< Room > rooms=null) |
Call this on receiving filtered rooms from search Setting up server list - TODO@wernerjak - can be partialy moved in server list comp. | |
void | DisplayRooms (array< Room > rooms=null) |
void | OnRoomAutoRefresh (ServerBrowserCallback callback) |
Call this once new room data are fetched. | |
void | SearchRooms () |
void | OnSearchAllRoomsSuccess (ServerBrowserCallback callback) |
void | OnSearchAllRoomsFail (ServerBrowserCallback callback, int code, int restCode, int apiCode) |
void | OnSearchAllRoomsTimeOut () |
void | OnSearchAllRooms () |
void | SearchRoomsFiltered () |
void | OnSearchRoomsSuccess (ServerBrowserCallback callback) |
void | OnSearchRoomsFail (ServerBrowserCallback callback, int code, int restCode, int apiCode) |
void | OnSearchRoomsTimeOut () |
void | SetupParams (ClientLobbyApi lobby) |
Restore filtering parameters in UI. | |
void | SetupFilteringUI (FilteredServerParams filterParams) |
Apply filter setup on each ui filtering widget - restoring filter UI states. | |
void | SetupCallbacks () |
General callbacks setup. | |
void | OnServerEntryFocusEnter (SCR_ScriptedWidgetComponent entry) |
void | OnServerEntryFocusLeave (SCR_ScriptedWidgetComponent entry) |
void | OnEntryMouseClick (SCR_ScriptedWidgetComponent button) |
void | ReceiveRoomContent (notnull Room room, bool receiveMods) |
void | ReceiveRoomContent_Scenario () |
Separated receive scenario data for server Call this later if scenario is from mod to prevent too many request. | |
void | ReceiveRoomContent_Mods (Room room) |
Separeted receive mods data for server Call this later to prevent too many request. | |
void | SetupHandlers () |
Getting reference for all server widget elements. | |
void | FilterCrossplayCheck () |
Init behavior when filter panel script is attached If crossplay is enabled we show all servers so both filters are by default disabled If crossplay is disabled we show only servers with crossplay disabled by force. | |
void | SwitchFocus (SCR_EListMenuWidgetFocus focus, bool force=false) |
Switch focus. | |
void | ActivateFiltersFromList () |
void | FocusWidget (Widget w) |
Separated focus function for later call. | |
void | CallOnServerListSetPage (int page) |
void | Messages_ShowMessage (string messageTag, bool showWrap=false) |
Show message feedback by selected message component showWrap = true will hide server list and display message on full layout. | |
void | Messages_Hide () |
Hide both message widgets. | |
void | DisplayFavoriteAction (bool isFavorite) |
Based on given boolean favorite nav button is displaying eather add or remove favorite. | |
void | OnOpeningByLoadComponent (int menuPreset) |
Call this when server browser is open by loading component Start waiting for backend. | |
void | OnChangeSort (SCR_SortHeaderComponent sortHeader) |
Set focus to last filtering element. | |
void | OnFilterPanelToggle (bool show) |
void | OnChangeFilter (SCR_FilterEntry filter) |
Call this when any of filter in filter panel is changed Get last updated filter and set it up for next search. | |
void | OnServerListSetPage (int page) |
Call this actions when server list page is changed. | |
void | OnScrollResponse (SCR_BackendCallback callback) |
Call this when scroll returns server response to handle actions. | |
void | OnScrollSuccess (SCR_BackendCallback callback) |
void | OnSearchEditBoxConfirm (SCR_EditBoxComponent editBox, string sInput) |
Fetch new servers on confirming search string. | |
void | OnRoomEntrySetFavorite (SCR_ListMenuEntryComponent entry, bool favorite) |
Favoriting server. | |
void | OnRoomSetFavoriteResponse (SCR_RoomCallback callback) |
void | OnLoadingDependencyList () |
Call this when mods list is received. | |
void | OnModListFail (Room room) |
Call this when mods loading got error Show mods loading fail message. | |
void | OnModListFailDialogClose (SCR_ConfigurableDialogUi dialog) |
void | OnLoadingScenario (Dependency scenario) |
Setting server details Call this when room receive scenario data. | |
void | OnRejoinCancel () |
Call this on rejoin dialog cancel. | |
void | OnDirectJoinCancel () |
Display again old search if servers were overidden by direct join search. | |
MissionWorkshopItem | MissionFromMod (Dependency scenario) |
bool | CanJoinRoom (Room room) |
Check if is possible to attempt to join room Returns true if room version and platform match to client. | |
bool | ClientRoomVersionMatch (Room room) |
SCR_ServerBrowserEntryComponent | GetEntryUnderCursor () |
SCR_ServerBrowserEntryComponent | GetSelectedEntry () |
void | ClearScenarioFilters () |
void | SetMenuHeader (string header) |
void | JoinActions_Join () |
Action for joining to selected server. | |
void | JoinActions_DirectJoin (string params, EDirectJoinFormats format, bool publicNetwork) |
void | OnLastRoomReconnectConfirm () |
Confirm action to find new server. | |
void | JoinProcess_OnFindRoomSuccess (ServerBrowserCallback callback) |
Call this when room is found. | |
void | JoinProcess_OnFindRoomFail (ServerBrowserCallback callback, int code, int restCode, int apiCode) |
Call this if room wasn't found because of error or time out. | |
void | JoinProcess_OnFindRoomTimeout (ServerBrowserCallback callback) |
Call this if joining to room has timeout. | |
void | JoinProcess_CleanFindCallback () |
void | JoinProcess_FindRoomById (string id, ServerBrowserCallback callback) |
Specific call for id search. | |
void | JoinProcess_OnFindRoomByIdResponse (ServerBrowserCallback callback) |
Reaction for rooms found by id response. | |
void | JoinProcess_CheckVersion (Room roomToJoin) |
Check if client and room versions match Progress only if versions are matching, otherwise show error and stop progress. | |
void | JoinProcess_CheckHighPing (Room roomToJoin) |
Display a warning dialog if the player chose to join a server with high ping. | |
void | OnHighPingServerWarningDialogConfirm () |
void | JoinProcess_CheckRoomPasswordProtected (Room roomToJoin) |
Check if room requires password to join. | |
void | OnRejoinAuthorizationFailed (string message) |
void | JoinProcess_PasswordDialogOpen () |
void | OnPasswordVerified (Room room) |
On successfull room password verification continue to cotent handling. | |
void | OnPasswordFailVerification (string message) |
On room password verication fail restart attemp. | |
void | JoinProcess_PasswordClearInvokers () |
void | JoinProcess_ShowJoinDetailsDialog (Room roomToJoin) |
void | JoinProcess_CheckBlockedPlayers (Room roomToJoin) |
void | JoinProcess_OnCheckedBlockedPlayers (Room roomToJoin, array< BlockedRoomPlayer > blockedPlayers) |
void | CreateServerDetailsDialog (Room roomToJoin) |
void | OnServerDetailModsLoaded () |
Call this to fill details mods list. | |
void | OnServerDetailsClosed (SCR_ConfigurableDialogUi dialog) |
void | JoinProcess_LoadModContent () |
Load data about room mods to check which data is client missing Show state if mods are already loaded or wait for receiving mods data. | |
void | Platform_OnUgcPrivilegeResult (bool result) |
void | JoinProcess_LoadModContentVisualize () |
void | JoinProcess_OnModCheckFailed (Room room) |
void | OnDependenciesLoadingPrevented (Room room, array< ref SCR_WorkshopItem > dependencies) |
void | JoinProcess_CheckModContent () |
Check state of room required mods on client Stop progess if room mods are restricted. | |
void | JoinProcess_CheckUnrelatedDownloads () |
Display a warning dialog if there are unrelated downloads running, as these will be stopped. | |
void | JoinProcess_DisplayUnrelatedDownloadsWarning () |
void | JoinProcess_StopDownloadingUnrelatedMods () |
void | JoinProcess_CheckUnrelatedDownloadsCanceling () |
void | JoinProcess_CheckRequiredDownloads () |
void | JoinProcess_DownloadRequiredMods () |
void | OnDownloadRequiredModsCancel () |
void | JoinProcess_PrepareFinalJoinRequest (Room roomToJoin) |
void | JoinProcess_WaitToCheckRunningDownloads () |
void | JoinProcess_CheckRunningDownloads () |
Final step: display a warning dialog if there are still downloads running, as these will be stopped (at this point, this should not happen) | |
void | OnInterruptDownloadConfirm () |
void | JoinProcess_Join () |
void | JoinProcess_OnJoinSuccess (ServerBrowserCallback callback) |
Call this if joining to room was successful Connect to the server. | |
void | JoinProcess_OnJoinTimeout (ServerBrowserCallback callback) |
Call this if joining to room has timeout. | |
void | JoinProcess_OnJoinFail (ServerBrowserCallback callback, int code, int restCode, int apiCode) |
void | JoinProcess_LeaveJoinQueue (Room room) |
void | JoinProcess_OnQueueJoinFail (ServerBrowserCallback callback, int code, int restCode, int apiCode) |
void | JoinProcess_Clear () |
Call this to kill joining process at any stage. | |
void | SetupJoinDialogs () |
Open joining dialog in default state. | |
void | NegotiateMPPrivilegeAsync () |
PRIVILEGES HANDLING. | |
void | OnMPPrivilegeResult (UserPrivilege privilege, UserPrivilegeResult result) |
void | OnCrossPlayPrivilegeResult (UserPrivilege privilege, UserPrivilegeResult result) |
void | PrintDebug (string msg, string functionName=string.Empty) |
Custom debug print displayed with -scrDefine=SB_DEBUG argument. | |
Static Protected Member Functions | |
static void | ServerBrowserOnPrivilegeResult (UserPrivilege privilege, UserPrivilegeResult result) |
Static Protected Attributes | |
static ref SCR_ScriptPlatformRequestCallback | m_CallbackGetMPPrivilege |
static MissionWorkshopItem | m_MissionToFilter |
Static Protected Attributes inherited from ChimeraMenuBase | |
const string | INPUT_CONTEXT_EDIT = "MenuTextEditContext" |
static ChimeraMenuBase | m_ThisMenu |
void ServerBrowserMenuUI.ActivateFilter | ( | string | filterName, |
bool | enabled, | ||
bool | processFilters = true |
||
) |
Find filter by it's internal name define in ServerBrowserFilterSet.conf Set filter enabled.
|
protected |
|
protected |
|
protected |
Check if is possible to attempt to join room Returns true if room version and platform match to client.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Fail wating for backend if takes too long.
|
protected |
|
protected |
Based on given boolean favorite nav button is displaying eather add or remove favorite.
|
protected |
|
protected |
Init behavior when filter panel script is attached If crossplay is enabled we show all servers so both filters are by default disabled If crossplay is disabled we show only servers with crossplay disabled by force.
void ServerBrowserMenuUI.FilterHostedScenarioModId | ( | string | scenarioModId | ) |
void ServerBrowserMenuUI.FilterScenarioId | ( | string | scenarioId | ) |
|
protected |
Separated focus function for later call.
|
protected |
|
protected |
|
protected |
|
static |
|
protected |
|
protected |
Action for joining to selected server.
|
protected |
|
protected |
Display a warning dialog if the player chose to join a server with high ping.
|
protected |
Check state of room required mods on client Stop progess if room mods are restricted.
|
protected |
|
protected |
Check if room requires password to join.
|
protected |
Final step: display a warning dialog if there are still downloads running, as these will be stopped (at this point, this should not happen)
|
protected |
Display a warning dialog if there are unrelated downloads running, as these will be stopped.
|
protected |
|
protected |
Check if client and room versions match Progress only if versions are matching, otherwise show error and stop progress.
|
protected |
|
protected |
Call this to kill joining process at any stage.
|
protected |
|
protected |
void ServerBrowserMenuUI.JoinProcess_FindRoom | ( | string | params, |
EDirectJoinFormats | format, | ||
bool | publicNetwork | ||
) |
Initialize joining process to specific room.
|
protected |
Specific call for id search.
void ServerBrowserMenuUI.JoinProcess_Init | ( | Room | roomToJoin | ) |
Initialize joining process to specific room.
|
protected |
|
protected |
|
protected |
Load data about room mods to check which data is client missing Show state if mods are already loaded or wait for receiving mods data.
|
protected |
|
protected |
|
protected |
Reaction for rooms found by id response.
|
protected |
Call this if room wasn't found because of error or time out.
|
protected |
Call this when room is found.
|
protected |
Call this if joining to room has timeout.
|
protected |
|
protected |
Call this if joining to room was successful Connect to the server.
|
protected |
Call this if joining to room has timeout.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Hide both message widgets.
|
protected |
Show message feedback by selected message component showWrap = true will hide server list and display message on full layout.
|
protected |
|
protected |
PRIVILEGES HANDLING.
Attempt to allow MP privilege
void ServerBrowserMenuUI.OnActionBack | ( | ) |
Bind action for leaving menu.
void ServerBrowserMenuUI.OnActionDetails | ( | ) |
Action for server details.
void ServerBrowserMenuUI.OnActionFavorite | ( | ) |
Action for favoriting server.
void ServerBrowserMenuUI.OnActionFilter | ( | ) |
Bind action for switching to filter component.
void ServerBrowserMenuUI.OnActionManualConnect | ( | ) |
Bind action for opening dialog with manual connect to ip.
void ServerBrowserMenuUI.OnActionRefresh | ( | ) |
Bind action for refreshing server list.
|
protected |
TODO: Why are these being triggered twice?
Proceed only if using mouse, the navigation buttons will take care of the interactions with keyboard or gamepad
|
protected |
Call this when any of filter in filter panel is changed Get last updated filter and set it up for next search.
|
protected |
Set focus to last filtering element.
|
protected |
|
protected |
|
protected |
|
protected |
Display again old search if servers were overidden by direct join search.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Confirm action to find new server.
|
protected |
Call this when mods list is received.
|
protected |
Setting server details Call this when room receive scenario data.
Update Details Dialog
override void ServerBrowserMenuUI.OnMenuClose | ( | ) |
Closing menu - clearing server browser data.
Implements MenuRootBase.
override void ServerBrowserMenuUI.OnMenuFocusGained | ( | ) |
Implements MenuRootBase.
override void ServerBrowserMenuUI.OnMenuOpen | ( | ) |
Opening menu - do server browser setup - TODO@wernerjak - cleanup open.
Implements MenuRootBase.
override void ServerBrowserMenuUI.OnMenuOpened | ( | ) |
Implements ChimeraMenuBase.
override void ServerBrowserMenuUI.OnMenuShow | ( | ) |
Implements MenuRootBase.
|
protected |
|
protected |
Call this when mods loading got error Show mods loading fail message.
|
protected |
|
protected |
|
protected |
Call this when server browser is open by loading component Start waiting for backend.
|
protected |
On room password verication fail restart attemp.
|
protected |
On successfull room password verification continue to cotent handling.
|
protected |
|
protected |
Call this on rejoin dialog cancel.
|
protected |
Call this once new room data are fetched.
|
protected |
Favoriting server.
|
protected |
|
protected |
Call this on receiving filtered rooms from search Setting up server list - TODO@wernerjak - can be partialy moved in server list comp.
|
protected |
Call this when scroll returns server response to handle actions.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Fetch new servers on confirming search string.
|
protected |
|
protected |
|
protected |
|
protected |
Call this to fill details mods list.
|
protected |
|
protected |
Join to the room on double click on server entry.
This means the player moved the mouse to another entry during the small window it takes the component to check for double click... ...so another room got focused, but we want the clicked one to be the focused one
On MOUSE clicking opens the details dialog. On KEYBOARD and GAMEPAD single click is quick join, there's a separate button for details
|
protected |
multiplier value in the action is used to differentiate between single and double click
|
protected |
Join to the room on double click on server entry.
|
protected |
|
protected |
|
protected |
Call this actions when server list page is changed.
void ServerBrowserMenuUI.OnTabViewSwitch | ( | SCR_TabViewComponent | tabView, |
Widget | w, | ||
int | id | ||
) |
Set tab filters on switching tab view.
|
static |
Set to find server by mission workshop item.
|
protected |
|
protected |
Custom debug print displayed with -scrDefine=SB_DEBUG argument.
|
protected |
|
protected |
Separeted receive mods data for server Call this later to prevent too many request.
|
protected |
Separated receive scenario data for server Call this later if scenario is from mod to prevent too many request.
void ServerBrowserMenuUI.Refresh | ( | ) |
|
protected |
|
protected |
|
staticprotected |
void ServerBrowserMenuUI.SetFilteredScenario | ( | MissionWorkshopItem | scenario | ) |
|
protected |
|
protected |
General callbacks setup.
|
protected |
Apply filter setup on each ui filtering widget - restoring filter UI states.
|
protected |
Getting reference for all server widget elements.
|
protected |
Open joining dialog in default state.
|
protected |
Restore filtering parameters in UI.
|
protected |
|
protected |
Switch focus.
|
static |
|
static |
|
protected |
|
protected |
Start looking for servers once backend is runnig.
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
ref ScriptInvoker ServerBrowserMenuUI.m_OnAutoRefresh = new ScriptInvoker() |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |