Add server browser button to mp play menu
This commit is contained in:
parent
157efd9213
commit
b7af6d6e25
@ -3,6 +3,7 @@ if Engine.GetCurrentMap() ~= "core_frontend" then
|
|||||||
end
|
end
|
||||||
|
|
||||||
local EnableLobbyMapVote = true -- toggle map vote in public lobby
|
local EnableLobbyMapVote = true -- toggle map vote in public lobby
|
||||||
|
local EnableLargeServerBrowserButton = true -- toggle large server browser button
|
||||||
|
|
||||||
local utils = require("utils")
|
local utils = require("utils")
|
||||||
require("DataSources_StartMenuTabs")
|
require("DataSources_StartMenuTabs")
|
||||||
@ -67,6 +68,14 @@ CoD.LobbyButtons.GameSettingsFlyoutMP = {
|
|||||||
customId = "btnGameSettingsFlyoutMPCustom"
|
customId = "btnGameSettingsFlyoutMPCustom"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CoD.LobbyButtons.SERVER_BROWSER = {
|
||||||
|
stringRef = "MENU_SERVER_BROWSER_CAPS",
|
||||||
|
action = function( self, element, controller, param, menu )
|
||||||
|
SetPerControllerTableProperty( controller, "disableGameSettingsOptions", true )
|
||||||
|
OpenPopup( menu, "LobbyServerBrowserOnline", controller )
|
||||||
|
end,
|
||||||
|
customId = "btnDedicated"
|
||||||
|
}
|
||||||
CoD.LobbyButtons.MP_CUSTOM_SETUP_GAME = {
|
CoD.LobbyButtons.MP_CUSTOM_SETUP_GAME = {
|
||||||
stringRef = "MPUI_SETUP_GAME_CAPS",
|
stringRef = "MPUI_SETUP_GAME_CAPS",
|
||||||
action = OpenSetupGameMP,
|
action = OpenSetupGameMP,
|
||||||
@ -92,6 +101,10 @@ local addCustomButtons = function(controller, menuId, buttonTable, isLeader)
|
|||||||
|
|
||||||
if menuId == LobbyData.UITargets.UI_MPLOBBYONLINE.id then
|
if menuId == LobbyData.UITargets.UI_MPLOBBYONLINE.id then
|
||||||
LobbyMapVoteIsEnabled = EnableLobbyMapVote
|
LobbyMapVoteIsEnabled = EnableLobbyMapVote
|
||||||
|
if EnableLargeServerBrowserButton then
|
||||||
|
utils.AddLargeButton(controller, buttonTable, CoD.LobbyButtons.SERVER_BROWSER, 1)
|
||||||
|
end
|
||||||
|
|
||||||
elseif menuId == LobbyData.UITargets.UI_MPLOBBYONLINEPUBLICGAME.id then
|
elseif menuId == LobbyData.UITargets.UI_MPLOBBYONLINEPUBLICGAME.id then
|
||||||
LobbyMapVote( LobbyMapVoteIsEnabled )
|
LobbyMapVote( LobbyMapVoteIsEnabled )
|
||||||
LobbyMapVoteIsEnabled = false
|
LobbyMapVoteIsEnabled = false
|
||||||
|
Loading…
Reference in New Issue
Block a user