add and enable marketing

This commit is contained in:
Skull 2023-01-01 06:42:28 +03:00
parent 6d38fdca52
commit a688c40177
2 changed files with 10 additions and 8 deletions

View File

@ -1,7 +1,7 @@
local Lobby = luiglobals.Lobby
local MPLobbyOnline = LUI.mp_menus.MPLobbyOnline
function LeaveLobby(f5_arg0)
function LeaveLobby()
LeaveXboxLive()
if Lobby.IsInPrivateParty() == false or Lobby.IsPrivatePartyHost() then
LUI.FlowManager.RequestLeaveMenuByName("menu_xboxlive")
@ -9,7 +9,7 @@ function LeaveLobby(f5_arg0)
end
end
function menu_xboxlive(f16_arg0, f16_arg1)
function menu_xboxlive(f16_arg0)
local menu = LUI.MPLobbyBase.new(f16_arg0, {
menu_title = "@PLATFORM_UI_HEADER_PLAY_MP_CAPS",
memberListState = Lobby.MemberListStates.Prelobby
@ -17,7 +17,7 @@ function menu_xboxlive(f16_arg0, f16_arg1)
menu:setClass(LUI.MPLobbyOnline)
local serverListButton = menu:AddButton("@LUA_MENU_SERVERLIST", function(a1, a2)
local serverListButton = menu:AddButton("@LUA_MENU_SERVERLIST", function(a1)
LUI.FlowManager.RequestAddMenu(a1, "menu_systemlink_join", true, nil)
end)
serverListButton:setDisabledRefreshRate(500)
@ -27,9 +27,7 @@ function menu_xboxlive(f16_arg0, f16_arg1)
menu:AddPersonalizationButton()
menu:AddDepotButton()
-- kinda a weird place to do this, but it's whatever
-- add "MODS" button below depot button
local modsButton = menu:AddButton("@MENU_MODS", function(a1, a2)
menu:AddButton("@MENU_MODS", function(a1)
LUI.FlowManager.RequestAddMenu(a1, "mods_menu", true, nil)
end)
end
@ -58,6 +56,7 @@ function menu_xboxlive(f16_arg0, f16_arg1)
menu:addElement(self)
end
menu:AddMarketingPanel(LUI.MarketingLocation.Featured, LUI.ComScore.ScreenID.PlayOnline)
menu.isSignInMenu = true
menu:registerEventHandler("gain_focus", LUI.MPLobbyOnline.OnGainFocus)
menu:registerEventHandler("player_joined", luiglobals.Cac.PlayerJoinedEvent)

View File

@ -351,6 +351,9 @@ namespace patches
dvars::override::register_float("cg_fovScale", 1.f, 0.1f, 2.f, game::DvarFlags::DVAR_FLAG_SAVED);
dvars::override::register_float("cg_fovMin", 1.f, 1.0f, 90.f, game::DvarFlags::DVAR_FLAG_SAVED);
// Enable Marketing Comms
dvars::override::register_int("marketing_active", 1, 1, 1, game::DVAR_FLAG_WRITE);
// Makes com_maxfps saved dvar
dvars::override::register_int("com_maxfps", 0, 0, 1000, game::DVAR_FLAG_SAVED);