mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-09 23:02:53 -05:00
Format Lua
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
/.vscode
|
/.vscode
|
||||||
|
stylua.toml
|
||||||
*.ff
|
*.ff
|
||||||
*.iwd
|
*.iwd
|
||||||
*.dds
|
*.dds
|
||||||
|
@ -16,7 +16,7 @@ if CoD.isZombie == false and (CoD.isXBOX or CoD.isPS3) then
|
|||||||
require("T6.Menus.EliteAppPopup")
|
require("T6.Menus.EliteAppPopup")
|
||||||
end
|
end
|
||||||
CoD.MainLobby = {}
|
CoD.MainLobby = {}
|
||||||
CoD.MainLobby.ShouldPreventCreateLobby = function ()
|
CoD.MainLobby.ShouldPreventCreateLobby = function()
|
||||||
if UIExpression.AcceptingInvite() == 1 or Engine.IsJoiningAnotherParty() == 1 or UIExpression.PrivatePartyHost() == 0 or Engine.IsGameLobbyRunning() then
|
if UIExpression.AcceptingInvite() == 1 or Engine.IsJoiningAnotherParty() == 1 or UIExpression.PrivatePartyHost() == 0 or Engine.IsGameLobbyRunning() then
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
@ -24,7 +24,7 @@ CoD.MainLobby.ShouldPreventCreateLobby = function ()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.OnlinePlayAvailable = function (MainLobbyWidget, ClientInstance, Boolean)
|
CoD.MainLobby.OnlinePlayAvailable = function(MainLobbyWidget, ClientInstance, Boolean)
|
||||||
if Boolean == nil then
|
if Boolean == nil then
|
||||||
Boolean = false
|
Boolean = false
|
||||||
end
|
end
|
||||||
@ -98,7 +98,7 @@ CoD.MainLobby.OnlinePlayAvailable = function (MainLobbyWidget, ClientInstance, B
|
|||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.IsControllerCountValid = function (MainLobbyWidget, LocalClientIndex, MaxLocalPlayers)
|
CoD.MainLobby.IsControllerCountValid = function(MainLobbyWidget, LocalClientIndex, MaxLocalPlayers)
|
||||||
if MaxLocalPlayers < UIExpression.GetUsedControllerCount() then
|
if MaxLocalPlayers < UIExpression.GetUsedControllerCount() then
|
||||||
local ErrorPopup = MainLobbyWidget:openPopup("Error", LocalClientIndex)
|
local ErrorPopup = MainLobbyWidget:openPopup("Error", LocalClientIndex)
|
||||||
ErrorPopup:setMessage(Engine.Localize("XBOXLIVE_TOOMANYCONTROLLERS"))
|
ErrorPopup:setMessage(Engine.Localize("XBOXLIVE_TOOMANYCONTROLLERS"))
|
||||||
@ -109,7 +109,7 @@ CoD.MainLobby.IsControllerCountValid = function (MainLobbyWidget, LocalClientInd
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.OpenPlayerMatchPartyLobby = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.OpenPlayerMatchPartyLobby = function(MainLobbyWidget, ClientInstance)
|
||||||
if CoD.MainLobby.ShouldPreventCreateLobby() then
|
if CoD.MainLobby.ShouldPreventCreateLobby() then
|
||||||
return
|
return
|
||||||
elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 then
|
elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 then
|
||||||
@ -145,7 +145,7 @@ CoD.MainLobby.OpenPlayerMatchPartyLobby = function (MainLobbyWidget, ClientInsta
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.OpenLeagueSelectionPopup = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.OpenLeagueSelectionPopup = function(MainLobbyWidget, ClientInstance)
|
||||||
if CoD.MainLobby.ShouldPreventCreateLobby() then
|
if CoD.MainLobby.ShouldPreventCreateLobby() then
|
||||||
return
|
return
|
||||||
elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 then
|
elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 then
|
||||||
@ -171,7 +171,7 @@ CoD.MainLobby.OpenLeagueSelectionPopup = function (MainLobbyWidget, ClientInstan
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.OpenLeaguePlayPartyLobby = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.OpenLeaguePlayPartyLobby = function(MainLobbyWidget, ClientInstance)
|
||||||
if CoD.MainLobby.ShouldPreventCreateLobby() then
|
if CoD.MainLobby.ShouldPreventCreateLobby() then
|
||||||
return
|
return
|
||||||
elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 then
|
elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 then
|
||||||
@ -185,7 +185,7 @@ CoD.MainLobby.OpenLeaguePlayPartyLobby = function (MainLobbyWidget, ClientInstan
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.OpenCustomGamesLobby = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.OpenCustomGamesLobby = function(MainLobbyWidget, ClientInstance)
|
||||||
if CoD.MainLobby.ShouldPreventCreateLobby() then
|
if CoD.MainLobby.ShouldPreventCreateLobby() then
|
||||||
return
|
return
|
||||||
elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 and CoD.MainLobby.IsControllerCountValid(MainLobbyWidget, ClientInstance.controller, UIExpression.DvarInt(ClientInstance.controller, "party_maxlocalplayers_privatematch")) == 1 then
|
elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 and CoD.MainLobby.IsControllerCountValid(MainLobbyWidget, ClientInstance.controller, UIExpression.DvarInt(ClientInstance.controller, "party_maxlocalplayers_privatematch")) == 1 then
|
||||||
@ -202,7 +202,7 @@ CoD.MainLobby.OpenCustomGamesLobby = function (MainLobbyWidget, ClientInstance)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.OpenSoloLobby_Zombie = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.OpenSoloLobby_Zombie = function(MainLobbyWidget, ClientInstance)
|
||||||
if CoD.MainLobby.ShouldPreventCreateLobby() then
|
if CoD.MainLobby.ShouldPreventCreateLobby() then
|
||||||
return
|
return
|
||||||
elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 then
|
elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 then
|
||||||
@ -220,14 +220,14 @@ CoD.MainLobby.OpenSoloLobby_Zombie = function (MainLobbyWidget, ClientInstance)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.OpenTheaterLobby = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.OpenTheaterLobby = function(MainLobbyWidget, ClientInstance)
|
||||||
if CoD.MainLobby.ShouldPreventCreateLobby() then
|
if CoD.MainLobby.ShouldPreventCreateLobby() then
|
||||||
return
|
return
|
||||||
elseif UIExpression.CanSwitchToLobby(ClientInstance.controller, Dvar.party_maxplayers_theater:get(), Dvar.party_maxlocalplayers_theater:get()) == 0 then
|
elseif UIExpression.CanSwitchToLobby(ClientInstance.controller, Dvar.party_maxplayers_theater:get(), Dvar.party_maxlocalplayers_theater:get()) == 0 then
|
||||||
Dvar.ui_errorTitle:set(Engine.Localize("MENU_NOTICE_CAPS"))
|
Dvar.ui_errorTitle:set(Engine.Localize("MENU_NOTICE_CAPS"))
|
||||||
Dvar.ui_errorMessage:set(Engine.Localize("MENU_FILESHARE_MAX_LOCAL_PLAYERS"))
|
Dvar.ui_errorMessage:set(Engine.Localize("MENU_FILESHARE_MAX_LOCAL_PLAYERS"))
|
||||||
CoD.Menu.OpenErrorPopup(MainLobbyWidget, {
|
CoD.Menu.OpenErrorPopup(MainLobbyWidget, {
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
elseif Engine.CanViewContent() == false then
|
elseif Engine.CanViewContent() == false then
|
||||||
@ -236,13 +236,13 @@ CoD.MainLobby.OpenTheaterLobby = function (MainLobbyWidget, ClientInstance)
|
|||||||
elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 and CoD.MainLobby.IsControllerCountValid(MainLobbyWidget, ClientInstance.controller, UIExpression.DvarInt(ClientInstance.controller, "party_maxlocalplayers_theater")) == 1 then
|
elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 and CoD.MainLobby.IsControllerCountValid(MainLobbyWidget, ClientInstance.controller, UIExpression.DvarInt(ClientInstance.controller, "party_maxlocalplayers_theater")) == 1 then
|
||||||
CoD.SwitchToTheaterLobby(ClientInstance.controller)
|
CoD.SwitchToTheaterLobby(ClientInstance.controller)
|
||||||
local TheaterLobbyMenu = MainLobbyWidget:openMenu("TheaterLobby", ClientInstance.controller, {
|
local TheaterLobbyMenu = MainLobbyWidget:openMenu("TheaterLobby", ClientInstance.controller, {
|
||||||
parent = "MainLobby"
|
parent = "MainLobby",
|
||||||
})
|
})
|
||||||
MainLobbyWidget:close()
|
MainLobbyWidget:close()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.OpenCODTV = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.OpenCODTV = function(MainLobbyWidget, ClientInstance)
|
||||||
if Engine.CanViewContent() == false then
|
if Engine.CanViewContent() == false then
|
||||||
MainLobbyWidget:openPopup("popup_contentrestricted", ClientInstance.controller)
|
MainLobbyWidget:openPopup("popup_contentrestricted", ClientInstance.controller)
|
||||||
return
|
return
|
||||||
@ -255,7 +255,7 @@ CoD.MainLobby.OpenCODTV = function (MainLobbyWidget, ClientInstance)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.OpenBarracks = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.OpenBarracks = function(MainLobbyWidget, ClientInstance)
|
||||||
if UIExpression.IsGuest(ClientInstance.controller) == 1 then
|
if UIExpression.IsGuest(ClientInstance.controller) == 1 then
|
||||||
MainLobbyWidget:openPopup("popup_guest_contentrestricted", ClientInstance.controller)
|
MainLobbyWidget:openPopup("popup_guest_contentrestricted", ClientInstance.controller)
|
||||||
return
|
return
|
||||||
@ -270,7 +270,7 @@ CoD.MainLobby.OpenBarracks = function (MainLobbyWidget, ClientInstance)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.OpenStore = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.OpenStore = function(MainLobbyWidget, ClientInstance)
|
||||||
if MainLobbyWidget.occludedBy then
|
if MainLobbyWidget.occludedBy then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -298,15 +298,15 @@ CoD.MainLobby.OpenStore = function (MainLobbyWidget, ClientInstance)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.OpenControlsMenu = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.OpenControlsMenu = function(MainLobbyWidget, ClientInstance)
|
||||||
MainLobbyWidget:openPopup("WiiUControllerSettings", ClientInstance.controller, true)
|
MainLobbyWidget:openPopup("WiiUControllerSettings", ClientInstance.controller, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.OpenOptionsMenu = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.OpenOptionsMenu = function(MainLobbyWidget, ClientInstance)
|
||||||
MainLobbyWidget:openPopup("OptionsMenu", ClientInstance.controller)
|
MainLobbyWidget:openPopup("OptionsMenu", ClientInstance.controller)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.UpdateButtonPaneButtonVisibilty_Multiplayer = function (MainLobbyButtonPane)
|
CoD.MainLobby.UpdateButtonPaneButtonVisibilty_Multiplayer = function(MainLobbyButtonPane)
|
||||||
if CoD.isPartyHost() then
|
if CoD.isPartyHost() then
|
||||||
MainLobbyButtonPane.body.buttonList:addElement(MainLobbyButtonPane.body.matchmakingButton)
|
MainLobbyButtonPane.body.buttonList:addElement(MainLobbyButtonPane.body.matchmakingButton)
|
||||||
--MainLobbyButtonPane.body.buttonList:addElement(MainLobbyButtonPane.body.leaguePlayButton)
|
--MainLobbyButtonPane.body.buttonList:addElement(MainLobbyButtonPane.body.leaguePlayButton)
|
||||||
@ -327,7 +327,7 @@ CoD.MainLobby.UpdateButtonPaneButtonVisibilty_Multiplayer = function (MainLobbyB
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.UpdateButtonPaneButtonVisibilty_Zombie = function (MainLobbyButtonPane)
|
CoD.MainLobby.UpdateButtonPaneButtonVisibilty_Zombie = function(MainLobbyButtonPane)
|
||||||
if CoD.isPartyHost() then
|
if CoD.isPartyHost() then
|
||||||
-- MainLobbyButtonPane.body.buttonList:addElement(MainLobbyButtonPane.body.matchmakingButton)
|
-- MainLobbyButtonPane.body.buttonList:addElement(MainLobbyButtonPane.body.matchmakingButton)
|
||||||
MainLobbyButtonPane.body.buttonList:addElement(MainLobbyButtonPane.body.customSpacer)
|
MainLobbyButtonPane.body.buttonList:addElement(MainLobbyButtonPane.body.customSpacer)
|
||||||
@ -352,7 +352,7 @@ CoD.MainLobby.UpdateButtonPaneButtonVisibilty_Zombie = function (MainLobbyButton
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.UpdateButtonPaneButtonVisibilty = function (MainLobbyButtonPane)
|
CoD.MainLobby.UpdateButtonPaneButtonVisibilty = function(MainLobbyButtonPane)
|
||||||
if MainLobbyButtonPane == nil or MainLobbyButtonPane.body == nil then
|
if MainLobbyButtonPane == nil or MainLobbyButtonPane.body == nil then
|
||||||
return
|
return
|
||||||
elseif CoD.isZombie == true then
|
elseif CoD.isZombie == true then
|
||||||
@ -363,7 +363,7 @@ CoD.MainLobby.UpdateButtonPaneButtonVisibilty = function (MainLobbyButtonPane)
|
|||||||
MainLobbyButtonPane:setLayoutCached(false)
|
MainLobbyButtonPane:setLayoutCached(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.UpdateButtonPromptVisibility = function (MainLobbyWidget)
|
CoD.MainLobby.UpdateButtonPromptVisibility = function(MainLobbyWidget)
|
||||||
if MainLobbyWidget == nil then
|
if MainLobbyWidget == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -391,7 +391,7 @@ CoD.MainLobby.UpdateButtonPromptVisibility = function (MainLobbyWidget)
|
|||||||
MainLobbyWidget:addNATType()
|
MainLobbyWidget:addNATType()
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.PopulateButtons_Multiplayer = function (MainLobbyButtonPane)
|
CoD.MainLobby.PopulateButtons_Multiplayer = function(MainLobbyButtonPane)
|
||||||
MainLobbyButtonPane.body.serverBrowserButton = MainLobbyButtonPane.body.buttonList:addButton(Engine.Localize("SERVER BROWSER"), nil, 1)
|
MainLobbyButtonPane.body.serverBrowserButton = MainLobbyButtonPane.body.buttonList:addButton(Engine.Localize("SERVER BROWSER"), nil, 1)
|
||||||
MainLobbyButtonPane.body.serverBrowserButton.hintText = Engine.Localize(CoD.MPZM("MPUI_PLAYER_MATCH_DESC", "ZMUI_PLAYER_MATCH_DESC"))
|
MainLobbyButtonPane.body.serverBrowserButton.hintText = Engine.Localize(CoD.MPZM("MPUI_PLAYER_MATCH_DESC", "ZMUI_PLAYER_MATCH_DESC"))
|
||||||
MainLobbyButtonPane.body.serverBrowserButton:setActionEventName("open_server_browser_mainlobby")
|
MainLobbyButtonPane.body.serverBrowserButton:setActionEventName("open_server_browser_mainlobby")
|
||||||
@ -438,7 +438,7 @@ CoD.MainLobby.PopulateButtons_Multiplayer = function (MainLobbyButtonPane)
|
|||||||
MainLobbyButtonPane.body.modsButton:setActionEventName("open_mods_menu")
|
MainLobbyButtonPane.body.modsButton:setActionEventName("open_mods_menu")
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.PopulateButtons_Zombie = function (MainLobbyButtonPane)
|
CoD.MainLobby.PopulateButtons_Zombie = function(MainLobbyButtonPane)
|
||||||
MainLobbyButtonPane.body.serverBrowserButton = MainLobbyButtonPane.body.buttonList:addButton(Engine.Localize("SERVER BROWSER"), nil, 1)
|
MainLobbyButtonPane.body.serverBrowserButton = MainLobbyButtonPane.body.buttonList:addButton(Engine.Localize("SERVER BROWSER"), nil, 1)
|
||||||
MainLobbyButtonPane.body.serverBrowserButton.hintText = Engine.Localize(CoD.MPZM("MPUI_PLAYER_MATCH_DESC", "ZMUI_PLAYER_MATCH_DESC"))
|
MainLobbyButtonPane.body.serverBrowserButton.hintText = Engine.Localize(CoD.MPZM("MPUI_PLAYER_MATCH_DESC", "ZMUI_PLAYER_MATCH_DESC"))
|
||||||
MainLobbyButtonPane.body.serverBrowserButton:setActionEventName("open_server_browser_mainlobby")
|
MainLobbyButtonPane.body.serverBrowserButton:setActionEventName("open_server_browser_mainlobby")
|
||||||
@ -470,7 +470,7 @@ CoD.MainLobby.PopulateButtons_Zombie = function (MainLobbyButtonPane)
|
|||||||
MainLobbyButtonPane.body.modsButton:setActionEventName("open_mods_menu")
|
MainLobbyButtonPane.body.modsButton:setActionEventName("open_mods_menu")
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.PopulateButtons = function (MainLobbyButtonPane)
|
CoD.MainLobby.PopulateButtons = function(MainLobbyButtonPane)
|
||||||
if CoD.isZombie == true then
|
if CoD.isZombie == true then
|
||||||
CoD.MainLobby.PopulateButtons_Zombie(MainLobbyButtonPane)
|
CoD.MainLobby.PopulateButtons_Zombie(MainLobbyButtonPane)
|
||||||
else
|
else
|
||||||
@ -504,7 +504,7 @@ CoD.MainLobby.PopulateButtons = function (MainLobbyButtonPane)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.UpdateOnlinePlayerCount = function (PlayerCountLabel)
|
CoD.MainLobby.UpdateOnlinePlayerCount = function(PlayerCountLabel)
|
||||||
if CoD.isOnlineGame() then
|
if CoD.isOnlineGame() then
|
||||||
local PlayerCountText = CoD.Menu.GetOnlinePlayerCountText()
|
local PlayerCountText = CoD.Menu.GetOnlinePlayerCountText()
|
||||||
if PlayerCountText ~= "" then
|
if PlayerCountText ~= "" then
|
||||||
@ -515,7 +515,7 @@ CoD.MainLobby.UpdateOnlinePlayerCount = function (PlayerCountLabel)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.FirstSignedInToLive = function (MainLobbyWidget)
|
CoD.MainLobby.FirstSignedInToLive = function(MainLobbyWidget)
|
||||||
if MainLobbyWidget ~= nil then
|
if MainLobbyWidget ~= nil then
|
||||||
if CoD.isXBOX then
|
if CoD.isXBOX then
|
||||||
MainLobbyWidget.anyControllerAllowed = false
|
MainLobbyWidget.anyControllerAllowed = false
|
||||||
@ -526,13 +526,13 @@ CoD.MainLobby.FirstSignedInToLive = function (MainLobbyWidget)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.LastSignedOutOfLive = function (MainLobbyWidget)
|
CoD.MainLobby.LastSignedOutOfLive = function(MainLobbyWidget)
|
||||||
if MainLobbyWidget ~= nil and CoD.isXBOX then
|
if MainLobbyWidget ~= nil and CoD.isXBOX then
|
||||||
MainLobbyWidget.anyControllerAllowed = true
|
MainLobbyWidget.anyControllerAllowed = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.PlayerSelected = function (MainLobbyWidget, PlayerSelectedEvent)
|
CoD.MainLobby.PlayerSelected = function(MainLobbyWidget, PlayerSelectedEvent)
|
||||||
if MainLobbyWidget.joinable ~= nil and CoD.canJoinSession(UIExpression.GetPrimaryController(), PlayerSelectedEvent.playerXuid) then
|
if MainLobbyWidget.joinable ~= nil and CoD.canJoinSession(UIExpression.GetPrimaryController(), PlayerSelectedEvent.playerXuid) then
|
||||||
if MainLobbyWidget.joinButton == nil and not MainLobbyWidget.m_blockJoinButton then
|
if MainLobbyWidget.joinButton == nil and not MainLobbyWidget.m_blockJoinButton then
|
||||||
MainLobbyWidget:addJoinButton()
|
MainLobbyWidget:addJoinButton()
|
||||||
@ -545,7 +545,7 @@ CoD.MainLobby.PlayerSelected = function (MainLobbyWidget, PlayerSelectedEvent)
|
|||||||
MainLobbyWidget:dispatchEventToChildren(PlayerSelectedEvent)
|
MainLobbyWidget:dispatchEventToChildren(PlayerSelectedEvent)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.PlayerDeselected = function (MainLobbyWidget, PlayerDeselectedEvent)
|
CoD.MainLobby.PlayerDeselected = function(MainLobbyWidget, PlayerDeselectedEvent)
|
||||||
if MainLobbyWidget.joinButton ~= nil then
|
if MainLobbyWidget.joinButton ~= nil then
|
||||||
MainLobbyWidget.joinButton:close()
|
MainLobbyWidget.joinButton:close()
|
||||||
MainLobbyWidget.joinButton = nil
|
MainLobbyWidget.joinButton = nil
|
||||||
@ -553,23 +553,23 @@ CoD.MainLobby.PlayerDeselected = function (MainLobbyWidget, PlayerDeselectedEven
|
|||||||
MainLobbyWidget:dispatchEventToChildren(PlayerDeselectedEvent)
|
MainLobbyWidget:dispatchEventToChildren(PlayerDeselectedEvent)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.CurrentPanelChanged = function (MainLobbyWidget, f27_arg1)
|
CoD.MainLobby.CurrentPanelChanged = function(MainLobbyWidget, f27_arg1)
|
||||||
if CoD.isPC then
|
if CoD.isPC then
|
||||||
MainLobbyWidget.m_blockJoinButton = f27_arg1.id ~= "PanelManager.lobbyPane"
|
MainLobbyWidget.m_blockJoinButton = f27_arg1.id ~= "PanelManager.lobbyPane"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--Unused skipped
|
--Unused skipped
|
||||||
CoD.MainLobby.BusyList_Update = function (f28_arg0, f28_arg1, f28_arg2, f28_arg3, f28_arg4)
|
CoD.MainLobby.BusyList_Update = function(f28_arg0, f28_arg1, f28_arg2, f28_arg3, f28_arg4)
|
||||||
CoD.PlayerList.Update(f28_arg0, Engine.GetBusyFriendsOfAllLocalPlayers(f28_arg0.maxRows - f28_arg2), f28_arg2, f28_arg3, f28_arg4)
|
CoD.PlayerList.Update(f28_arg0, Engine.GetBusyFriendsOfAllLocalPlayers(f28_arg0.maxRows - f28_arg2), f28_arg2, f28_arg3, f28_arg4)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.Update = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.Update = function(MainLobbyWidget, ClientInstance)
|
||||||
if MainLobbyWidget == nil then
|
if MainLobbyWidget == nil then
|
||||||
return
|
return
|
||||||
elseif UIExpression.IsDemonwareFetchingDone(ClientInstance.controller) == 1 == true then
|
elseif UIExpression.IsDemonwareFetchingDone(ClientInstance.controller) == 1 == true then
|
||||||
MainLobbyWidget.panelManager:processEvent({
|
MainLobbyWidget.panelManager:processEvent({
|
||||||
name = "fetching_done"
|
name = "fetching_done",
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
CoD.MainLobby.UpdateButtonPaneButtonVisibilty(MainLobbyWidget.buttonPane)
|
CoD.MainLobby.UpdateButtonPaneButtonVisibilty(MainLobbyWidget.buttonPane)
|
||||||
@ -577,7 +577,7 @@ CoD.MainLobby.Update = function (MainLobbyWidget, ClientInstance)
|
|||||||
MainLobbyWidget:dispatchEventToChildren(ClientInstance)
|
MainLobbyWidget:dispatchEventToChildren(ClientInstance)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.ClientLeave = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.ClientLeave = function(MainLobbyWidget, ClientInstance)
|
||||||
Engine.ExecNow(ClientInstance.controller, "leaveAllParties")
|
Engine.ExecNow(ClientInstance.controller, "leaveAllParties")
|
||||||
Engine.PartyHostClearUIState()
|
Engine.PartyHostClearUIState()
|
||||||
CoD.StartMainLobby(ClientInstance.controller)
|
CoD.StartMainLobby(ClientInstance.controller)
|
||||||
@ -585,7 +585,7 @@ CoD.MainLobby.ClientLeave = function (MainLobbyWidget, ClientInstance)
|
|||||||
CoD.MainLobby.UpdateButtonPromptVisibility()
|
CoD.MainLobby.UpdateButtonPromptVisibility()
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.GoBack = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.GoBack = function(MainLobbyWidget, ClientInstance)
|
||||||
Engine.SessionModeResetModes()
|
Engine.SessionModeResetModes()
|
||||||
Engine.Exec(ClientInstance.controller, "xstopprivateparty")
|
Engine.Exec(ClientInstance.controller, "xstopprivateparty")
|
||||||
if CoD.isPS3 then
|
if CoD.isPS3 then
|
||||||
@ -595,18 +595,18 @@ CoD.MainLobby.GoBack = function (MainLobbyWidget, ClientInstance)
|
|||||||
CoD.Menu.goBack(MainLobbyWidget, ClientInstance.controller)
|
CoD.Menu.goBack(MainLobbyWidget, ClientInstance.controller)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.Back = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.Back = function(MainLobbyWidget, ClientInstance)
|
||||||
if CoD.Lobby.OpenSignOutPopup(MainLobbyWidget, ClientInstance) == true then
|
if CoD.Lobby.OpenSignOutPopup(MainLobbyWidget, ClientInstance) == true then
|
||||||
return
|
return
|
||||||
elseif UIExpression.IsPrimaryLocalClient(ClientInstance.controller) == 0 then
|
elseif UIExpression.IsPrimaryLocalClient(ClientInstance.controller) == 0 then
|
||||||
Engine.Exec(ClientInstance.controller, "signclientout")
|
Engine.Exec(ClientInstance.controller, "signclientout")
|
||||||
MainLobbyWidget:processEvent({
|
MainLobbyWidget:processEvent({
|
||||||
name = "controller_backed_out"
|
name = "controller_backed_out",
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
elseif UIExpression.AloneInPartyIgnoreSplitscreen(ClientInstance.controller, 1) == 0 then
|
elseif UIExpression.AloneInPartyIgnoreSplitscreen(ClientInstance.controller, 1) == 0 then
|
||||||
local CustomLeaveMessage = {
|
local CustomLeaveMessage = {
|
||||||
params = {}
|
params = {},
|
||||||
}
|
}
|
||||||
if not CoD.isPartyHost() then
|
if not CoD.isPartyHost() then
|
||||||
CustomLeaveMessage.titleText = Engine.Localize("MENU_LEAVE_LOBBY_TITLE")
|
CustomLeaveMessage.titleText = Engine.Localize("MENU_LEAVE_LOBBY_TITLE")
|
||||||
@ -615,7 +615,7 @@ CoD.MainLobby.Back = function (MainLobbyWidget, ClientInstance)
|
|||||||
leaveHandler = CoD.MainLobby.ClientLeave,
|
leaveHandler = CoD.MainLobby.ClientLeave,
|
||||||
leaveEvent = "client_leave",
|
leaveEvent = "client_leave",
|
||||||
leaveText = Engine.Localize("MENU_LEAVE_LOBBY_AND_PARTY"),
|
leaveText = Engine.Localize("MENU_LEAVE_LOBBY_AND_PARTY"),
|
||||||
debugHelper = "You're a client of a private party, remove you from the party"
|
debugHelper = "You're a client of a private party, remove you from the party",
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
CustomLeaveMessage.titleText = Engine.Localize("MENU_DISBAND_PARTY_TITLE")
|
CustomLeaveMessage.titleText = Engine.Localize("MENU_DISBAND_PARTY_TITLE")
|
||||||
@ -624,7 +624,7 @@ CoD.MainLobby.Back = function (MainLobbyWidget, ClientInstance)
|
|||||||
leaveHandler = CoD.MainLobby.GoBack,
|
leaveHandler = CoD.MainLobby.GoBack,
|
||||||
leaveEvent = "host_leave",
|
leaveEvent = "host_leave",
|
||||||
leaveText = Engine.Localize("MENU_LEAVE_AND_DISBAND_PARTY"),
|
leaveText = Engine.Localize("MENU_LEAVE_AND_DISBAND_PARTY"),
|
||||||
debugHelper = "You're the leader of a private party, choosing this will disband your party"
|
debugHelper = "You're the leader of a private party, choosing this will disband your party",
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
CoD.Lobby.ConfirmLeave(MainLobbyWidget, ClientInstance.controller, nil, nil, CustomLeaveMessage)
|
CoD.Lobby.ConfirmLeave(MainLobbyWidget, ClientInstance.controller, nil, nil, CustomLeaveMessage)
|
||||||
@ -633,7 +633,7 @@ CoD.MainLobby.Back = function (MainLobbyWidget, ClientInstance)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.AddLobbyPaneElements = function (LobbyPane, MenuParty)
|
CoD.MainLobby.AddLobbyPaneElements = function(LobbyPane, MenuParty)
|
||||||
CoD.LobbyPanes.addLobbyPaneElements(LobbyPane, MenuParty, UIExpression.DvarInt(nil, "party_maxlocalplayers_mainlobby"))
|
CoD.LobbyPanes.addLobbyPaneElements(LobbyPane, MenuParty, UIExpression.DvarInt(nil, "party_maxlocalplayers_mainlobby"))
|
||||||
LobbyPane.body.lobbyList.joinableList = CoD.JoinableList.New({
|
LobbyPane.body.lobbyList.joinableList = CoD.JoinableList.New({
|
||||||
leftAnchor = true,
|
leftAnchor = true,
|
||||||
@ -643,7 +643,7 @@ CoD.MainLobby.AddLobbyPaneElements = function (LobbyPane, MenuParty)
|
|||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
top = 0,
|
top = 0,
|
||||||
bottom = 0
|
bottom = 0,
|
||||||
}, false, "", "joinableList", LobbyPane.id)
|
}, false, "", "joinableList", LobbyPane.id)
|
||||||
LobbyPane.body.lobbyList.joinableList.pane = LobbyPane
|
LobbyPane.body.lobbyList.joinableList.pane = LobbyPane
|
||||||
LobbyPane.body.lobbyList.joinableList.maxRows = CoD.MaxPlayerListRows - 2
|
LobbyPane.body.lobbyList.joinableList.maxRows = CoD.MaxPlayerListRows - 2
|
||||||
@ -651,46 +651,46 @@ CoD.MainLobby.AddLobbyPaneElements = function (LobbyPane, MenuParty)
|
|||||||
LobbyPane.body.lobbyList:addElement(LobbyPane.body.lobbyList.joinableList)
|
LobbyPane.body.lobbyList:addElement(LobbyPane.body.lobbyList.joinableList)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.ButtonListButtonGainFocus = function (f34_arg0, ClientInstance)
|
CoD.MainLobby.ButtonListButtonGainFocus = function(f34_arg0, ClientInstance)
|
||||||
f34_arg0:dispatchEventToParent({
|
f34_arg0:dispatchEventToParent({
|
||||||
name = "add_party_privacy_button"
|
name = "add_party_privacy_button",
|
||||||
})
|
})
|
||||||
CoD.Lobby.ButtonListButtonGainFocus(f34_arg0, ClientInstance)
|
CoD.Lobby.ButtonListButtonGainFocus(f34_arg0, ClientInstance)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.ButtonListAddButton = function (f35_arg0, f35_arg1, f35_arg2, f35_arg3)
|
CoD.MainLobby.ButtonListAddButton = function(f35_arg0, f35_arg1, f35_arg2, f35_arg3)
|
||||||
local f35_local0 = CoD.Lobby.ButtonListAddButton(f35_arg0, f35_arg1, f35_arg2, f35_arg3)
|
local f35_local0 = CoD.Lobby.ButtonListAddButton(f35_arg0, f35_arg1, f35_arg2, f35_arg3)
|
||||||
f35_local0:registerEventHandler("gain_focus", CoD.MainLobby.ButtonListButtonGainFocus)
|
f35_local0:registerEventHandler("gain_focus", CoD.MainLobby.ButtonListButtonGainFocus)
|
||||||
return f35_local0
|
return f35_local0
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.AddButtonPaneElements = function (f36_arg0)
|
CoD.MainLobby.AddButtonPaneElements = function(f36_arg0)
|
||||||
CoD.LobbyPanes.addButtonPaneElements(f36_arg0)
|
CoD.LobbyPanes.addButtonPaneElements(f36_arg0)
|
||||||
f36_arg0.body.buttonList.addButton = CoD.MainLobby.ButtonListAddButton
|
f36_arg0.body.buttonList.addButton = CoD.MainLobby.ButtonListAddButton
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.PopulateButtonPaneElements = function (MainLobbyButtonPane)
|
CoD.MainLobby.PopulateButtonPaneElements = function(MainLobbyButtonPane)
|
||||||
CoD.MainLobby.PopulateButtons(MainLobbyButtonPane)
|
CoD.MainLobby.PopulateButtons(MainLobbyButtonPane)
|
||||||
CoD.MainLobby.UpdateButtonPaneButtonVisibilty(MainLobbyButtonPane)
|
CoD.MainLobby.UpdateButtonPaneButtonVisibilty(MainLobbyButtonPane)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.GoToFindingGames_Zombie = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.GoToFindingGames_Zombie = function(MainLobbyWidget, ClientInstance)
|
||||||
Engine.Exec(ClientInstance.controller, "xstartparty")
|
Engine.Exec(ClientInstance.controller, "xstartparty")
|
||||||
Engine.Exec(ClientInstance.controller, "updategamerprofile")
|
Engine.Exec(ClientInstance.controller, "updategamerprofile")
|
||||||
local PublicGameLobbyMenu = MainLobbyWidget:openMenu("PublicGameLobby", ClientInstance.controller)
|
local PublicGameLobbyMenu = MainLobbyWidget:openMenu("PublicGameLobby", ClientInstance.controller)
|
||||||
PublicGameLobbyMenu:setPreviousMenu("MainLobby")
|
PublicGameLobbyMenu:setPreviousMenu("MainLobby")
|
||||||
PublicGameLobbyMenu:registerAnimationState("hide", {
|
PublicGameLobbyMenu:registerAnimationState("hide", {
|
||||||
alpha = 0
|
alpha = 0,
|
||||||
})
|
})
|
||||||
PublicGameLobbyMenu:animateToState("hide")
|
PublicGameLobbyMenu:animateToState("hide")
|
||||||
PublicGameLobbyMenu:registerAnimationState("show", {
|
PublicGameLobbyMenu:registerAnimationState("show", {
|
||||||
alpha = 1
|
alpha = 1,
|
||||||
})
|
})
|
||||||
PublicGameLobbyMenu:animateToState("show", 500)
|
PublicGameLobbyMenu:animateToState("show", 500)
|
||||||
MainLobbyWidget:close()
|
MainLobbyWidget:close()
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.ButtonPromptJoin = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.ButtonPromptJoin = function(MainLobbyWidget, ClientInstance)
|
||||||
if UIExpression.IsGuest(ClientInstance.controller) == 1 then
|
if UIExpression.IsGuest(ClientInstance.controller) == 1 then
|
||||||
local f39_local0 = MainLobbyWidget:openPopup("Error", ClientInstance.controller)
|
local f39_local0 = MainLobbyWidget:openPopup("Error", ClientInstance.controller)
|
||||||
f39_local0:setMessage(Engine.Localize("XBOXLIVE_NOGUESTACCOUNTS"))
|
f39_local0:setMessage(Engine.Localize("XBOXLIVE_NOGUESTACCOUNTS"))
|
||||||
@ -703,7 +703,7 @@ CoD.MainLobby.ButtonPromptJoin = function (MainLobbyWidget, ClientInstance)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
LUI.createMenu.MainLobby = function (LocalClientIndex)
|
LUI.createMenu.MainLobby = function(LocalClientIndex)
|
||||||
local MainLobbyName = Engine.Localize(CoD.MPZM("MENU_MULTIPLAYER_CAPS", "MENU_ZOMBIES_CAPS"))
|
local MainLobbyName = Engine.Localize(CoD.MPZM("MENU_MULTIPLAYER_CAPS", "MENU_ZOMBIES_CAPS"))
|
||||||
local MainLobbyWidget = CoD.Lobby.New("MainLobby", LocalClientIndex, nil, MainLobbyName)
|
local MainLobbyWidget = CoD.Lobby.New("MainLobby", LocalClientIndex, nil, MainLobbyName)
|
||||||
MainLobbyWidget.controller = LocalClientIndex
|
MainLobbyWidget.controller = LocalClientIndex
|
||||||
@ -769,7 +769,7 @@ LUI.createMenu.MainLobby = function (LocalClientIndex)
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
MainLobbyWidget.buttonPane.body.theaterButton:processEvent({
|
MainLobbyWidget.buttonPane.body.theaterButton:processEvent({
|
||||||
name = "gain_focus"
|
name = "gain_focus",
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -795,11 +795,11 @@ LUI.createMenu.MainLobby = function (LocalClientIndex)
|
|||||||
return MainLobbyWidget
|
return MainLobbyWidget
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.OpenSessionRejoinPopup = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.OpenSessionRejoinPopup = function(MainLobbyWidget, ClientInstance)
|
||||||
MainLobbyWidget:openPopup("RejoinSessionPopup", ClientInstance.controller)
|
MainLobbyWidget:openPopup("RejoinSessionPopup", ClientInstance.controller)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.elite_registration_ended = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.elite_registration_ended = function(MainLobbyWidget, ClientInstance)
|
||||||
if UIExpression.IsGuest(ClientInstance.controller) == 1 then
|
if UIExpression.IsGuest(ClientInstance.controller) == 1 then
|
||||||
MainLobbyWidget:openPopup("popup_guest_contentrestricted", ClientInstance.controller)
|
MainLobbyWidget:openPopup("popup_guest_contentrestricted", ClientInstance.controller)
|
||||||
return
|
return
|
||||||
@ -812,7 +812,7 @@ CoD.MainLobby.elite_registration_ended = function (MainLobbyWidget, ClientInstan
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MainLobby.OpenEliteAppPopup = function (MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.OpenEliteAppPopup = function(MainLobbyWidget, ClientInstance)
|
||||||
if UIExpression.IsGuest(ClientInstance.controller) == 1 then
|
if UIExpression.IsGuest(ClientInstance.controller) == 1 then
|
||||||
MainLobbyWidget:openPopup("popup_guest_contentrestricted", ClientInstance.controller)
|
MainLobbyWidget:openPopup("popup_guest_contentrestricted", ClientInstance.controller)
|
||||||
return
|
return
|
||||||
@ -833,7 +833,7 @@ end
|
|||||||
|
|
||||||
CoD.MainLobby.OpenModsList = function(MainLobbyWidget, ClientInstance)
|
CoD.MainLobby.OpenModsList = function(MainLobbyWidget, ClientInstance)
|
||||||
MainLobbyWidget:openMenu("Mods", ClientInstance.controller, {
|
MainLobbyWidget:openMenu("Mods", ClientInstance.controller, {
|
||||||
parent = "MainLobby"
|
parent = "MainLobby",
|
||||||
})
|
})
|
||||||
MainLobbyWidget:close()
|
MainLobbyWidget:close()
|
||||||
end
|
end
|
||||||
|
@ -11,7 +11,7 @@ CoD.MapInfoImage.MapImageLeft = 6
|
|||||||
CoD.MapInfoImage.SpinnerImageYPadding = -25
|
CoD.MapInfoImage.SpinnerImageYPadding = -25
|
||||||
CoD.MapInfoImage.SpinnerImageXPadding = -8
|
CoD.MapInfoImage.SpinnerImageXPadding = -8
|
||||||
CoD.MapInfoImage.SpinnerImageDimension = 32
|
CoD.MapInfoImage.SpinnerImageDimension = 32
|
||||||
CoD.MapInfoImage.new = function (f1_arg0)
|
CoD.MapInfoImage.new = function(f1_arg0)
|
||||||
local Widget = LUI.UIElement.new(f1_arg0)
|
local Widget = LUI.UIElement.new(f1_arg0)
|
||||||
Widget:registerEventHandler("gamelobby_update", CoD.MapInfoImage.RefreshEvent)
|
Widget:registerEventHandler("gamelobby_update", CoD.MapInfoImage.RefreshEvent)
|
||||||
Widget:registerEventHandler("game_options_update", CoD.MapInfoImage.RefreshEvent)
|
Widget:registerEventHandler("game_options_update", CoD.MapInfoImage.RefreshEvent)
|
||||||
@ -32,7 +32,7 @@ CoD.MapInfoImage.new = function (f1_arg0)
|
|||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
top = f1_local2 - CoD.MapInfoImage.MapImageHeight,
|
top = f1_local2 - CoD.MapInfoImage.MapImageHeight,
|
||||||
bottom = f1_local2,
|
bottom = f1_local2,
|
||||||
alpha = 0
|
alpha = 0,
|
||||||
})
|
})
|
||||||
Widget:addElement(Widget.mapImage)
|
Widget:addElement(Widget.mapImage)
|
||||||
local f1_local3 = 46
|
local f1_local3 = 46
|
||||||
@ -53,7 +53,7 @@ CoD.MapInfoImage.new = function (f1_arg0)
|
|||||||
material = RegisterMaterial("white"),
|
material = RegisterMaterial("white"),
|
||||||
red = 0,
|
red = 0,
|
||||||
green = 0,
|
green = 0,
|
||||||
blue = 0
|
blue = 0,
|
||||||
})
|
})
|
||||||
Widget.unselectedFilmImageBackground:setAlpha(0)
|
Widget.unselectedFilmImageBackground:setAlpha(0)
|
||||||
Widget:addElement(Widget.unselectedFilmImageBackground)
|
Widget:addElement(Widget.unselectedFilmImageBackground)
|
||||||
@ -69,7 +69,7 @@ CoD.MapInfoImage.new = function (f1_arg0)
|
|||||||
material = RegisterMaterial("menu_mp_lobby_icon_film"),
|
material = RegisterMaterial("menu_mp_lobby_icon_film"),
|
||||||
red = 1,
|
red = 1,
|
||||||
green = 1,
|
green = 1,
|
||||||
blue = 1
|
blue = 1,
|
||||||
})
|
})
|
||||||
Widget.unselectedFilmImage:setAlpha(0)
|
Widget.unselectedFilmImage:setAlpha(0)
|
||||||
Widget:addElement(Widget.unselectedFilmImage)
|
Widget:addElement(Widget.unselectedFilmImage)
|
||||||
@ -88,7 +88,7 @@ CoD.MapInfoImage.new = function (f1_arg0)
|
|||||||
font = CoD.fonts.ExtraSmall,
|
font = CoD.fonts.ExtraSmall,
|
||||||
red = CoD.offWhite.r,
|
red = CoD.offWhite.r,
|
||||||
green = CoD.offWhite.g,
|
green = CoD.offWhite.g,
|
||||||
blue = CoD.offWhite.b
|
blue = CoD.offWhite.b,
|
||||||
})
|
})
|
||||||
Widget:addElement(Widget.gameTypeText)
|
Widget:addElement(Widget.gameTypeText)
|
||||||
Widget.mapNameText = LUI.UIText.new({
|
Widget.mapNameText = LUI.UIText.new({
|
||||||
@ -104,7 +104,7 @@ CoD.MapInfoImage.new = function (f1_arg0)
|
|||||||
font = CoD.fonts.Default,
|
font = CoD.fonts.Default,
|
||||||
red = CoD.offWhite.r,
|
red = CoD.offWhite.r,
|
||||||
green = CoD.offWhite.g,
|
green = CoD.offWhite.g,
|
||||||
blue = CoD.offWhite.b
|
blue = CoD.offWhite.b,
|
||||||
})
|
})
|
||||||
Widget:addElement(Widget.mapNameText)
|
Widget:addElement(Widget.mapNameText)
|
||||||
local f1_local7 = UIExpression.ToUpper(nil, Engine.Localize("EXE_LOADING"))
|
local f1_local7 = UIExpression.ToUpper(nil, Engine.Localize("EXE_LOADING"))
|
||||||
@ -127,7 +127,7 @@ CoD.MapInfoImage.new = function (f1_arg0)
|
|||||||
top = CoD.MapInfoImage.MapImageHeight / 2 - Widget.unselectedFilmTextSize / 2,
|
top = CoD.MapInfoImage.MapImageHeight / 2 - Widget.unselectedFilmTextSize / 2,
|
||||||
bottom = CoD.MapInfoImage.MapImageHeight / 2 + Widget.unselectedFilmTextSize / 2,
|
bottom = CoD.MapInfoImage.MapImageHeight / 2 + Widget.unselectedFilmTextSize / 2,
|
||||||
font = CoD.fonts.Default,
|
font = CoD.fonts.Default,
|
||||||
alignment = LUI.Alignment.Center
|
alignment = LUI.Alignment.Center,
|
||||||
})
|
})
|
||||||
Widget.unselectedFilmText:setAlpha(0)
|
Widget.unselectedFilmText:setAlpha(0)
|
||||||
Widget:addElement(Widget.unselectedFilmText)
|
Widget:addElement(Widget.unselectedFilmText)
|
||||||
@ -168,7 +168,7 @@ CoD.MapInfoImage.new = function (f1_arg0)
|
|||||||
red = 1,
|
red = 1,
|
||||||
green = 1,
|
green = 1,
|
||||||
blue = 1,
|
blue = 1,
|
||||||
alpha = 0
|
alpha = 0,
|
||||||
})
|
})
|
||||||
Widget:addElement(Widget.livestreamCam)
|
Widget:addElement(Widget.livestreamCam)
|
||||||
CoD.MapInfoImage.UpdateLiveStreamCamera(Widget)
|
CoD.MapInfoImage.UpdateLiveStreamCamera(Widget)
|
||||||
@ -182,11 +182,11 @@ CoD.MapInfoImage.new = function (f1_arg0)
|
|||||||
return Widget
|
return Widget
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MapInfoImage.Update = function (f2_arg0, f2_arg1, f2_arg2)
|
CoD.MapInfoImage.Update = function(f2_arg0, f2_arg1, f2_arg2)
|
||||||
if f2_arg1 ~= nil then
|
if f2_arg1 ~= nil then
|
||||||
f2_arg0.mapImage:registerAnimationState("change_map", {
|
f2_arg0.mapImage:registerAnimationState("change_map", {
|
||||||
material = RegisterMaterial("menu_" .. f2_arg1 .. "_map_select_final"),
|
material = RegisterMaterial("menu_" .. f2_arg1 .. "_map_select_final"),
|
||||||
alpha = 1
|
alpha = 1,
|
||||||
})
|
})
|
||||||
f2_arg0.mapImage:animateToState("change_map")
|
f2_arg0.mapImage:animateToState("change_map")
|
||||||
f2_arg0.mapNameText:setText(UIExpression.ToUpper(nil, Engine.Localize(UIExpression.TableLookup(nil, UIExpression.GetCurrentMapTableName(), 0, f2_arg1, 3))))
|
f2_arg0.mapNameText:setText(UIExpression.ToUpper(nil, Engine.Localize(UIExpression.TableLookup(nil, UIExpression.GetCurrentMapTableName(), 0, f2_arg1, 3))))
|
||||||
@ -201,7 +201,7 @@ CoD.MapInfoImage.Update = function (f2_arg0, f2_arg1, f2_arg2)
|
|||||||
CoD.MapInfoImage.DLCWarningUpdate(f2_arg0)
|
CoD.MapInfoImage.DLCWarningUpdate(f2_arg0)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MapInfoImage.UpdateLiveStreamCamera = function (f3_arg0, f3_arg1)
|
CoD.MapInfoImage.UpdateLiveStreamCamera = function(f3_arg0, f3_arg1)
|
||||||
if Engine.IsLivestreamEnabled() and Engine.WebM_camera_IsAvailable() and Engine.WebM_camera_IsEnabled() then
|
if Engine.IsLivestreamEnabled() and Engine.WebM_camera_IsAvailable() and Engine.WebM_camera_IsEnabled() then
|
||||||
f3_arg0.livestreamCam:setAlpha(1)
|
f3_arg0.livestreamCam:setAlpha(1)
|
||||||
else
|
else
|
||||||
@ -209,15 +209,15 @@ CoD.MapInfoImage.UpdateLiveStreamCamera = function (f3_arg0, f3_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MapInfoImage.UpdateEvent = function (f4_arg0, f4_arg1)
|
CoD.MapInfoImage.UpdateEvent = function(f4_arg0, f4_arg1)
|
||||||
f4_arg0:update(f4_arg1.map, f4_arg1.gametype)
|
f4_arg0:update(f4_arg1.map, f4_arg1.gametype)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MapInfoImage.RefreshEvent = function (f5_arg0, f5_arg1)
|
CoD.MapInfoImage.RefreshEvent = function(f5_arg0, f5_arg1)
|
||||||
f5_arg0:update(Dvar.ui_mapname:get(), Dvar.ui_gametype:get())
|
f5_arg0:update(Dvar.ui_mapname:get(), Dvar.ui_gametype:get())
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MapInfoImage.ZombieUpdate = function (f6_arg0, f6_arg1, f6_arg2)
|
CoD.MapInfoImage.ZombieUpdate = function(f6_arg0, f6_arg1, f6_arg2)
|
||||||
if Engine.GameModeIsMode(CoD.GAMEMODE_THEATER) == true and UIExpression.DvarString(f6_arg0.controller, "ui_demoname") == "" then
|
if Engine.GameModeIsMode(CoD.GAMEMODE_THEATER) == true and UIExpression.DvarString(f6_arg0.controller, "ui_demoname") == "" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -227,7 +227,7 @@ CoD.MapInfoImage.ZombieUpdate = function (f6_arg0, f6_arg1, f6_arg2)
|
|||||||
local f6_local2 = Engine.PartyGetHostUIState()
|
local f6_local2 = Engine.PartyGetHostUIState()
|
||||||
if (f6_local0 == "" or f6_local2 == CoD.PARTYHOST_STATE_SELECTING_GAMETYPE or f6_local2 == CoD.PARTYHOST_STATE_SELECTING_MAP) and UIExpression.GameHost(f6_arg0.controller) ~= 1 then
|
if (f6_local0 == "" or f6_local2 == CoD.PARTYHOST_STATE_SELECTING_GAMETYPE or f6_local2 == CoD.PARTYHOST_STATE_SELECTING_MAP) and UIExpression.GameHost(f6_arg0.controller) ~= 1 then
|
||||||
f6_arg0.mapImage:registerAnimationState("change_map", {
|
f6_arg0.mapImage:registerAnimationState("change_map", {
|
||||||
alpha = 0
|
alpha = 0,
|
||||||
})
|
})
|
||||||
f6_arg0.mapImage:animateToState("change_map", 100)
|
f6_arg0.mapImage:animateToState("change_map", 100)
|
||||||
f6_arg0.mapNameText:setText("")
|
f6_arg0.mapNameText:setText("")
|
||||||
@ -240,7 +240,7 @@ CoD.MapInfoImage.ZombieUpdate = function (f6_arg0, f6_arg1, f6_arg2)
|
|||||||
local materialName = GetMapMaterialName(f6_arg1, f6_local1, f6_local0)
|
local materialName = GetMapMaterialName(f6_arg1, f6_local1, f6_local0)
|
||||||
f6_arg0.mapImage:registerAnimationState("change_map", {
|
f6_arg0.mapImage:registerAnimationState("change_map", {
|
||||||
material = RegisterMaterial(materialName),
|
material = RegisterMaterial(materialName),
|
||||||
alpha = 1
|
alpha = 1,
|
||||||
})
|
})
|
||||||
f6_arg0.mapImage:animateToState("change_map", 100)
|
f6_arg0.mapImage:animateToState("change_map", 100)
|
||||||
|
|
||||||
@ -311,7 +311,7 @@ function GetGameModeDisplayName(gametype)
|
|||||||
return Engine.Localize("ZMUI_" .. gametype .. "_CAPS")
|
return Engine.Localize("ZMUI_" .. gametype .. "_CAPS")
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MapInfoImage.SetModifedCustomGame = function (f7_arg0, f7_arg1)
|
CoD.MapInfoImage.SetModifedCustomGame = function(f7_arg0, f7_arg1)
|
||||||
if f7_arg1 == true then
|
if f7_arg1 == true then
|
||||||
f7_arg0.modifedCustomGameElement.text:setText(Dvar.fshCustomGameName:get())
|
f7_arg0.modifedCustomGameElement.text:setText(Dvar.fshCustomGameName:get())
|
||||||
f7_arg0.modifedCustomGameElement:setAlpha(1)
|
f7_arg0.modifedCustomGameElement:setAlpha(1)
|
||||||
@ -320,7 +320,7 @@ CoD.MapInfoImage.SetModifedCustomGame = function (f7_arg0, f7_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MapInfoImage.TheaterUpdate = function (f8_arg0, f8_arg1, f8_arg2, f8_arg3, f8_arg4, f8_arg5)
|
CoD.MapInfoImage.TheaterUpdate = function(f8_arg0, f8_arg1, f8_arg2, f8_arg3, f8_arg4, f8_arg5)
|
||||||
if UIExpression.DvarString(f8_arg0.controller, "ui_demoname") == "" then
|
if UIExpression.DvarString(f8_arg0.controller, "ui_demoname") == "" then
|
||||||
f8_arg0.unselectedFilmImageBackground:setAlpha(0.2)
|
f8_arg0.unselectedFilmImageBackground:setAlpha(0.2)
|
||||||
f8_arg0.unselectedFilmImage:setAlpha(0.2)
|
f8_arg0.unselectedFilmImage:setAlpha(0.2)
|
||||||
@ -357,9 +357,9 @@ CoD.MapInfoImage.TheaterUpdate = function (f8_arg0, f8_arg1, f8_arg2, f8_arg3, f
|
|||||||
CoD.MapInfoImage.DLCWarningUpdate(f8_arg0)
|
CoD.MapInfoImage.DLCWarningUpdate(f8_arg0)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MapInfoImage.Show = function (f9_arg0, f9_arg1)
|
CoD.MapInfoImage.Show = function(f9_arg0, f9_arg1)
|
||||||
f9_arg0:registerAnimationState("show", {
|
f9_arg0:registerAnimationState("show", {
|
||||||
alphaMultiplier = 1
|
alphaMultiplier = 1,
|
||||||
})
|
})
|
||||||
local f9_local0 = CoD.MapInfoImage.AnimDuration
|
local f9_local0 = CoD.MapInfoImage.AnimDuration
|
||||||
if f9_arg1 then
|
if f9_arg1 then
|
||||||
@ -368,9 +368,9 @@ CoD.MapInfoImage.Show = function (f9_arg0, f9_arg1)
|
|||||||
f9_arg0:animateToState("show", f9_local0)
|
f9_arg0:animateToState("show", f9_local0)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MapInfoImage.Hide = function (f10_arg0, f10_arg1)
|
CoD.MapInfoImage.Hide = function(f10_arg0, f10_arg1)
|
||||||
f10_arg0:registerAnimationState("hide", {
|
f10_arg0:registerAnimationState("hide", {
|
||||||
alphaMultiplier = 0
|
alphaMultiplier = 0,
|
||||||
})
|
})
|
||||||
local f10_local0 = CoD.MapInfoImage.AnimDuration
|
local f10_local0 = CoD.MapInfoImage.AnimDuration
|
||||||
if f10_arg1 then
|
if f10_arg1 then
|
||||||
@ -379,7 +379,7 @@ CoD.MapInfoImage.Hide = function (f10_arg0, f10_arg1)
|
|||||||
f10_arg0:animateToState("hide", f10_local0)
|
f10_arg0:animateToState("hide", f10_local0)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MapInfoImage.ShowLeagueInfo = function (f11_arg0, f11_arg1)
|
CoD.MapInfoImage.ShowLeagueInfo = function(f11_arg0, f11_arg1)
|
||||||
if f11_arg1 then
|
if f11_arg1 then
|
||||||
f11_arg0.gameTypeText:setText(UIExpression.ToUpper(nil, f11_arg1.description))
|
f11_arg0.gameTypeText:setText(UIExpression.ToUpper(nil, f11_arg1.description))
|
||||||
f11_arg0.mapNameText:setText(UIExpression.ToUpper(nil, CoD.Menu.GetOnlinePlayerCountText(Engine.GetPlaylistID())))
|
f11_arg0.mapNameText:setText(UIExpression.ToUpper(nil, CoD.Menu.GetOnlinePlayerCountText(Engine.GetPlaylistID())))
|
||||||
@ -389,7 +389,7 @@ CoD.MapInfoImage.ShowLeagueInfo = function (f11_arg0, f11_arg1)
|
|||||||
CoD.MapInfoImage.UpdateLiveStreamCamera(f11_arg0, nil)
|
CoD.MapInfoImage.UpdateLiveStreamCamera(f11_arg0, nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.MapInfoImage.DLCWarningUpdate = function (f12_arg0)
|
CoD.MapInfoImage.DLCWarningUpdate = function(f12_arg0)
|
||||||
if f12_arg0.dlcWarningContainer ~= nil then
|
if f12_arg0.dlcWarningContainer ~= nil then
|
||||||
local f12_local0 = Engine.DoesPartyHaveDLCForMap(Dvar.ui_mapname:get())
|
local f12_local0 = Engine.DoesPartyHaveDLCForMap(Dvar.ui_mapname:get())
|
||||||
local f12_local1 = ""
|
local f12_local1 = ""
|
||||||
@ -410,4 +410,4 @@ CoD.MapInfoImage.DLCWarningUpdate = function (f12_arg0)
|
|||||||
end
|
end
|
||||||
f12_arg0.dlcWarningContainer.warningLabel:setText(f12_local1)
|
f12_arg0.dlcWarningContainer.warningLabel:setText(f12_local1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
require( "T6.Lobby" )
|
require("T6.Lobby")
|
||||||
require( "T6.Menus.PopupMenus" )
|
require("T6.Menus.PopupMenus")
|
||||||
require( "T6.ListBox" )
|
require("T6.ListBox")
|
||||||
|
|
||||||
local GameModes = {
|
local GameModes = {
|
||||||
"ZMUI_ZCLASSIC_GAMEMODE_CAPS",
|
"ZMUI_ZCLASSIC_GAMEMODE_CAPS",
|
||||||
@ -29,23 +29,23 @@ local Locations = {
|
|||||||
"ZMUI_CORNFIELD_CAPS",
|
"ZMUI_CORNFIELD_CAPS",
|
||||||
"ZMUI_NUKED_STARTLOC_CAPS",
|
"ZMUI_NUKED_STARTLOC_CAPS",
|
||||||
-- "ZMUI_GREEN_ROOFTOP_CAPS", -- TODO: add localized string, uncomment when location is added
|
-- "ZMUI_GREEN_ROOFTOP_CAPS", -- TODO: add localized string, uncomment when location is added
|
||||||
-- "ZMUI_BLUE_ROOFTOP_CAPS", -- TODO: add localized string, uncomment when location is added
|
-- "ZMUI_BLUE_ROOFTOP_CAPS", -- TODO: add localized string, uncomment when location is added
|
||||||
-- "ZMUI_BLUE_HIGHRISE_CAPS", -- TODO: add localized string, uncomment when location is added
|
-- "ZMUI_BLUE_HIGHRISE_CAPS", -- TODO: add localized string, uncomment when location is added
|
||||||
"ZMUI_CELLBLOCK_CAPS",
|
"ZMUI_CELLBLOCK_CAPS",
|
||||||
"ZMUI_DOCKS_CAPS",
|
"ZMUI_DOCKS_CAPS",
|
||||||
"ZMUI_STREET_LOC_CAPS",
|
"ZMUI_STREET_LOC_CAPS",
|
||||||
"ZMUI_MAZE_CAPS",
|
"ZMUI_MAZE_CAPS",
|
||||||
-- "ZMUI_TRENCHES_CAPS", -- TODO: add localized string, uncomment when location is added
|
-- "ZMUI_TRENCHES_CAPS", -- TODO: add localized string, uncomment when location is added
|
||||||
-- "ZMUI_EXCAVATION_SITE_CAPS", -- TODO: add localized string, uncomment when location is added
|
-- "ZMUI_EXCAVATION_SITE_CAPS", -- TODO: add localized string, uncomment when location is added
|
||||||
-- "ZMUI_CHURCH_CAPS", -- TODO: add localized string, uncomment when location is added
|
-- "ZMUI_CHURCH_CAPS", -- TODO: add localized string, uncomment when location is added
|
||||||
-- "ZMUI_CRAZY_PLACE_CAPS", -- TODO: add localized string, uncomment when location is added
|
-- "ZMUI_CRAZY_PLACE_CAPS", -- TODO: add localized string, uncomment when location is added
|
||||||
}
|
}
|
||||||
|
|
||||||
local function gameModeListFocusChangedEventHandler( self, event )
|
local function gameModeListFocusChangedEventHandler(self, event)
|
||||||
local focusedIndex = self.listBox:getFocussedIndex()
|
local focusedIndex = self.listBox:getFocussedIndex()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function gameModeListSelectionClickedEventHandler( self, event )
|
local function gameModeListSelectionClickedEventHandler(self, event)
|
||||||
local focusedIndex = self.listBox:getFocussedIndex()
|
local focusedIndex = self.listBox:getFocussedIndex()
|
||||||
|
|
||||||
local gameMode = GameModes[focusedIndex]
|
local gameMode = GameModes[focusedIndex]
|
||||||
@ -89,61 +89,61 @@ local function gameModeListSelectionClickedEventHandler( self, event )
|
|||||||
self:close()
|
self:close()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function gameModeListBackEventHandler( self, event )
|
local function gameModeListBackEventHandler(self, event)
|
||||||
CoD.Menu.ButtonPromptBack( self, event )
|
CoD.Menu.ButtonPromptBack(self, event)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function gameModeListCreateButtonMutables( controller, mutables )
|
local function gameModeListCreateButtonMutables(controller, mutables)
|
||||||
local text = LUI.UIText.new()
|
local text = LUI.UIText.new()
|
||||||
text:setLeftRight( true, false, 0, 0 )
|
text:setLeftRight(true, false, 0, 0)
|
||||||
text:setTopBottom( true, true, 0, 0 )
|
text:setTopBottom(true, true, 0, 0)
|
||||||
text:setRGB( 1, 1, 1 )
|
text:setRGB(1, 1, 1)
|
||||||
text:setAlpha( 1 )
|
text:setAlpha(1)
|
||||||
mutables:addElement( text )
|
mutables:addElement(text)
|
||||||
mutables.text = text
|
mutables.text = text
|
||||||
end
|
end
|
||||||
|
|
||||||
local function gameModeListGetButtonData( controller, index, mutables, self )
|
local function gameModeListGetButtonData(controller, index, mutables, self)
|
||||||
local gameMode = GameModes[index]
|
local gameMode = GameModes[index]
|
||||||
mutables.text:setText( Engine.Localize(gameMode) )
|
mutables.text:setText(Engine.Localize(gameMode))
|
||||||
end
|
end
|
||||||
|
|
||||||
function LUI.createMenu.SelectGameModeListZM( controller )
|
function LUI.createMenu.SelectGameModeListZM(controller)
|
||||||
local self = CoD.Menu.New( "SelectGameModeListZM" )
|
local self = CoD.Menu.New("SelectGameModeListZM")
|
||||||
self.controller = controller
|
self.controller = controller
|
||||||
|
|
||||||
if UIExpression.DvarBool(nil, "ui_game_lobby_open") == 1 then
|
if UIExpression.DvarBool(nil, "ui_game_lobby_open") == 1 then
|
||||||
self:setPreviousMenu( "PrivateOnlineGameLobby" )
|
self:setPreviousMenu("PrivateOnlineGameLobby")
|
||||||
else
|
else
|
||||||
self:setPreviousMenu( "MainLobby" )
|
self:setPreviousMenu("MainLobby")
|
||||||
end
|
end
|
||||||
|
|
||||||
self:registerEventHandler( "open_menu", CoD.Lobby.OpenMenu )
|
self:registerEventHandler("open_menu", CoD.Lobby.OpenMenu)
|
||||||
self:addSelectButton()
|
self:addSelectButton()
|
||||||
self:addBackButton()
|
self:addBackButton()
|
||||||
|
|
||||||
self:addTitle( Engine.Localize("MPUI_GAMEMODE_CAPS") )
|
self:addTitle(Engine.Localize("MPUI_GAMEMODE_CAPS"))
|
||||||
|
|
||||||
local listBox = CoD.ListBox.new( nil, controller, 15, CoD.CoD9Button.Height, 250, gameModeListCreateButtonMutables, gameModeListGetButtonData, 0, 0 )
|
local listBox = CoD.ListBox.new(nil, controller, 15, CoD.CoD9Button.Height, 250, gameModeListCreateButtonMutables, gameModeListGetButtonData, 0, 0)
|
||||||
listBox:setLeftRight( true, false, 0, 250 )
|
listBox:setLeftRight(true, false, 0, 250)
|
||||||
listBox:setTopBottom( true, false, 75, 75 + 530 )
|
listBox:setTopBottom(true, false, 75, 75 + 530)
|
||||||
listBox:addScrollBar( 530 + (8 * 12), 2 )
|
listBox:addScrollBar(530 + (8 * 12), 2)
|
||||||
listBox:setTotalItems( #GameModes )
|
listBox:setTotalItems(#GameModes)
|
||||||
self:addElement( listBox )
|
self:addElement(listBox)
|
||||||
self.listBox = listBox
|
self.listBox = listBox
|
||||||
|
|
||||||
self:registerEventHandler( "button_prompt_back", gameModeListBackEventHandler )
|
self:registerEventHandler("button_prompt_back", gameModeListBackEventHandler)
|
||||||
self:registerEventHandler( "listbox_focus_changed", gameModeListFocusChangedEventHandler )
|
self:registerEventHandler("listbox_focus_changed", gameModeListFocusChangedEventHandler)
|
||||||
self:registerEventHandler( "listbox_clicked", gameModeListSelectionClickedEventHandler )
|
self:registerEventHandler("listbox_clicked", gameModeListSelectionClickedEventHandler)
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
local function mapListFocusChangedEventHandler( self, event )
|
local function mapListFocusChangedEventHandler(self, event)
|
||||||
local focusedIndex = self.listBox:getFocussedIndex()
|
local focusedIndex = self.listBox:getFocussedIndex()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function mapListSelectionClickedEventHandler( self, event )
|
local function mapListSelectionClickedEventHandler(self, event)
|
||||||
local focusedIndex = self.listBox:getFocussedIndex()
|
local focusedIndex = self.listBox:getFocussedIndex()
|
||||||
|
|
||||||
local map = Maps[focusedIndex]
|
local map = Maps[focusedIndex]
|
||||||
@ -178,51 +178,51 @@ local function mapListSelectionClickedEventHandler( self, event )
|
|||||||
self:close()
|
self:close()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function mapListCreateButtonMutables( controller, mutables )
|
local function mapListCreateButtonMutables(controller, mutables)
|
||||||
local text = LUI.UIText.new()
|
local text = LUI.UIText.new()
|
||||||
text:setLeftRight( true, false, 0, 0 )
|
text:setLeftRight(true, false, 0, 0)
|
||||||
text:setTopBottom( true, true, 0, 0 )
|
text:setTopBottom(true, true, 0, 0)
|
||||||
text:setRGB( 1, 1, 1 )
|
text:setRGB(1, 1, 1)
|
||||||
text:setAlpha( 1 )
|
text:setAlpha(1)
|
||||||
mutables:addElement( text )
|
mutables:addElement(text)
|
||||||
mutables.text = text
|
mutables.text = text
|
||||||
end
|
end
|
||||||
|
|
||||||
local function mapListGetButtonData( controller, index, mutables, self )
|
local function mapListGetButtonData(controller, index, mutables, self)
|
||||||
local map = Maps[index]
|
local map = Maps[index]
|
||||||
mutables.text:setText( Engine.Localize(map) )
|
mutables.text:setText(Engine.Localize(map))
|
||||||
end
|
end
|
||||||
|
|
||||||
function LUI.createMenu.SelectMapListZM( controller )
|
function LUI.createMenu.SelectMapListZM(controller)
|
||||||
local self = CoD.Menu.New( "SelectMapListZM" )
|
local self = CoD.Menu.New("SelectMapListZM")
|
||||||
self.controller = controller
|
self.controller = controller
|
||||||
|
|
||||||
self:setPreviousMenu( "SelectGameModeListZM" )
|
self:setPreviousMenu("SelectGameModeListZM")
|
||||||
self:registerEventHandler( "open_menu", CoD.Lobby.OpenMenu )
|
self:registerEventHandler("open_menu", CoD.Lobby.OpenMenu)
|
||||||
self:addSelectButton()
|
self:addSelectButton()
|
||||||
self:addBackButton()
|
self:addBackButton()
|
||||||
|
|
||||||
self:addTitle( Engine.Localize("MPUI_MAPS_CAPS") )
|
self:addTitle(Engine.Localize("MPUI_MAPS_CAPS"))
|
||||||
|
|
||||||
local listBox = CoD.ListBox.new( nil, controller, 15, CoD.CoD9Button.Height, 250, mapListCreateButtonMutables, mapListGetButtonData, 0, 0 )
|
local listBox = CoD.ListBox.new(nil, controller, 15, CoD.CoD9Button.Height, 250, mapListCreateButtonMutables, mapListGetButtonData, 0, 0)
|
||||||
listBox:setLeftRight( true, false, 0, 250 )
|
listBox:setLeftRight(true, false, 0, 250)
|
||||||
listBox:setTopBottom( true, false, 75, 75 + 530 )
|
listBox:setTopBottom(true, false, 75, 75 + 530)
|
||||||
listBox:addScrollBar( 530 + (8 * 12), 2 )
|
listBox:addScrollBar(530 + (8 * 12), 2)
|
||||||
listBox:setTotalItems( #Maps )
|
listBox:setTotalItems(#Maps)
|
||||||
self:addElement( listBox )
|
self:addElement(listBox)
|
||||||
self.listBox = listBox
|
self.listBox = listBox
|
||||||
|
|
||||||
self:registerEventHandler( "listbox_focus_changed", mapListFocusChangedEventHandler )
|
self:registerEventHandler("listbox_focus_changed", mapListFocusChangedEventHandler)
|
||||||
self:registerEventHandler( "listbox_clicked", mapListSelectionClickedEventHandler )
|
self:registerEventHandler("listbox_clicked", mapListSelectionClickedEventHandler)
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
local function locationListFocusChangedEventHandler( self, event )
|
local function locationListFocusChangedEventHandler(self, event)
|
||||||
local focusedIndex = self.listBox:getFocussedIndex()
|
local focusedIndex = self.listBox:getFocussedIndex()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function locationListSelectionClickedEventHandler( self, event )
|
local function locationListSelectionClickedEventHandler(self, event)
|
||||||
local focusedIndex = self.listBox:getFocussedIndex()
|
local focusedIndex = self.listBox:getFocussedIndex()
|
||||||
|
|
||||||
local location = Locations[focusedIndex]
|
local location = Locations[focusedIndex]
|
||||||
@ -292,42 +292,42 @@ local function locationListSelectionClickedEventHandler( self, event )
|
|||||||
self:close()
|
self:close()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function locationListCreateButtonMutables( controller, mutables )
|
local function locationListCreateButtonMutables(controller, mutables)
|
||||||
local text = LUI.UIText.new()
|
local text = LUI.UIText.new()
|
||||||
text:setLeftRight( true, false, 0, 0 )
|
text:setLeftRight(true, false, 0, 0)
|
||||||
text:setTopBottom( true, true, 0, 0 )
|
text:setTopBottom(true, true, 0, 0)
|
||||||
text:setRGB( 1, 1, 1 )
|
text:setRGB(1, 1, 1)
|
||||||
text:setAlpha( 1 )
|
text:setAlpha(1)
|
||||||
mutables:addElement( text )
|
mutables:addElement(text)
|
||||||
mutables.text = text
|
mutables.text = text
|
||||||
end
|
end
|
||||||
|
|
||||||
local function locationListGetButtonData( controller, index, mutables, self )
|
local function locationListGetButtonData(controller, index, mutables, self)
|
||||||
local location = Locations[index]
|
local location = Locations[index]
|
||||||
mutables.text:setText( Engine.Localize(location) )
|
mutables.text:setText(Engine.Localize(location))
|
||||||
end
|
end
|
||||||
|
|
||||||
function LUI.createMenu.SelectLocationListZM( controller )
|
function LUI.createMenu.SelectLocationListZM(controller)
|
||||||
local self = CoD.Menu.New( "SelectLocationListZM" )
|
local self = CoD.Menu.New("SelectLocationListZM")
|
||||||
self.controller = controller
|
self.controller = controller
|
||||||
|
|
||||||
self:setPreviousMenu( "SelectGameModeListZM" )
|
self:setPreviousMenu("SelectGameModeListZM")
|
||||||
self:registerEventHandler( "open_menu", CoD.Lobby.OpenMenu )
|
self:registerEventHandler("open_menu", CoD.Lobby.OpenMenu)
|
||||||
self:addSelectButton()
|
self:addSelectButton()
|
||||||
self:addBackButton()
|
self:addBackButton()
|
||||||
|
|
||||||
self:addTitle( Engine.Localize("MPUI_MAPS_CAPS") )
|
self:addTitle(Engine.Localize("MPUI_MAPS_CAPS"))
|
||||||
|
|
||||||
local listBox = CoD.ListBox.new( nil, controller, 15, CoD.CoD9Button.Height, 250, locationListCreateButtonMutables, locationListGetButtonData, 0, 0 )
|
local listBox = CoD.ListBox.new(nil, controller, 15, CoD.CoD9Button.Height, 250, locationListCreateButtonMutables, locationListGetButtonData, 0, 0)
|
||||||
listBox:setLeftRight( true, false, 0, 250 )
|
listBox:setLeftRight(true, false, 0, 250)
|
||||||
listBox:setTopBottom( true, false, 75, 75 + 530 )
|
listBox:setTopBottom(true, false, 75, 75 + 530)
|
||||||
listBox:addScrollBar( 530 + (8 * 12), 2 )
|
listBox:addScrollBar(530 + (8 * 12), 2)
|
||||||
listBox:setTotalItems( #Locations )
|
listBox:setTotalItems(#Locations)
|
||||||
self:addElement( listBox )
|
self:addElement(listBox)
|
||||||
self.listBox = listBox
|
self.listBox = listBox
|
||||||
|
|
||||||
self:registerEventHandler( "listbox_focus_changed", locationListFocusChangedEventHandler )
|
self:registerEventHandler("listbox_focus_changed", locationListFocusChangedEventHandler)
|
||||||
self:registerEventHandler( "listbox_clicked", locationListSelectionClickedEventHandler )
|
self:registerEventHandler("listbox_clicked", locationListSelectionClickedEventHandler)
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
111
ui_mp/t6/hud.lua
111
ui_mp/t6/hud.lua
@ -68,10 +68,10 @@ if CoD.isWIIU then
|
|||||||
require("T6.WiiUSystemServices")
|
require("T6.WiiUSystemServices")
|
||||||
end
|
end
|
||||||
local HUD_OpenIngameMenu, HUD_SetupEventHandlers, HUD_KillcamUpdate, HUD_UpdateKillstreakHud, HUD_ForceKillKillstreakHud, HUD_SelectingLocationUpdate, HUD_GameEndedUpdate, HUD_ReloadShoutcasterHud, HUD_UpdateVehicleHud, HUD_FactionPopup, FactionPopupAddTextEvent, f0_local11, f0_local12 = nil
|
local HUD_OpenIngameMenu, HUD_SetupEventHandlers, HUD_KillcamUpdate, HUD_UpdateKillstreakHud, HUD_ForceKillKillstreakHud, HUD_SelectingLocationUpdate, HUD_GameEndedUpdate, HUD_ReloadShoutcasterHud, HUD_UpdateVehicleHud, HUD_FactionPopup, FactionPopupAddTextEvent, f0_local11, f0_local12 = nil
|
||||||
function HUD_IngameMenuClosed()
|
|
||||||
end
|
|
||||||
|
|
||||||
LUI.createMenu.HUD = function (LocalClientIndex)
|
function HUD_IngameMenuClosed() end
|
||||||
|
|
||||||
|
LUI.createMenu.HUD = function(LocalClientIndex)
|
||||||
local HUDWidget = CoD.Menu.NewFromState("HUD", {
|
local HUDWidget = CoD.Menu.NewFromState("HUD", {
|
||||||
leftAnchor = true,
|
leftAnchor = true,
|
||||||
rightAnchor = true,
|
rightAnchor = true,
|
||||||
@ -80,7 +80,7 @@ LUI.createMenu.HUD = function (LocalClientIndex)
|
|||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
top = 0,
|
top = 0,
|
||||||
bottom = 0
|
bottom = 0,
|
||||||
})
|
})
|
||||||
if not LUI.roots.UIRootFull.safeAreaOverlay then
|
if not LUI.roots.UIRootFull.safeAreaOverlay then
|
||||||
LUI.roots.UIRootFull.safeAreaOverlay = CoD.SetupSafeAreaOverlay()
|
LUI.roots.UIRootFull.safeAreaOverlay = CoD.SetupSafeAreaOverlay()
|
||||||
@ -116,7 +116,7 @@ function HUD_OcclusionChange(HUDWidget, ClientInstance)
|
|||||||
Engine.EnableWiiURemotePointer(ClientInstance.controller, not ClientInstance.occluded)
|
Engine.EnableWiiURemotePointer(ClientInstance.controller, not ClientInstance.occluded)
|
||||||
end
|
end
|
||||||
|
|
||||||
HUD_SetupEventHandlers = function (HUDWidget)
|
HUD_SetupEventHandlers = function(HUDWidget)
|
||||||
HUD_SetupEventHandlers_Common(HUDWidget)
|
HUD_SetupEventHandlers_Common(HUDWidget)
|
||||||
if CoD.isZombie == false then
|
if CoD.isZombie == false then
|
||||||
HUD_SetupEventHandlers_Multiplayer(HUDWidget)
|
HUD_SetupEventHandlers_Multiplayer(HUDWidget)
|
||||||
@ -133,22 +133,22 @@ function HUD_Show(HUDWidget, ClientInstance)
|
|||||||
HUDWidget:setAlpha(1)
|
HUDWidget:setAlpha(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
local WiiToggleFriends = function (HUDWidget, ClientInstance)
|
local WiiToggleFriends = function(HUDWidget, ClientInstance)
|
||||||
if LUI.roots["UIRoot" .. ClientInstance.controller].ingameFriendsList then
|
if LUI.roots["UIRoot" .. ClientInstance.controller].ingameFriendsList then
|
||||||
LUI.roots[rootName]:processEvent({
|
LUI.roots[rootName]:processEvent({
|
||||||
name = "closeFriendsList",
|
name = "closeFriendsList",
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
})
|
})
|
||||||
LUI.roots[rootName]:processEvent({
|
LUI.roots[rootName]:processEvent({
|
||||||
name = "closeallpopups",
|
name = "closeallpopups",
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
HUDWidget:openPopup("FriendsList", ClientInstance.controller)
|
HUDWidget:openPopup("FriendsList", ClientInstance.controller)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local PCInputSourceChanged = function (HUDWidget, ClientInstance)
|
local PCInputSourceChanged = function(HUDWidget, ClientInstance)
|
||||||
if HUDWidget.scoreBoard then
|
if HUDWidget.scoreBoard then
|
||||||
HUDWidget.scoreBoard:processEvent(ClientInstance)
|
HUDWidget.scoreBoard:processEvent(ClientInstance)
|
||||||
end
|
end
|
||||||
@ -224,7 +224,7 @@ end
|
|||||||
function HUD_FirstSnapshot(HUDWidget, ClientInstance)
|
function HUD_FirstSnapshot(HUDWidget, ClientInstance)
|
||||||
HUDWidget:dispatchEventToChildren({
|
HUDWidget:dispatchEventToChildren({
|
||||||
name = "close_all_popups",
|
name = "close_all_popups",
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
})
|
})
|
||||||
HUDWidget:removeAllChildren()
|
HUDWidget:removeAllChildren()
|
||||||
HUDWidget:setOwner(ClientInstance.controller)
|
HUDWidget:setOwner(ClientInstance.controller)
|
||||||
@ -266,7 +266,7 @@ function HUD_FirstSnapshot_Common(HUDWidget, ClientInstance)
|
|||||||
HUDWidget.scoreBoard = LUI.createMenu.Scoreboard(ClientInstance.controller)
|
HUDWidget.scoreBoard = LUI.createMenu.Scoreboard(ClientInstance.controller)
|
||||||
HUDWidget.scoreboardUpdateTimer = LUI.UITimer.new(1000, {
|
HUDWidget.scoreboardUpdateTimer = LUI.UITimer.new(1000, {
|
||||||
name = "update_scoreboard",
|
name = "update_scoreboard",
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
}, false)
|
}, false)
|
||||||
HUDWidget:addElement(LUI.createMenu.DeadSpectate(ClientInstance.controller))
|
HUDWidget:addElement(LUI.createMenu.DeadSpectate(ClientInstance.controller))
|
||||||
end
|
end
|
||||||
@ -294,7 +294,7 @@ function HUD_FirstSnapshot_Multiplayer(HUDWidget, ClientInstance)
|
|||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
top = 0,
|
top = 0,
|
||||||
bottom = 0
|
bottom = 0,
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
f18_local2 = CoD.ScorePopup.new({
|
f18_local2 = CoD.ScorePopup.new({
|
||||||
@ -305,7 +305,7 @@ function HUD_FirstSnapshot_Multiplayer(HUDWidget, ClientInstance)
|
|||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
top = 0,
|
top = 0,
|
||||||
bottom = 0
|
bottom = 0,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
HUDWidget:addElement(f18_local2)
|
HUDWidget:addElement(f18_local2)
|
||||||
@ -325,7 +325,7 @@ function HUD_FirstSnapshot_Multiplayer(HUDWidget, ClientInstance)
|
|||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
top = -249,
|
top = -249,
|
||||||
bottom = -149
|
bottom = -149,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
CoD.GameMessages.BoldGameMessagesWindow(HUDWidget, {
|
CoD.GameMessages.BoldGameMessagesWindow(HUDWidget, {
|
||||||
@ -336,7 +336,7 @@ function HUD_FirstSnapshot_Multiplayer(HUDWidget, ClientInstance)
|
|||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
top = 50,
|
top = 50,
|
||||||
bottom = 70
|
bottom = 70,
|
||||||
})
|
})
|
||||||
if Engine.GameModeIsMode(CoD.GAMEMODE_LOCAL_SPLITSCREEN) == false then
|
if Engine.GameModeIsMode(CoD.GAMEMODE_LOCAL_SPLITSCREEN) == false then
|
||||||
CoD.LiveStream.AddInGameStatusWidget(HUDWidget, ClientInstance.controller, {
|
CoD.LiveStream.AddInGameStatusWidget(HUDWidget, ClientInstance.controller, {
|
||||||
@ -347,7 +347,7 @@ function HUD_FirstSnapshot_Multiplayer(HUDWidget, ClientInstance)
|
|||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
top = 0,
|
top = 0,
|
||||||
bottom = 150
|
bottom = 150,
|
||||||
})
|
})
|
||||||
CoD.DemoHUD.AddHUDWidgets(HUDWidget, ClientInstance)
|
CoD.DemoHUD.AddHUDWidgets(HUDWidget, ClientInstance)
|
||||||
end
|
end
|
||||||
@ -423,7 +423,7 @@ function HUD_FirstSnapshot_Zombie(HUDWidget, ClientInstance)
|
|||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
bottom = 0,
|
bottom = 0,
|
||||||
top = 0,
|
top = 0,
|
||||||
ui3DWindow = 0
|
ui3DWindow = 0,
|
||||||
}))
|
}))
|
||||||
end
|
end
|
||||||
if not Engine.IsSplitscreen() then
|
if not Engine.IsSplitscreen() then
|
||||||
@ -435,7 +435,7 @@ function HUD_FirstSnapshot_Zombie(HUDWidget, ClientInstance)
|
|||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
top = -320,
|
top = -320,
|
||||||
bottom = -220
|
bottom = -220,
|
||||||
})
|
})
|
||||||
CoD.GameMessages.BoldGameMessagesWindow(HUDWidget, {
|
CoD.GameMessages.BoldGameMessagesWindow(HUDWidget, {
|
||||||
leftAnchor = false,
|
leftAnchor = false,
|
||||||
@ -445,7 +445,7 @@ function HUD_FirstSnapshot_Zombie(HUDWidget, ClientInstance)
|
|||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
top = 50,
|
top = 50,
|
||||||
bottom = 70
|
bottom = 70,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
if Engine.GameModeIsMode(CoD.GAMEMODE_LOCAL_SPLITSCREEN) == false then
|
if Engine.GameModeIsMode(CoD.GAMEMODE_LOCAL_SPLITSCREEN) == false then
|
||||||
@ -466,7 +466,7 @@ function HUD_ToggleZombieHudContainer(HUDWidget, ClientInstance)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
HUD_OpenIngameMenu = function (HUDWidget, ClientInstance)
|
HUD_OpenIngameMenu = function(HUDWidget, ClientInstance)
|
||||||
if HUDWidget.m_inputDisabled then
|
if HUDWidget.m_inputDisabled then
|
||||||
return
|
return
|
||||||
elseif ClientInstance.menuName == "class" and Engine.IsMigrating(ClientInstance.controller) == true then
|
elseif ClientInstance.menuName == "class" and Engine.IsMigrating(ClientInstance.controller) == true then
|
||||||
@ -493,7 +493,7 @@ HUD_OpenIngameMenu = function (HUDWidget, ClientInstance)
|
|||||||
end
|
end
|
||||||
if HUDWidget.SpectateHUD ~= nil then
|
if HUDWidget.SpectateHUD ~= nil then
|
||||||
HUDWidget.SpectateHUD:processEvent({
|
HUDWidget.SpectateHUD:processEvent({
|
||||||
name = "spectate_ingame_menu_opened"
|
name = "spectate_ingame_menu_opened",
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -507,7 +507,7 @@ function HUD_CloseInGameMenu(HUDWidget, ClientInstance)
|
|||||||
end
|
end
|
||||||
if HUDWidget.SpectateHUD ~= nil then
|
if HUDWidget.SpectateHUD ~= nil then
|
||||||
HUDWidget.SpectateHUD:processEvent({
|
HUDWidget.SpectateHUD:processEvent({
|
||||||
name = "spectate_ingame_menu_closed"
|
name = "spectate_ingame_menu_closed",
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
if CoD.isZombie == true then
|
if CoD.isZombie == true then
|
||||||
@ -522,44 +522,44 @@ function HUD_OpenScoreBoard(HUDWidget, ClientInstance)
|
|||||||
HUDWidget:addElement(HUDWidget.scoreBoard)
|
HUDWidget:addElement(HUDWidget.scoreBoard)
|
||||||
HUDWidget.scoreBoard:processEvent({
|
HUDWidget.scoreBoard:processEvent({
|
||||||
name = "update_scoreboard",
|
name = "update_scoreboard",
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
})
|
})
|
||||||
HUDWidget:addElement(HUDWidget.scoreboardUpdateTimer)
|
HUDWidget:addElement(HUDWidget.scoreboardUpdateTimer)
|
||||||
if CoD.isZombie == true then
|
if CoD.isZombie == true then
|
||||||
if HUDWidget.scoreBoard.questItemDisplay then
|
if HUDWidget.scoreBoard.questItemDisplay then
|
||||||
HUDWidget.scoreBoard.questItemDisplay:processEvent({
|
HUDWidget.scoreBoard.questItemDisplay:processEvent({
|
||||||
name = "update_quest_item_display_scoreboard",
|
name = "update_quest_item_display_scoreboard",
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
if HUDWidget.scoreBoard.persistentItemDisplay then
|
if HUDWidget.scoreBoard.persistentItemDisplay then
|
||||||
HUDWidget.scoreBoard.persistentItemDisplay:processEvent({
|
HUDWidget.scoreBoard.persistentItemDisplay:processEvent({
|
||||||
name = "update_persistent_item_display_scoreboard",
|
name = "update_persistent_item_display_scoreboard",
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
if HUDWidget.scoreBoard.craftableItemDisplay then
|
if HUDWidget.scoreBoard.craftableItemDisplay then
|
||||||
HUDWidget.scoreBoard.craftableItemDisplay:processEvent({
|
HUDWidget.scoreBoard.craftableItemDisplay:processEvent({
|
||||||
name = "update_craftable_item_display_scoreboard",
|
name = "update_craftable_item_display_scoreboard",
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
if HUDWidget.scoreBoard.captureZoneWheelDisplay then
|
if HUDWidget.scoreBoard.captureZoneWheelDisplay then
|
||||||
HUDWidget.scoreBoard.captureZoneWheelDisplay:processEvent({
|
HUDWidget.scoreBoard.captureZoneWheelDisplay:processEvent({
|
||||||
name = "update_capture_zone_wheel_display_scoreboard",
|
name = "update_capture_zone_wheel_display_scoreboard",
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if HUDWidget.SpectateHUD ~= nil then
|
if HUDWidget.SpectateHUD ~= nil then
|
||||||
HUDWidget.SpectateHUD:processEvent({
|
HUDWidget.SpectateHUD:processEvent({
|
||||||
name = "spectate_scoreboard_opened"
|
name = "spectate_scoreboard_opened",
|
||||||
})
|
})
|
||||||
if HUDWidget.SpectateHUD.m_selectedClientNum ~= nil then
|
if HUDWidget.SpectateHUD.m_selectedClientNum ~= nil then
|
||||||
HUDWidget.scoreBoard:processEvent({
|
HUDWidget.scoreBoard:processEvent({
|
||||||
name = "focus_client",
|
name = "focus_client",
|
||||||
controller = ClientInstance.controller,
|
controller = ClientInstance.controller,
|
||||||
clientNum = HUDWidget.SpectateHUD.m_selectedClientNum
|
clientNum = HUDWidget.SpectateHUD.m_selectedClientNum,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -573,7 +573,7 @@ function HUD_CloseScoreBoard(HUDWidget, ClientInstance)
|
|||||||
HUDWidget.scoreboardUpdateTimer:reset()
|
HUDWidget.scoreboardUpdateTimer:reset()
|
||||||
if HUDWidget.SpectateHUD ~= nil then
|
if HUDWidget.SpectateHUD ~= nil then
|
||||||
HUDWidget.SpectateHUD:processEvent({
|
HUDWidget.SpectateHUD:processEvent({
|
||||||
name = "spectate_scoreboard_closed"
|
name = "spectate_scoreboard_closed",
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -583,7 +583,7 @@ function HUD_DebugReload(HUDWidget, ClientInstance)
|
|||||||
if HUDWidget.m_eventHandlers.debug_reload ~= HUD_DebugReload then
|
if HUDWidget.m_eventHandlers.debug_reload ~= HUD_DebugReload then
|
||||||
HUDWidget:registerEventHandler("debug_reload", HUD_DebugReload)
|
HUDWidget:registerEventHandler("debug_reload", HUD_DebugReload)
|
||||||
HUDWidget:processEvent({
|
HUDWidget:processEvent({
|
||||||
name = "debug_reload"
|
name = "debug_reload",
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
@ -592,7 +592,7 @@ function HUD_DebugReload(HUDWidget, ClientInstance)
|
|||||||
HUDWidget.reaperHUD = nil
|
HUDWidget.reaperHUD = nil
|
||||||
HUD_SetupEventHandlers(HUDWidget)
|
HUD_SetupEventHandlers(HUDWidget)
|
||||||
HUD_FirstSnapshot(HUDWidget, {
|
HUD_FirstSnapshot(HUDWidget, {
|
||||||
controller = HUDWidget.controller
|
controller = HUDWidget.controller,
|
||||||
})
|
})
|
||||||
Engine.ForceHUDRefresh(HUDWidget.controller)
|
Engine.ForceHUDRefresh(HUDWidget.controller)
|
||||||
end
|
end
|
||||||
@ -621,7 +621,7 @@ function HUD_StartKillcamHud(HUDWidget, ClientInstance)
|
|||||||
if f29_local0 then
|
if f29_local0 then
|
||||||
f29_local0:processEvent({
|
f29_local0:processEvent({
|
||||||
name = "killcam_open",
|
name = "killcam_open",
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -635,13 +635,13 @@ function HUD_StopKillcamHud(HUDWidget, ClientInstance)
|
|||||||
if f30_local0 then
|
if f30_local0 then
|
||||||
f30_local0:processEvent({
|
f30_local0:processEvent({
|
||||||
name = "killcam_close",
|
name = "killcam_close",
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
HUD_KillcamUpdate = function (HUDWidget, ClientInstance)
|
HUD_KillcamUpdate = function(HUDWidget, ClientInstance)
|
||||||
if UIExpression.IsVisibilityBitSet(ClientInstance.controller, CoD.BIT_IN_KILLCAM) == 1 then
|
if UIExpression.IsVisibilityBitSet(ClientInstance.controller, CoD.BIT_IN_KILLCAM) == 1 then
|
||||||
if HUDWidget.killcamHUD then
|
if HUDWidget.killcamHUD then
|
||||||
if HUDWidget.killcamHUD.isFinalKillcam ~= UIExpression.IsVisibilityBitSet(ClientInstance.controller, CoD.BIT_FINAL_KILLCAM) then
|
if HUDWidget.killcamHUD.isFinalKillcam ~= UIExpression.IsVisibilityBitSet(ClientInstance.controller, CoD.BIT_FINAL_KILLCAM) then
|
||||||
@ -657,7 +657,7 @@ HUD_KillcamUpdate = function (HUDWidget, ClientInstance)
|
|||||||
HUDWidget:dispatchEventToChildren(ClientInstance)
|
HUDWidget:dispatchEventToChildren(ClientInstance)
|
||||||
end
|
end
|
||||||
|
|
||||||
local f0_local18 = function (f32_arg0)
|
local f0_local18 = function(f32_arg0)
|
||||||
local f32_local0
|
local f32_local0
|
||||||
if Engine.IsSplitscreen() ~= false or Engine.IsDemoShoutcaster() ~= true and (UIExpression.IsVisibilityBitSet(f32_arg0, CoD.BIT_SPECTATING_CLIENT) ~= 1 or UIExpression.IsVisibilityBitSet(f32_arg0, CoD.BIT_TEAM_SPECTATOR) ~= 1 or UIExpression.IsVisibilityBitSet(f32_arg0, CoD.BIT_GAME_ENDED) ~= 0 or UIExpression.IsVisibilityBitSet(f32_arg0, CoD.BIT_UI_ACTIVE) ~= 0) then
|
if Engine.IsSplitscreen() ~= false or Engine.IsDemoShoutcaster() ~= true and (UIExpression.IsVisibilityBitSet(f32_arg0, CoD.BIT_SPECTATING_CLIENT) ~= 1 or UIExpression.IsVisibilityBitSet(f32_arg0, CoD.BIT_TEAM_SPECTATOR) ~= 1 or UIExpression.IsVisibilityBitSet(f32_arg0, CoD.BIT_GAME_ENDED) ~= 0 or UIExpression.IsVisibilityBitSet(f32_arg0, CoD.BIT_UI_ACTIVE) ~= 0) then
|
||||||
f32_local0 = false
|
f32_local0 = false
|
||||||
@ -667,7 +667,7 @@ local f0_local18 = function (f32_arg0)
|
|||||||
return f32_local0
|
return f32_local0
|
||||||
end
|
end
|
||||||
|
|
||||||
HUD_GameEndedUpdate = function (HUDWidget, ClientInstance)
|
HUD_GameEndedUpdate = function(HUDWidget, ClientInstance)
|
||||||
if f0_local18(ClientInstance.controller) then
|
if f0_local18(ClientInstance.controller) then
|
||||||
if HUDWidget.SpectateHUD == nil then
|
if HUDWidget.SpectateHUD == nil then
|
||||||
local f33_local0 = CoD.SpectateHUD.new(ClientInstance)
|
local f33_local0 = CoD.SpectateHUD.new(ClientInstance)
|
||||||
@ -683,7 +683,7 @@ HUD_GameEndedUpdate = function (HUDWidget, ClientInstance)
|
|||||||
HUDWidget:dispatchEventToChildren(ClientInstance)
|
HUDWidget:dispatchEventToChildren(ClientInstance)
|
||||||
end
|
end
|
||||||
|
|
||||||
HUD_ReloadShoutcasterHud = function (HUDWidget, ClientInstance)
|
HUD_ReloadShoutcasterHud = function(HUDWidget, ClientInstance)
|
||||||
if HUDWidget.SpectateHUD ~= nil then
|
if HUDWidget.SpectateHUD ~= nil then
|
||||||
HUDWidget.SpectateHUD:close()
|
HUDWidget.SpectateHUD:close()
|
||||||
HUDWidget.SpectateHUD = nil
|
HUDWidget.SpectateHUD = nil
|
||||||
@ -691,7 +691,7 @@ HUD_ReloadShoutcasterHud = function (HUDWidget, ClientInstance)
|
|||||||
HUD_GameEndedUpdate(HUDWidget, ClientInstance)
|
HUD_GameEndedUpdate(HUDWidget, ClientInstance)
|
||||||
end
|
end
|
||||||
|
|
||||||
local f0_local19 = function (f35_arg0)
|
local f0_local19 = function(f35_arg0)
|
||||||
local f35_local0
|
local f35_local0
|
||||||
if UIExpression.IsVisibilityBitSet(f35_arg0, CoD.BIT_SELECTING_LOCATION) ~= 1 or UIExpression.IsVisibilityBitSet(f35_arg0, CoD.BIT_SPECTATING_CLIENT) ~= 0 or UIExpression.IsVisibilityBitSet(f35_arg0, CoD.BIT_IS_DEMO_PLAYING) ~= 0 or UIExpression.IsVisibilityBitSet(f35_arg0, CoD.BIT_SCOREBOARD_OPEN) ~= 0 then
|
if UIExpression.IsVisibilityBitSet(f35_arg0, CoD.BIT_SELECTING_LOCATION) ~= 1 or UIExpression.IsVisibilityBitSet(f35_arg0, CoD.BIT_SPECTATING_CLIENT) ~= 0 or UIExpression.IsVisibilityBitSet(f35_arg0, CoD.BIT_IS_DEMO_PLAYING) ~= 0 or UIExpression.IsVisibilityBitSet(f35_arg0, CoD.BIT_SCOREBOARD_OPEN) ~= 0 then
|
||||||
f35_local0 = false
|
f35_local0 = false
|
||||||
@ -701,7 +701,7 @@ local f0_local19 = function (f35_arg0)
|
|||||||
return f35_local0
|
return f35_local0
|
||||||
end
|
end
|
||||||
|
|
||||||
HUD_SelectingLocationUpdate = function (HUDWidget, ClientInstance)
|
HUD_SelectingLocationUpdate = function(HUDWidget, ClientInstance)
|
||||||
if f0_local19(ClientInstance.controller) then
|
if f0_local19(ClientInstance.controller) then
|
||||||
if HUDWidget.locationSelectorMap == nil then
|
if HUDWidget.locationSelectorMap == nil then
|
||||||
if HUDWidget.selectorContainer == nil then
|
if HUDWidget.selectorContainer == nil then
|
||||||
@ -718,7 +718,7 @@ HUD_SelectingLocationUpdate = function (HUDWidget, ClientInstance)
|
|||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
top = -275,
|
top = -275,
|
||||||
bottom = 275
|
bottom = 275,
|
||||||
}, CoD.COMPASS_TYPE_FULL)
|
}, CoD.COMPASS_TYPE_FULL)
|
||||||
HUDWidget.selectorContainer:addElement(HUDWidget.locationSelectorMap)
|
HUDWidget.selectorContainer:addElement(HUDWidget.locationSelectorMap)
|
||||||
Engine.BlurWorld(ClientInstance.controller, 2)
|
Engine.BlurWorld(ClientInstance.controller, 2)
|
||||||
@ -733,13 +733,12 @@ HUD_SelectingLocationUpdate = function (HUDWidget, ClientInstance)
|
|||||||
HUDWidget:dispatchEventToChildren(ClientInstance)
|
HUDWidget:dispatchEventToChildren(ClientInstance)
|
||||||
end
|
end
|
||||||
|
|
||||||
HUD_UpdateKillstreakHud = function (HUDWidget, ClientInstance)
|
HUD_UpdateKillstreakHud = function(HUDWidget, ClientInstance)
|
||||||
if ClientInstance.chopperGunner == true then
|
if ClientInstance.chopperGunner == true then
|
||||||
if HUDWidget.chopperGunnerHUD == nil then
|
if HUDWidget.chopperGunnerHUD == nil then
|
||||||
local predatorHUD = CoD.ChopperGunnerHUD.new(ClientInstance.controller)
|
local predatorHUD = CoD.ChopperGunnerHUD.new(ClientInstance.controller)
|
||||||
HUDWidget:addElement(predatorHUD)
|
HUDWidget:addElement(predatorHUD)
|
||||||
HUDWidget.chopperGunnerHUD = predatorHUD
|
HUDWidget.chopperGunnerHUD = predatorHUD
|
||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
HUDWidget.chopperGunnerHUD = nil
|
HUDWidget.chopperGunnerHUD = nil
|
||||||
@ -749,7 +748,6 @@ HUD_UpdateKillstreakHud = function (HUDWidget, ClientInstance)
|
|||||||
local predatorHUD = CoD.ReaperHUD.new(ClientInstance.controller)
|
local predatorHUD = CoD.ReaperHUD.new(ClientInstance.controller)
|
||||||
HUDWidget:addElement(predatorHUD)
|
HUDWidget:addElement(predatorHUD)
|
||||||
HUDWidget.reaperHUD = predatorHUD
|
HUDWidget.reaperHUD = predatorHUD
|
||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
HUDWidget.reaperHUD = nil
|
HUDWidget.reaperHUD = nil
|
||||||
@ -759,7 +757,6 @@ HUD_UpdateKillstreakHud = function (HUDWidget, ClientInstance)
|
|||||||
local predatorHUD = CoD.PredatorHUD.new(ClientInstance.controller)
|
local predatorHUD = CoD.PredatorHUD.new(ClientInstance.controller)
|
||||||
HUDWidget:addElement(predatorHUD)
|
HUDWidget:addElement(predatorHUD)
|
||||||
HUDWidget.predatorHUD = predatorHUD
|
HUDWidget.predatorHUD = predatorHUD
|
||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
HUDWidget.predatorHUD = nil
|
HUDWidget.predatorHUD = nil
|
||||||
@ -767,11 +764,11 @@ HUD_UpdateKillstreakHud = function (HUDWidget, ClientInstance)
|
|||||||
HUDWidget:dispatchEventToChildren(ClientInstance)
|
HUDWidget:dispatchEventToChildren(ClientInstance)
|
||||||
end
|
end
|
||||||
|
|
||||||
HUD_ForceKillKillstreakHud = function (HUDWidget, ClientInstance)
|
HUD_ForceKillKillstreakHud = function(HUDWidget, ClientInstance)
|
||||||
Engine.DisableSceneFilter(HUDWidget:getOwner(), 4)
|
Engine.DisableSceneFilter(HUDWidget:getOwner(), 4)
|
||||||
end
|
end
|
||||||
|
|
||||||
HUD_UpdateVehicleHud = function (HUDWidget, ClientInstance)
|
HUD_UpdateVehicleHud = function(HUDWidget, ClientInstance)
|
||||||
if HUDWidget.vehicleHUD then
|
if HUDWidget.vehicleHUD then
|
||||||
if HUDWidget.vehicleHUD.vehicleType == ClientInstance.vehicleType then
|
if HUDWidget.vehicleHUD.vehicleType == ClientInstance.vehicleType then
|
||||||
return
|
return
|
||||||
@ -792,7 +789,7 @@ HUD_UpdateVehicleHud = function (HUDWidget, ClientInstance)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
HUD_FactionPopup = function (HUDWidget, ClientInstance)
|
HUD_FactionPopup = function(HUDWidget, ClientInstance)
|
||||||
local f40_local0 = UIExpression.Team(ClientInstance.controller, "name")
|
local f40_local0 = UIExpression.Team(ClientInstance.controller, "name")
|
||||||
local f40_local1, f40_local2, f40_local3, f40_local4, f40_local5 = nil
|
local f40_local1, f40_local2, f40_local3, f40_local4, f40_local5 = nil
|
||||||
if f40_local0 == "TEAM_ALLIES" then
|
if f40_local0 == "TEAM_ALLIES" then
|
||||||
@ -820,7 +817,7 @@ HUD_FactionPopup = function (HUDWidget, ClientInstance)
|
|||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
top = 0,
|
top = 0,
|
||||||
bottom = 0
|
bottom = 0,
|
||||||
})
|
})
|
||||||
HUDWidget.safeArea:addElement(Widget)
|
HUDWidget.safeArea:addElement(Widget)
|
||||||
|
|
||||||
@ -841,7 +838,7 @@ HUD_FactionPopup = function (HUDWidget, ClientInstance)
|
|||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
top = f40_local6,
|
top = f40_local6,
|
||||||
bottom = f40_local6 + f40_local10
|
bottom = f40_local6 + f40_local10,
|
||||||
})
|
})
|
||||||
Widget.text.label:setRGB(CoD.offWhite.r, CoD.offWhite.g, CoD.offWhite.b)
|
Widget.text.label:setRGB(CoD.offWhite.r, CoD.offWhite.g, CoD.offWhite.b)
|
||||||
Widget.image = LUI.UIImage.new({
|
Widget.image = LUI.UIImage.new({
|
||||||
@ -853,7 +850,7 @@ HUD_FactionPopup = function (HUDWidget, ClientInstance)
|
|||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
top = f40_local7,
|
top = f40_local7,
|
||||||
bottom = f40_local7 + f40_local6,
|
bottom = f40_local7 + f40_local6,
|
||||||
material = f40_local1
|
material = f40_local1,
|
||||||
})
|
})
|
||||||
Widget:addElement(Widget.image)
|
Widget:addElement(Widget.image)
|
||||||
local f40_local11 = f40_local6 + f40_local10
|
local f40_local11 = f40_local6 + f40_local10
|
||||||
@ -866,7 +863,7 @@ HUD_FactionPopup = function (HUDWidget, ClientInstance)
|
|||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
top = 0,
|
top = 0,
|
||||||
bottom = f40_local6
|
bottom = f40_local6,
|
||||||
})
|
})
|
||||||
Widget:addElement(Widget.imageGlow)
|
Widget:addElement(Widget.imageGlow)
|
||||||
Widget:registerEventHandler("add_text", FactionPopupAddTextEvent)
|
Widget:registerEventHandler("add_text", FactionPopupAddTextEvent)
|
||||||
@ -876,17 +873,17 @@ HUD_FactionPopup = function (HUDWidget, ClientInstance)
|
|||||||
Widget:addElement(LUI.UITimer.new(2000, "out", true))
|
Widget:addElement(LUI.UITimer.new(2000, "out", true))
|
||||||
end
|
end
|
||||||
|
|
||||||
FactionPopupAddTextEvent = function (HUDWidget, ClientInstance)
|
FactionPopupAddTextEvent = function(HUDWidget, ClientInstance)
|
||||||
HUDWidget:addElement(HUDWidget.text)
|
HUDWidget:addElement(HUDWidget.text)
|
||||||
end
|
end
|
||||||
|
|
||||||
f0_local11 = function (HUDWidget, ClientInstance)
|
f0_local11 = function(HUDWidget, ClientInstance)
|
||||||
HUDWidget.text:out()
|
HUDWidget.text:out()
|
||||||
HUDWidget:addElement(LUI.UITimer.new(CoD.AdditiveTextOverlay.PulseOutTime, "out2", true))
|
HUDWidget:addElement(LUI.UITimer.new(CoD.AdditiveTextOverlay.PulseOutTime, "out2", true))
|
||||||
HUDWidget:addElement(LUI.UITimer.new(CoD.AdditiveTextOverlay.PulseOutTime * 2, "close", true))
|
HUDWidget:addElement(LUI.UITimer.new(CoD.AdditiveTextOverlay.PulseOutTime * 2, "close", true))
|
||||||
end
|
end
|
||||||
|
|
||||||
f0_local12 = function (HUDWidget, ClientInstance)
|
f0_local12 = function(HUDWidget, ClientInstance)
|
||||||
HUDWidget.imageGlow:out()
|
HUDWidget.imageGlow:out()
|
||||||
HUDWidget.image:close()
|
HUDWidget.image:close()
|
||||||
HUDWidget.darkSplash:close()
|
HUDWidget.darkSplash:close()
|
||||||
@ -909,10 +906,10 @@ function HUD_Handle_ChooseClass_HotKey(HUDWidget, ClientInstance)
|
|||||||
if UIExpression.Team(ClientInstance.controller, "name") ~= "TEAM_SPECTATOR" and CoD.IsWagerMode() == false and not (Engine.GetGametypeSetting("disableClassSelection") == 1) then
|
if UIExpression.Team(ClientInstance.controller, "name") ~= "TEAM_SPECTATOR" and CoD.IsWagerMode() == false and not (Engine.GetGametypeSetting("disableClassSelection") == 1) then
|
||||||
HUD_OpenIngameMenu(HUDWidget, {
|
HUD_OpenIngameMenu(HUDWidget, {
|
||||||
menuName = "changeclass",
|
menuName = "changeclass",
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
DisableGlobals()
|
DisableGlobals()
|
||||||
Engine.StopEditingPresetClass()
|
Engine.StopEditingPresetClass()
|
||||||
|
@ -2,13 +2,13 @@ CoD.AmmoCounter = {}
|
|||||||
CoD.AmmoCounter.TextHeight = 28
|
CoD.AmmoCounter.TextHeight = 28
|
||||||
CoD.AmmoCounter.LowAmmoFadeTime = 500
|
CoD.AmmoCounter.LowAmmoFadeTime = 500
|
||||||
CoD.AmmoCounter.PulseDuration = 500
|
CoD.AmmoCounter.PulseDuration = 500
|
||||||
CoD.AmmoCounter.new = function (f1_arg0)
|
CoD.AmmoCounter.new = function(f1_arg0)
|
||||||
local Widget = LUI.UIElement.new(f1_arg0)
|
local Widget = LUI.UIElement.new(f1_arg0)
|
||||||
Widget:registerAnimationState("hide", {
|
Widget:registerAnimationState("hide", {
|
||||||
alphaMultiplier = 0
|
alphaMultiplier = 0,
|
||||||
})
|
})
|
||||||
Widget:registerAnimationState("show", {
|
Widget:registerAnimationState("show", {
|
||||||
alphaMultiplier = 1
|
alphaMultiplier = 1,
|
||||||
})
|
})
|
||||||
Widget:animateToState("hide")
|
Widget:animateToState("hide")
|
||||||
local f1_local1 = 36
|
local f1_local1 = 36
|
||||||
@ -20,7 +20,7 @@ CoD.AmmoCounter.new = function (f1_arg0)
|
|||||||
leftAnchor = true,
|
leftAnchor = true,
|
||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
rightAnchor = false,
|
rightAnchor = false,
|
||||||
bottomAnchor = false
|
bottomAnchor = false,
|
||||||
})
|
})
|
||||||
Widget:addElement(Widget_1)
|
Widget:addElement(Widget_1)
|
||||||
local f1_local3 = CoD.AmmoCounter.TextHeight
|
local f1_local3 = CoD.AmmoCounter.TextHeight
|
||||||
@ -33,14 +33,14 @@ CoD.AmmoCounter.new = function (f1_arg0)
|
|||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
rightAnchor = true,
|
rightAnchor = true,
|
||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
alpha = 1
|
alpha = 1,
|
||||||
})
|
})
|
||||||
Widget.ammoLabel:setFont(CoD.fonts.Big)
|
Widget.ammoLabel:setFont(CoD.fonts.Big)
|
||||||
Widget.ammoLabel:registerAnimationState("pulse_low", {
|
Widget.ammoLabel:registerAnimationState("pulse_low", {
|
||||||
alpha = 1
|
alpha = 1,
|
||||||
})
|
})
|
||||||
Widget.ammoLabel:registerAnimationState("pulse_high", {
|
Widget.ammoLabel:registerAnimationState("pulse_high", {
|
||||||
alpha = 0.5
|
alpha = 0.5,
|
||||||
})
|
})
|
||||||
Widget.ammoLabel:registerEventHandler("transition_complete_pulse_high", CoD.AmmoCounter.Ammo_PulseHigh)
|
Widget.ammoLabel:registerEventHandler("transition_complete_pulse_high", CoD.AmmoCounter.Ammo_PulseHigh)
|
||||||
Widget.ammoLabel:registerEventHandler("transition_complete_pulse_low", CoD.AmmoCounter.Ammo_PulseLow)
|
Widget.ammoLabel:registerEventHandler("transition_complete_pulse_low", CoD.AmmoCounter.Ammo_PulseLow)
|
||||||
@ -51,7 +51,7 @@ CoD.AmmoCounter.new = function (f1_arg0)
|
|||||||
return Widget
|
return Widget
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoCounter.UpdateAmmo = function (f2_arg0, f2_arg1)
|
CoD.AmmoCounter.UpdateAmmo = function(f2_arg0, f2_arg1)
|
||||||
if f2_arg1.ammoInClip == 0 and f2_arg1.ammoStock == 0 and f2_arg1.lowClip ~= true then
|
if f2_arg1.ammoInClip == 0 and f2_arg1.ammoStock == 0 and f2_arg1.lowClip ~= true then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -74,7 +74,7 @@ CoD.AmmoCounter.UpdateAmmo = function (f2_arg0, f2_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoCounter.ShouldHideAmmoCounter = function (f3_arg0, f3_arg1)
|
CoD.AmmoCounter.ShouldHideAmmoCounter = function(f3_arg0, f3_arg1)
|
||||||
if f3_arg0.weapon ~= nil then
|
if f3_arg0.weapon ~= nil then
|
||||||
if Engine.IsWeaponType(f3_arg0.weapon, "melee") then
|
if Engine.IsWeaponType(f3_arg0.weapon, "melee") then
|
||||||
return true
|
return true
|
||||||
@ -87,7 +87,7 @@ CoD.AmmoCounter.ShouldHideAmmoCounter = function (f3_arg0, f3_arg1)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoCounter.UpdateVisibility = function (f4_arg0, f4_arg1)
|
CoD.AmmoCounter.UpdateVisibility = function(f4_arg0, f4_arg1)
|
||||||
local f4_local0 = f4_arg1.controller
|
local f4_local0 = f4_arg1.controller
|
||||||
if f4_arg1.weapon ~= nil then
|
if f4_arg1.weapon ~= nil then
|
||||||
f4_arg0.weapon = f4_arg1.weapon
|
f4_arg0.weapon = f4_arg1.weapon
|
||||||
@ -104,14 +104,14 @@ CoD.AmmoCounter.UpdateVisibility = function (f4_arg0, f4_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoCounter.Ammo_PulseHigh = function (f5_arg0, f5_arg1)
|
CoD.AmmoCounter.Ammo_PulseHigh = function(f5_arg0, f5_arg1)
|
||||||
if f5_arg1.interrupted ~= true then
|
if f5_arg1.interrupted ~= true then
|
||||||
f5_arg0:animateToState("pulse_low", CoD.AmmoCounter.LowAmmoFadeTime, true, false)
|
f5_arg0:animateToState("pulse_low", CoD.AmmoCounter.LowAmmoFadeTime, true, false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoCounter.Ammo_PulseLow = function (f6_arg0, f6_arg1)
|
CoD.AmmoCounter.Ammo_PulseLow = function(f6_arg0, f6_arg1)
|
||||||
if f6_arg1.interrupted ~= true then
|
if f6_arg1.interrupted ~= true then
|
||||||
f6_arg0:animateToState("pulse_high", CoD.AmmoCounter.LowAmmoFadeTime, false, true)
|
f6_arg0:animateToState("pulse_high", CoD.AmmoCounter.LowAmmoFadeTime, false, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -3,7 +3,7 @@ CoD.OffhandIcons.Size = 24
|
|||||||
CoD.OffhandIcons.Spacing = 1
|
CoD.OffhandIcons.Spacing = 1
|
||||||
CoD.OffhandIcons.AlphaMultiplier = 0.75
|
CoD.OffhandIcons.AlphaMultiplier = 0.75
|
||||||
CoD.OffhandIcons.Width = CoD.OffhandIcons.Size * 1.5
|
CoD.OffhandIcons.Width = CoD.OffhandIcons.Size * 1.5
|
||||||
CoD.OffhandIcons.new = function (HudRef, InstanceRef)
|
CoD.OffhandIcons.new = function(HudRef, InstanceRef)
|
||||||
local Widget = LUI.UIElement.new(InstanceRef)
|
local Widget = LUI.UIElement.new(InstanceRef)
|
||||||
Widget.type = HudRef
|
Widget.type = HudRef
|
||||||
Widget.setMaterialAndQuantity = CoD.OffhandIcons.SetMaterialAndQuantity
|
Widget.setMaterialAndQuantity = CoD.OffhandIcons.SetMaterialAndQuantity
|
||||||
@ -11,7 +11,7 @@ CoD.OffhandIcons.new = function (HudRef, InstanceRef)
|
|||||||
return Widget
|
return Widget
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.OffhandIcons.SetMaterialAndQuantity = function (f2_arg0, f2_arg1, f2_arg2)
|
CoD.OffhandIcons.SetMaterialAndQuantity = function(f2_arg0, f2_arg1, f2_arg2)
|
||||||
local f2_local0 = nil
|
local f2_local0 = nil
|
||||||
if f2_arg0.icons == nil then
|
if f2_arg0.icons == nil then
|
||||||
f2_local0 = {}
|
f2_local0 = {}
|
||||||
@ -50,7 +50,7 @@ CoD.OffhandIcons.SetMaterialAndQuantity = function (f2_arg0, f2_arg1, f2_arg2)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.OffhandIcons.UpdateOffhand = function (f3_arg0, f3_arg1)
|
CoD.OffhandIcons.UpdateOffhand = function(f3_arg0, f3_arg1)
|
||||||
local f3_local0 = f3_arg1[f3_arg0.type]
|
local f3_local0 = f3_arg1[f3_arg0.type]
|
||||||
if f3_local0 == nil then
|
if f3_local0 == nil then
|
||||||
if not f3_arg0.iconOutline then
|
if not f3_arg0.iconOutline then
|
||||||
@ -61,7 +61,7 @@ CoD.OffhandIcons.UpdateOffhand = function (f3_arg0, f3_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.OffhandIcons.UpdateTomahawkInUse = function (f4_arg0, f4_arg1)
|
CoD.OffhandIcons.UpdateTomahawkInUse = function(f4_arg0, f4_arg1)
|
||||||
local f4_local0 = f4_arg1.newValue
|
local f4_local0 = f4_arg1.newValue
|
||||||
if f4_local0 == 0 then
|
if f4_local0 == 0 then
|
||||||
if f4_arg0.iconOutline then
|
if f4_arg0.iconOutline then
|
||||||
@ -93,7 +93,7 @@ CoD.OffhandIcons.UpdateTomahawkInUse = function (f4_arg0, f4_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.OffhandIcons.UpgradeTomahawkIcon = function (f5_arg0, f5_arg1)
|
CoD.OffhandIcons.UpgradeTomahawkIcon = function(f5_arg0, f5_arg1)
|
||||||
if f5_arg1.newValue == 0 then
|
if f5_arg1.newValue == 0 then
|
||||||
f5_arg0.iconOutlineImage = CoD.AmmoAreaZombie.TomahawkOutline
|
f5_arg0.iconOutlineImage = CoD.AmmoAreaZombie.TomahawkOutline
|
||||||
else
|
else
|
||||||
@ -104,12 +104,12 @@ CoD.OffhandIcons.UpgradeTomahawkIcon = function (f5_arg0, f5_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.OffhandIcons.PulseBright = function (f6_arg0, f6_arg1)
|
CoD.OffhandIcons.PulseBright = function(f6_arg0, f6_arg1)
|
||||||
f6_arg0:beginAnimation("pulse_low", f6_arg1)
|
f6_arg0:beginAnimation("pulse_low", f6_arg1)
|
||||||
f6_arg0:setAlpha(1)
|
f6_arg0:setAlpha(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.OffhandIcons.PulseLow = function (f7_arg0, f7_arg1)
|
CoD.OffhandIcons.PulseLow = function(f7_arg0, f7_arg1)
|
||||||
f7_arg0:beginAnimation("pulse_high", f7_arg1)
|
f7_arg0:beginAnimation("pulse_high", f7_arg1)
|
||||||
f7_arg0:setAlpha(0.1)
|
f7_arg0:setAlpha(0.1)
|
||||||
end
|
end
|
||||||
|
@ -23,7 +23,7 @@ local f0_local14 = 0
|
|||||||
local SCOREBOARD_PING_BARS = {}
|
local SCOREBOARD_PING_BARS = {}
|
||||||
local f0_local16 = 232
|
local f0_local16 = 232
|
||||||
local SCOREBOARD_ROW_SELECTED = {
|
local SCOREBOARD_ROW_SELECTED = {
|
||||||
name = "row_selected"
|
name = "row_selected",
|
||||||
}
|
}
|
||||||
local ScoreboardWidgetRowSelectorFunc = nil
|
local ScoreboardWidgetRowSelectorFunc = nil
|
||||||
local f0_local24 = 27
|
local f0_local24 = 27
|
||||||
@ -45,15 +45,15 @@ local IsDLCMap2, IsDLCMap4, IsClassic = nil, nil, nil
|
|||||||
|
|
||||||
CoD.ScoreboardRow = InheritFrom(LUI.UIElement)
|
CoD.ScoreboardRow = InheritFrom(LUI.UIElement)
|
||||||
|
|
||||||
local ScoreboardWidgetSetOwnerFunc = function (ScoreboardWidget, LocalClientIndex)
|
local ScoreboardWidgetSetOwnerFunc = function(ScoreboardWidget, LocalClientIndex)
|
||||||
ScoreboardWidget.m_ownerController = LocalClientIndex
|
ScoreboardWidget.m_ownerController = LocalClientIndex
|
||||||
end
|
end
|
||||||
|
|
||||||
local ScoreboardWidgetGetOwnerFunc = function (ScoreboardWidget)
|
local ScoreboardWidgetGetOwnerFunc = function(ScoreboardWidget)
|
||||||
return ScoreboardWidget.m_ownerController
|
return ScoreboardWidget.m_ownerController
|
||||||
end
|
end
|
||||||
|
|
||||||
local ZombiesCleansedScoreboardCheck = function (ScoreboardColumnName)
|
local ZombiesCleansedScoreboardCheck = function(ScoreboardColumnName)
|
||||||
if Dvar.ui_gametype:get() == CoD.Zombie.GAMETYPE_ZCLEANSED and ScoreboardColumnName == "MPUI_DOWNS" then
|
if Dvar.ui_gametype:get() == CoD.Zombie.GAMETYPE_ZCLEANSED and ScoreboardColumnName == "MPUI_DOWNS" then
|
||||||
return "MPUI_RETURNS"
|
return "MPUI_RETURNS"
|
||||||
else
|
else
|
||||||
@ -61,7 +61,7 @@ local ZombiesCleansedScoreboardCheck = function (ScoreboardColumnName)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local CreateScoreboardHeaderTitle = function (ScoreboardWidget)
|
local CreateScoreboardHeaderTitle = function(ScoreboardWidget)
|
||||||
local HeaderTitle = nil
|
local HeaderTitle = nil
|
||||||
if ScoreboardWidget.mode == "theater" then
|
if ScoreboardWidget.mode == "theater" then
|
||||||
HeaderTitle = Engine.Localize("MENU_THEATER_PARTY")
|
HeaderTitle = Engine.Localize("MENU_THEATER_PARTY")
|
||||||
@ -166,7 +166,7 @@ function CreateScoreBoardBody(ScoreboardWidget, LocalClientIndex, UnusedArg1)
|
|||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
top = 0,
|
top = 0,
|
||||||
bottom = 0
|
bottom = 0,
|
||||||
}, 1.35)
|
}, 1.35)
|
||||||
ScoreboardWidget:addElement(ScoreboardWidget.scoreboardContainer)
|
ScoreboardWidget:addElement(ScoreboardWidget.scoreboardContainer)
|
||||||
if not UnusedArg1 then
|
if not UnusedArg1 then
|
||||||
@ -278,7 +278,7 @@ function CreateScoreBoardBody(ScoreboardWidget, LocalClientIndex, UnusedArg1)
|
|||||||
ScoreboardWidgetUpdateFunc(ScoreboardWidget)
|
ScoreboardWidgetUpdateFunc(ScoreboardWidget)
|
||||||
end
|
end
|
||||||
|
|
||||||
local ClientInputSourceChangedCallback = function (ScoreboardWidget, ClientInstance)
|
local ClientInputSourceChangedCallback = function(ScoreboardWidget, ClientInstance)
|
||||||
if ScoreboardWidget.spectatePlayerButtonPrompt then
|
if ScoreboardWidget.spectatePlayerButtonPrompt then
|
||||||
ScoreboardWidget.spectatePlayerButtonPrompt:processEvent(ClientInstance)
|
ScoreboardWidget.spectatePlayerButtonPrompt:processEvent(ClientInstance)
|
||||||
end
|
end
|
||||||
@ -288,8 +288,8 @@ local ClientInputSourceChangedCallback = function (ScoreboardWidget, ClientInsta
|
|||||||
ScoreboardWidget:dispatchEventToChildren(ClientInstance)
|
ScoreboardWidget:dispatchEventToChildren(ClientInstance)
|
||||||
end
|
end
|
||||||
|
|
||||||
LUI.createMenu.Scoreboard = function (LocalClientIndex)
|
LUI.createMenu.Scoreboard = function(LocalClientIndex)
|
||||||
local BodyVerticalOffset = f0_local41;
|
local BodyVerticalOffset = f0_local41
|
||||||
if CoD.isZombie == true then
|
if CoD.isZombie == true then
|
||||||
IsDLCMap2 = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC2Maps)
|
IsDLCMap2 = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC2Maps)
|
||||||
IsDLCMap4 = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC4Maps)
|
IsDLCMap4 = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC4Maps)
|
||||||
@ -332,14 +332,14 @@ LUI.createMenu.Scoreboard = function (LocalClientIndex)
|
|||||||
return ScoreboardWidget
|
return ScoreboardWidget
|
||||||
end
|
end
|
||||||
|
|
||||||
ScoreboardWidgetCloseFunc = function (ScoreboardWidget, UnusedArg1)
|
ScoreboardWidgetCloseFunc = function(ScoreboardWidget, UnusedArg1)
|
||||||
ScoreboardWidget.focusableRowIndex = nil
|
ScoreboardWidget.focusableRowIndex = nil
|
||||||
ScoreboardWidget.selectedClientNum = nil
|
ScoreboardWidget.selectedClientNum = nil
|
||||||
ScoreboardWidget.selectedScoreboardIndex = nil
|
ScoreboardWidget.selectedScoreboardIndex = nil
|
||||||
CoD.Menu.close(ScoreboardWidget)
|
CoD.Menu.close(ScoreboardWidget)
|
||||||
end
|
end
|
||||||
|
|
||||||
ScoreboardWidgetCreateTeamElement = function (UnusedArg1)
|
ScoreboardWidgetCreateTeamElement = function(UnusedArg1)
|
||||||
local ScoreboardFactionWidget = LUI.UIElement.new()
|
local ScoreboardFactionWidget = LUI.UIElement.new()
|
||||||
ScoreboardFactionWidget:setLeftRight(true, true, 0, 0)
|
ScoreboardFactionWidget:setLeftRight(true, true, 0, 0)
|
||||||
ScoreboardFactionWidget:setUseStencil(true)
|
ScoreboardFactionWidget:setUseStencil(true)
|
||||||
@ -358,7 +358,7 @@ ScoreboardWidgetCreateTeamElement = function (UnusedArg1)
|
|||||||
ScoreboardFactionWidget.highlightGlow:setAlpha(0.4)
|
ScoreboardFactionWidget.highlightGlow:setAlpha(0.4)
|
||||||
ScoreboardFactionWidget:addElement(ScoreboardFactionWidget.highlightGlow)
|
ScoreboardFactionWidget:addElement(ScoreboardFactionWidget.highlightGlow)
|
||||||
local f9_local1 = 116
|
local f9_local1 = 116
|
||||||
local f9_local2 = ((f0_local30) + f0_local24 - 2) / 2 - f9_local1 / 2
|
local f9_local2 = (f0_local30 + f0_local24 - 2) / 2 - f9_local1 / 2
|
||||||
ScoreboardFactionWidget.factionIcon = LUI.UIImage.new()
|
ScoreboardFactionWidget.factionIcon = LUI.UIImage.new()
|
||||||
ScoreboardFactionWidget.factionIcon:setLeftRight(true, false, f9_local2, f9_local2 + f9_local1)
|
ScoreboardFactionWidget.factionIcon:setLeftRight(true, false, f9_local2, f9_local2 + f9_local1)
|
||||||
ScoreboardFactionWidget.factionIcon:setTopBottom(false, false, -f9_local1 / 2, f9_local1 / 2)
|
ScoreboardFactionWidget.factionIcon:setTopBottom(false, false, -f9_local1 / 2, f9_local1 / 2)
|
||||||
@ -393,7 +393,7 @@ ScoreboardWidgetCreateTeamElement = function (UnusedArg1)
|
|||||||
return ScoreboardFactionWidget
|
return ScoreboardFactionWidget
|
||||||
end
|
end
|
||||||
|
|
||||||
ScoreboardWidgetRowSelectorFunc = function (ScoreboardWidget, ScoreboardRowSelected)
|
ScoreboardWidgetRowSelectorFunc = function(ScoreboardWidget, ScoreboardRowSelected)
|
||||||
if ScoreboardWidget.frontEndOnly then
|
if ScoreboardWidget.frontEndOnly then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -412,7 +412,7 @@ ScoreboardWidgetRowSelectorFunc = function (ScoreboardWidget, ScoreboardRowSelec
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ScoreboardWidgetShowGamercardFunc = function (ScoreboardWidget, ClientInstance)
|
ScoreboardWidgetShowGamercardFunc = function(ScoreboardWidget, ClientInstance)
|
||||||
if ScoreboardWidget.frontEndOnly then
|
if ScoreboardWidget.frontEndOnly then
|
||||||
return
|
return
|
||||||
elseif ScoreboardWidget.selectedClientNum then
|
elseif ScoreboardWidget.selectedClientNum then
|
||||||
@ -427,7 +427,7 @@ ScoreboardWidgetShowGamercardFunc = function (ScoreboardWidget, ClientInstance)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ScoreboardWidgetToggleMuteFunc = function (ScoreboardWidget, UnusedArg1)
|
ScoreboardWidgetToggleMuteFunc = function(ScoreboardWidget, UnusedArg1)
|
||||||
if ScoreboardWidget.frontEndOnly then
|
if ScoreboardWidget.frontEndOnly then
|
||||||
return
|
return
|
||||||
elseif ScoreboardWidget.selectedClientNum then
|
elseif ScoreboardWidget.selectedClientNum then
|
||||||
@ -469,7 +469,7 @@ function FullscreenStop(ScoreboardWidget, ClientInstance)
|
|||||||
ScoreboardWidget:dispatchEventToChildren(ClientInstance)
|
ScoreboardWidget:dispatchEventToChildren(ClientInstance)
|
||||||
end
|
end
|
||||||
|
|
||||||
f0_local38 = function (ScoreboardWidget, ClientNum)
|
f0_local38 = function(ScoreboardWidget, ClientNum)
|
||||||
if ScoreboardWidget.frontEndOnly then
|
if ScoreboardWidget.frontEndOnly then
|
||||||
return
|
return
|
||||||
elseif UIExpression.IsDemoPlaying(ScoreboardWidget.m_ownerController) == 1 then
|
elseif UIExpression.IsDemoPlaying(ScoreboardWidget.m_ownerController) == 1 then
|
||||||
@ -744,7 +744,7 @@ function UpdateTheaterScoreboard(ScoreboardWidget)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ScoreboardWidgetUpdateFunc = function (ScoreboardWidget)
|
ScoreboardWidgetUpdateFunc = function(ScoreboardWidget)
|
||||||
if ScoreboardWidget.mode == "theater" and not ScoreboardWidget.frontEndOnly then
|
if ScoreboardWidget.mode == "theater" and not ScoreboardWidget.frontEndOnly then
|
||||||
UpdateTheaterScoreboard(ScoreboardWidget)
|
UpdateTheaterScoreboard(ScoreboardWidget)
|
||||||
else
|
else
|
||||||
@ -752,7 +752,7 @@ ScoreboardWidgetUpdateFunc = function (ScoreboardWidget)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ScoreboardUpdateTeamElement = function (TeamElement, FactionTeam, FactionColorR, FactionColorG, FactionColorB, ScoreboardTeam, MinRowsPerTeam, f21_arg7)
|
ScoreboardUpdateTeamElement = function(TeamElement, FactionTeam, FactionColorR, FactionColorG, FactionColorB, ScoreboardTeam, MinRowsPerTeam, f21_arg7)
|
||||||
local VerticalOffset = MinRowsPerTeam * f0_local29 + (MinRowsPerTeam + 1) * f0_local31
|
local VerticalOffset = MinRowsPerTeam * f0_local29 + (MinRowsPerTeam + 1) * f0_local31
|
||||||
TeamElement:setTopBottom(true, false, f21_arg7, f21_arg7 + VerticalOffset)
|
TeamElement:setTopBottom(true, false, f21_arg7, f21_arg7 + VerticalOffset)
|
||||||
TeamElement:setAlpha(1)
|
TeamElement:setAlpha(1)
|
||||||
@ -846,7 +846,7 @@ ScoreboardUpdateTeamElement = function (TeamElement, FactionTeam, FactionColorR,
|
|||||||
TeamElement.factionName:setRGB(FactionColorR, FactionColorG, FactionColorB)
|
TeamElement.factionName:setRGB(FactionColorR, FactionColorG, FactionColorB)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.ScoreboardRow.GetRowTextColor = function (ScoreboardRowIndex)
|
CoD.ScoreboardRow.GetRowTextColor = function(ScoreboardRowIndex)
|
||||||
if CoD.isZombie == true then
|
if CoD.isZombie == true then
|
||||||
local ZombiesColorIndex = (ScoreboardRowIndex - 1) % 4 + 1
|
local ZombiesColorIndex = (ScoreboardRowIndex - 1) % 4 + 1
|
||||||
return CoD.Zombie.PlayerColors[ZombiesColorIndex].r, CoD.Zombie.PlayerColors[ZombiesColorIndex].g, CoD.Zombie.PlayerColors[ZombiesColorIndex].b
|
return CoD.Zombie.PlayerColors[ZombiesColorIndex].r, CoD.Zombie.PlayerColors[ZombiesColorIndex].g, CoD.Zombie.PlayerColors[ZombiesColorIndex].b
|
||||||
@ -855,7 +855,7 @@ CoD.ScoreboardRow.GetRowTextColor = function (ScoreboardRowIndex)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.ScoreboardRow.new = function (LocalClientIndex, ScoreboardRowIndex)
|
CoD.ScoreboardRow.new = function(LocalClientIndex, ScoreboardRowIndex)
|
||||||
local RowTextColorR, RowTextColorG, RowTextColorB = CoD.ScoreboardRow.GetRowTextColor(ScoreboardRowIndex)
|
local RowTextColorR, RowTextColorG, RowTextColorB = CoD.ScoreboardRow.GetRowTextColor(ScoreboardRowIndex)
|
||||||
local ScoreboardRowWidget = LUI.UIElement.new()
|
local ScoreboardRowWidget = LUI.UIElement.new()
|
||||||
ScoreboardRowWidget:setClass(CoD.ScoreboardRow)
|
ScoreboardRowWidget:setClass(CoD.ScoreboardRow)
|
||||||
@ -949,7 +949,7 @@ CoD.ScoreboardRow.new = function (LocalClientIndex, ScoreboardRowIndex)
|
|||||||
return ScoreboardRowWidget
|
return ScoreboardRowWidget
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.ScoreboardRow.setClient = function (ScoreboardRow, FactionColorR, FactionColorG, FactionColorB, VerticalOffset, ScoreboardMode, ClientNum, FocusableRowIndex, PlayerIndex, ScoreboardTeam, ScoreboardFrontEndOnly)
|
CoD.ScoreboardRow.setClient = function(ScoreboardRow, FactionColorR, FactionColorG, FactionColorB, VerticalOffset, ScoreboardMode, ClientNum, FocusableRowIndex, PlayerIndex, ScoreboardTeam, ScoreboardFrontEndOnly)
|
||||||
local IsTheaterMode = ScoreboardMode == "theater"
|
local IsTheaterMode = ScoreboardMode == "theater"
|
||||||
local PlayerRank, PlayerRankIcon, PlayerPrestige, PlayerGamerTag, PlayerScoreboardIndex, PlayerScoreboardClientNum = nil, nil, nil, nil, nil, nil
|
local PlayerRank, PlayerRankIcon, PlayerPrestige, PlayerGamerTag, PlayerScoreboardIndex, PlayerScoreboardClientNum = nil, nil, nil, nil, nil, nil
|
||||||
local MaxColumns = SCOREBOARD_DEFAULT_MAX_COLUMNS
|
local MaxColumns = SCOREBOARD_DEFAULT_MAX_COLUMNS
|
||||||
@ -1119,7 +1119,7 @@ CoD.ScoreboardRow.setClient = function (ScoreboardRow, FactionColorR, FactionCol
|
|||||||
return VerticalOffset
|
return VerticalOffset
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.ScoreboardRow.gainFocus = function (Button, EventGainFocus)
|
CoD.ScoreboardRow.gainFocus = function(Button, EventGainFocus)
|
||||||
CoD.ScoreboardRow.super.gainFocus(Button, EventGainFocus)
|
CoD.ScoreboardRow.super.gainFocus(Button, EventGainFocus)
|
||||||
Button.border:setAlpha(1)
|
Button.border:setAlpha(1)
|
||||||
Button:dispatchEventToChildren(EventGainFocus)
|
Button:dispatchEventToChildren(EventGainFocus)
|
||||||
@ -1127,13 +1127,13 @@ CoD.ScoreboardRow.gainFocus = function (Button, EventGainFocus)
|
|||||||
Button:dispatchEventToParent(SCOREBOARD_ROW_SELECTED)
|
Button:dispatchEventToParent(SCOREBOARD_ROW_SELECTED)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.ScoreboardRow.loseFocus = function (Button, EventLoseFocus)
|
CoD.ScoreboardRow.loseFocus = function(Button, EventLoseFocus)
|
||||||
CoD.ScoreboardRow.super.loseFocus(Button, EventLoseFocus)
|
CoD.ScoreboardRow.super.loseFocus(Button, EventLoseFocus)
|
||||||
Button.border:setAlpha(0)
|
Button.border:setAlpha(0)
|
||||||
Button:dispatchEventToChildren(EventLoseFocus)
|
Button:dispatchEventToChildren(EventLoseFocus)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.ScoreboardRow.focusClient = function (ScoreboardWidget, EventFocusClient)
|
CoD.ScoreboardRow.focusClient = function(ScoreboardWidget, EventFocusClient)
|
||||||
if ScoreboardWidget.clientNum == EventFocusClient.clientNum then
|
if ScoreboardWidget.clientNum == EventFocusClient.clientNum then
|
||||||
ScoreboardWidget:processEvent(LUI.UIButton.GainFocusEvent)
|
ScoreboardWidget:processEvent(LUI.UIButton.GainFocusEvent)
|
||||||
elseif ScoreboardWidget:isInFocus() then
|
elseif ScoreboardWidget:isInFocus() then
|
||||||
@ -1147,7 +1147,9 @@ CoD.ScoreboardRow:registerEventHandler("focus_client", CoD.ScoreboardRow.focusCl
|
|||||||
|
|
||||||
function Split(Source, Delimiters)
|
function Split(Source, Delimiters)
|
||||||
local Elements = {}
|
local Elements = {}
|
||||||
local Pattern = '([^'..Delimiters..']+)'
|
local Pattern = "([^" .. Delimiters .. "]+)"
|
||||||
string.gsub(Source, Pattern, function(value) Elements[#Elements + 1] = value; end);
|
string.gsub(Source, Pattern, function(value)
|
||||||
|
Elements[#Elements + 1] = value
|
||||||
|
end)
|
||||||
return Elements
|
return Elements
|
||||||
end
|
end
|
||||||
|
@ -2,7 +2,7 @@ CoD.WeaponLabel = {}
|
|||||||
CoD.WeaponLabel.TextHeight = 32
|
CoD.WeaponLabel.TextHeight = 32
|
||||||
CoD.WeaponLabel.FadeTime = 2000
|
CoD.WeaponLabel.FadeTime = 2000
|
||||||
CoD.WeaponLabel.WeaponFontName = "Default"
|
CoD.WeaponLabel.WeaponFontName = "Default"
|
||||||
CoD.WeaponLabel.new = function (f1_arg0)
|
CoD.WeaponLabel.new = function(f1_arg0)
|
||||||
local Widget = LUI.UIElement.new(f1_arg0)
|
local Widget = LUI.UIElement.new(f1_arg0)
|
||||||
local f1_local1 = CoD.textSize[CoD.WeaponLabel.WeaponFontName]
|
local f1_local1 = CoD.textSize[CoD.WeaponLabel.WeaponFontName]
|
||||||
local f1_local2 = CoD.fonts[CoD.WeaponLabel.WeaponFontName]
|
local f1_local2 = CoD.fonts[CoD.WeaponLabel.WeaponFontName]
|
||||||
@ -15,19 +15,19 @@ CoD.WeaponLabel.new = function (f1_arg0)
|
|||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
rightAnchor = true,
|
rightAnchor = true,
|
||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
alphaMultiplier = 1
|
alphaMultiplier = 1,
|
||||||
})
|
})
|
||||||
Widget.weaponLabel:setFont(f1_local2)
|
Widget.weaponLabel:setFont(f1_local2)
|
||||||
Widget.weaponLabel:registerAnimationState("fade_out", {
|
Widget.weaponLabel:registerAnimationState("fade_out", {
|
||||||
alphaMultiplier = 0
|
alphaMultiplier = 0,
|
||||||
})
|
})
|
||||||
Widget:addElement(Widget.weaponLabel)
|
Widget:addElement(Widget.weaponLabel)
|
||||||
Widget:registerEventHandler("hud_update_weapon_select", CoD.WeaponLabel.UpdateWeapon)
|
Widget:registerEventHandler("hud_update_weapon_select", CoD.WeaponLabel.UpdateWeapon)
|
||||||
return Widget
|
return Widget
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.WeaponLabel.UpdateWeapon = function (f2_arg0, f2_arg1)
|
CoD.WeaponLabel.UpdateWeapon = function(f2_arg0, f2_arg1)
|
||||||
f2_arg0.weaponLabel:animateToState("default")
|
f2_arg0.weaponLabel:animateToState("default")
|
||||||
f2_arg0.weaponLabel:setText(UIExpression.ToUpper(nil, Engine.Localize(f2_arg1.weaponDisplayName)))
|
f2_arg0.weaponLabel:setText(UIExpression.ToUpper(nil, Engine.Localize(f2_arg1.weaponDisplayName)))
|
||||||
-- f2_arg0.weaponLabel:animateToState("fade_out", CoD.WeaponLabel.FadeTime)
|
-- f2_arg0.weaponLabel:animateToState("fade_out", CoD.WeaponLabel.FadeTime)
|
||||||
end
|
end
|
||||||
|
@ -15,7 +15,7 @@ CoD.PrivateGameLobby.Dvars[1].values[2] = 1
|
|||||||
CoD.PrivateGameLobby.Dvars[1].gameTypes = {}
|
CoD.PrivateGameLobby.Dvars[1].gameTypes = {}
|
||||||
CoD.PrivateGameLobby.Dvars[1].gameTypes[1] = "zgrief"
|
CoD.PrivateGameLobby.Dvars[1].gameTypes[1] = "zgrief"
|
||||||
|
|
||||||
CoD.PrivateGameLobby.ButtonPrompt_TeamPrev = function (f1_arg0, ClientInstance)
|
CoD.PrivateGameLobby.ButtonPrompt_TeamPrev = function(f1_arg0, ClientInstance)
|
||||||
if Engine.PartyHostIsReadyToStart() == true then
|
if Engine.PartyHostIsReadyToStart() == true then
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
@ -24,7 +24,7 @@ CoD.PrivateGameLobby.ButtonPrompt_TeamPrev = function (f1_arg0, ClientInstance)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.ButtonPrompt_TeamNext = function (f2_arg0, ClientInstance)
|
CoD.PrivateGameLobby.ButtonPrompt_TeamNext = function(f2_arg0, ClientInstance)
|
||||||
if Engine.PartyHostIsReadyToStart() == true then
|
if Engine.PartyHostIsReadyToStart() == true then
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
@ -33,7 +33,7 @@ CoD.PrivateGameLobby.ButtonPrompt_TeamNext = function (f2_arg0, ClientInstance)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.ShouldEnableTeamCycling = function (PrivateGameLobbyWidget)
|
CoD.PrivateGameLobby.ShouldEnableTeamCycling = function(PrivateGameLobbyWidget)
|
||||||
if PrivateGameLobbyWidget.panelManager == nil then
|
if PrivateGameLobbyWidget.panelManager == nil then
|
||||||
return false
|
return false
|
||||||
elseif not PrivateGameLobbyWidget.panelManager:isPanelOnscreen("lobbyPane") then
|
elseif not PrivateGameLobbyWidget.panelManager:isPanelOnscreen("lobbyPane") then
|
||||||
@ -49,7 +49,7 @@ CoD.PrivateGameLobby.ShouldEnableTeamCycling = function (PrivateGameLobbyWidget)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.SetupTeamCycling = function (PrivateGameLobbyWidget)
|
CoD.PrivateGameLobby.SetupTeamCycling = function(PrivateGameLobbyWidget)
|
||||||
if CoD.PrivateGameLobby.ShouldEnableTeamCycling(PrivateGameLobbyWidget) then
|
if CoD.PrivateGameLobby.ShouldEnableTeamCycling(PrivateGameLobbyWidget) then
|
||||||
PrivateGameLobbyWidget.cycleTeamButtonPrompt:enable()
|
PrivateGameLobbyWidget.cycleTeamButtonPrompt:enable()
|
||||||
else
|
else
|
||||||
@ -57,22 +57,22 @@ CoD.PrivateGameLobby.SetupTeamCycling = function (PrivateGameLobbyWidget)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.CurrentPanelChanged = function (PrivateGameLobbyWidget, f5_arg1)
|
CoD.PrivateGameLobby.CurrentPanelChanged = function(PrivateGameLobbyWidget, f5_arg1)
|
||||||
CoD.Lobby.CurrentPanelChanged(PrivateGameLobbyWidget, f5_arg1)
|
CoD.Lobby.CurrentPanelChanged(PrivateGameLobbyWidget, f5_arg1)
|
||||||
CoD.PrivateGameLobby.SetupTeamCycling(PrivateGameLobbyWidget)
|
CoD.PrivateGameLobby.SetupTeamCycling(PrivateGameLobbyWidget)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.ButtonPrompt_PartyUpdateStatus = function (PrivateGameLobbyWidget, f6_arg1)
|
CoD.PrivateGameLobby.ButtonPrompt_PartyUpdateStatus = function(PrivateGameLobbyWidget, f6_arg1)
|
||||||
CoD.GameLobby.UpdateStatusText(PrivateGameLobbyWidget, f6_arg1)
|
CoD.GameLobby.UpdateStatusText(PrivateGameLobbyWidget, f6_arg1)
|
||||||
CoD.PrivateGameLobby.SetupTeamCycling(PrivateGameLobbyWidget)
|
CoD.PrivateGameLobby.SetupTeamCycling(PrivateGameLobbyWidget)
|
||||||
PrivateGameLobbyWidget:dispatchEventToChildren(f6_arg1)
|
PrivateGameLobbyWidget:dispatchEventToChildren(f6_arg1)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.DoesGametypeSupportBots = function (Gametype)
|
CoD.PrivateGameLobby.DoesGametypeSupportBots = function(Gametype)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.BotButton_Update = function (BotsButton)
|
CoD.PrivateGameLobby.BotButton_Update = function(BotsButton)
|
||||||
local Gametype = UIExpression.DvarString(nil, "ui_gameType")
|
local Gametype = UIExpression.DvarString(nil, "ui_gameType")
|
||||||
local EnemyBots = UIExpression.DvarInt(nil, "bot_enemies")
|
local EnemyBots = UIExpression.DvarInt(nil, "bot_enemies")
|
||||||
BotsButton.starImage:setAlpha(0)
|
BotsButton.starImage:setAlpha(0)
|
||||||
@ -94,7 +94,7 @@ CoD.PrivateGameLobby.BotButton_Update = function (BotsButton)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.PopulateButtons_Project_Multiplayer = function (PrivateGameLobbyButtonPane, IsHost)
|
CoD.PrivateGameLobby.PopulateButtons_Project_Multiplayer = function(PrivateGameLobbyButtonPane, IsHost)
|
||||||
if IsHost == true then
|
if IsHost == true then
|
||||||
local SetupGameText = Engine.Localize("MPUI_SETUP_GAME_CAPS")
|
local SetupGameText = Engine.Localize("MPUI_SETUP_GAME_CAPS")
|
||||||
local f9_local1_1, f9_local1_2, f9_local1_3, f9_local1_4 = GetTextDimensions(SetupGameText, CoD.CoD9Button.Font, CoD.CoD9Button.TextHeight)
|
local f9_local1_1, f9_local1_2, f9_local1_3, f9_local1_4 = GetTextDimensions(SetupGameText, CoD.CoD9Button.Font, CoD.CoD9Button.TextHeight)
|
||||||
@ -169,7 +169,7 @@ CoD.PrivateGameLobby.PopulateButtons_Project_Multiplayer = function (PrivateGame
|
|||||||
top = -CoD.textSize.Condensed / 2,
|
top = -CoD.textSize.Condensed / 2,
|
||||||
bottom = CoD.textSize.Condensed / 2,
|
bottom = CoD.textSize.Condensed / 2,
|
||||||
font = CoD.fonts.Condensed,
|
font = CoD.fonts.Condensed,
|
||||||
alignment = LUI.Alignment.Left
|
alignment = LUI.Alignment.Left,
|
||||||
})
|
})
|
||||||
ToggleDemoRecording:addElement(recImage)
|
ToggleDemoRecording:addElement(recImage)
|
||||||
ToggleDemoRecording.recImage = recImage
|
ToggleDemoRecording.recImage = recImage
|
||||||
@ -184,7 +184,7 @@ CoD.PrivateGameLobby.PopulateButtons_Project_Multiplayer = function (PrivateGame
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.UpdateDemoRecordingButton = function (ToggleDemoRecording)
|
CoD.PrivateGameLobby.UpdateDemoRecordingButton = function(ToggleDemoRecording)
|
||||||
if Dvar.demo_recordPrivateMatch:get() then
|
if Dvar.demo_recordPrivateMatch:get() then
|
||||||
ToggleDemoRecording.recImage:setRGB(1, 0, 0)
|
ToggleDemoRecording.recImage:setRGB(1, 0, 0)
|
||||||
ToggleDemoRecording.recText:setText(Engine.Localize("MENU_ON_CAPS"))
|
ToggleDemoRecording.recText:setText(Engine.Localize("MENU_ON_CAPS"))
|
||||||
@ -194,12 +194,12 @@ CoD.PrivateGameLobby.UpdateDemoRecordingButton = function (ToggleDemoRecording)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.DemoRecordingButton_ToggleDemoRecording = function (ToggleDemoRecording, f11_arg1)
|
CoD.PrivateGameLobby.DemoRecordingButton_ToggleDemoRecording = function(ToggleDemoRecording, f11_arg1)
|
||||||
Dvar.demo_recordPrivateMatch:set(not Dvar.demo_recordPrivateMatch:get())
|
Dvar.demo_recordPrivateMatch:set(not Dvar.demo_recordPrivateMatch:get())
|
||||||
CoD.PrivateGameLobby.UpdateDemoRecordingButton(ToggleDemoRecording)
|
CoD.PrivateGameLobby.UpdateDemoRecordingButton(ToggleDemoRecording)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.PopulateFlyoutButtons_Project_Multiplayer = function (PrivateGameLobbyButtonPane)
|
CoD.PrivateGameLobby.PopulateFlyoutButtons_Project_Multiplayer = function(PrivateGameLobbyButtonPane)
|
||||||
if not CoD.isZombie then
|
if not CoD.isZombie then
|
||||||
PrivateGameLobbyButtonPane.body.setupGameFlyoutContainer.changeMapButton = PrivateGameLobbyButtonPane.body.setupGameFlyoutContainer.buttonList:addButton(Engine.Localize("MPUI_CHANGE_MAP_CAPS"))
|
PrivateGameLobbyButtonPane.body.setupGameFlyoutContainer.changeMapButton = PrivateGameLobbyButtonPane.body.setupGameFlyoutContainer.buttonList:addButton(Engine.Localize("MPUI_CHANGE_MAP_CAPS"))
|
||||||
PrivateGameLobbyButtonPane.body.setupGameFlyoutContainer.changeMapButton.hintText = Engine.Localize("MPUI_CHANGE_MAP_DESC")
|
PrivateGameLobbyButtonPane.body.setupGameFlyoutContainer.changeMapButton.hintText = Engine.Localize("MPUI_CHANGE_MAP_DESC")
|
||||||
@ -216,7 +216,7 @@ CoD.PrivateGameLobby.PopulateFlyoutButtons_Project_Multiplayer = function (Priva
|
|||||||
PrivateGameLobbyButtonPane.body.setupGameFlyoutContainer.editGameOptionsButton:registerEventHandler("button_update", CoD.PrivateGameLobby.Button_UpdateHostButton)
|
PrivateGameLobbyButtonPane.body.setupGameFlyoutContainer.editGameOptionsButton:registerEventHandler("button_update", CoD.PrivateGameLobby.Button_UpdateHostButton)
|
||||||
end
|
end
|
||||||
|
|
||||||
local AddGameOptionsButtons = function (PrivateGameLobbyButtonPane, GameOptions, GameOptionsType)
|
local AddGameOptionsButtons = function(PrivateGameLobbyButtonPane, GameOptions, GameOptionsType)
|
||||||
local Gametype = UIExpression.DvarString(nil, "ui_gameType")
|
local Gametype = UIExpression.DvarString(nil, "ui_gameType")
|
||||||
local f13_local1 = 220
|
local f13_local1 = 220
|
||||||
if Gametype == "zcleansed" then
|
if Gametype == "zcleansed" then
|
||||||
@ -266,7 +266,7 @@ local AddGameOptionsButtons = function (PrivateGameLobbyButtonPane, GameOptions,
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.PopulateButtons_Project_Zombie = function (PrivateGameLobbyButtonPane, IsHost)
|
CoD.PrivateGameLobby.PopulateButtons_Project_Zombie = function(PrivateGameLobbyButtonPane, IsHost)
|
||||||
if UIExpression.DvarString(nil, "ui_gametype") == CoD.Zombie.GAMETYPE_ZGRIEF then
|
if UIExpression.DvarString(nil, "ui_gametype") == CoD.Zombie.GAMETYPE_ZGRIEF then
|
||||||
Engine.SetGametypeSetting("allowInGameTeamChange", 1)
|
Engine.SetGametypeSetting("allowInGameTeamChange", 1)
|
||||||
else
|
else
|
||||||
@ -330,34 +330,34 @@ CoD.PrivateGameLobby.PopulateButtons_Project_Zombie = function (PrivateGameLobby
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.ButtonGameLobbyUpdate_Zombie = function (GametypeSettingButton, f14_arg1)
|
CoD.PrivateGameLobby.ButtonGameLobbyUpdate_Zombie = function(GametypeSettingButton, f14_arg1)
|
||||||
GametypeSettingButton:refreshChoice()
|
GametypeSettingButton:refreshChoice()
|
||||||
GametypeSettingButton:dispatchEventToChildren(f14_arg1)
|
GametypeSettingButton:dispatchEventToChildren(f14_arg1)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.ButtonGainFocusZombie = function (GametypeSettingButton, ClientInstance)
|
CoD.PrivateGameLobby.ButtonGainFocusZombie = function(GametypeSettingButton, ClientInstance)
|
||||||
CoD.CoD9Button.GainFocus(GametypeSettingButton, ClientInstance)
|
CoD.CoD9Button.GainFocus(GametypeSettingButton, ClientInstance)
|
||||||
GametypeSettingButton:dispatchEventToParent({
|
GametypeSettingButton:dispatchEventToParent({
|
||||||
name = "enable_sliding_zm",
|
name = "enable_sliding_zm",
|
||||||
enableSliding = false,
|
enableSliding = false,
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.ButtonLoseFocusZombie = function (GametypeSettingButton, ClientInstance)
|
CoD.PrivateGameLobby.ButtonLoseFocusZombie = function(GametypeSettingButton, ClientInstance)
|
||||||
CoD.CoD9Button.LoseFocus(GametypeSettingButton, ClientInstance)
|
CoD.CoD9Button.LoseFocus(GametypeSettingButton, ClientInstance)
|
||||||
GametypeSettingButton:dispatchEventToParent({
|
GametypeSettingButton:dispatchEventToParent({
|
||||||
name = "enable_sliding_zm",
|
name = "enable_sliding_zm",
|
||||||
enableSliding = true,
|
enableSliding = true,
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.EnableSlidingZombie = function (f17_arg0, f17_arg1)
|
CoD.PrivateGameLobby.EnableSlidingZombie = function(f17_arg0, f17_arg1)
|
||||||
f17_arg0.panelManager.slidingEnabled = f17_arg1.enableSliding
|
f17_arg0.panelManager.slidingEnabled = f17_arg1.enableSliding
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.PopulateButtons_Project = function (PrivateGameLobbyButtonPane, IsHost)
|
CoD.PrivateGameLobby.PopulateButtons_Project = function(PrivateGameLobbyButtonPane, IsHost)
|
||||||
if CoD.isZombie == true then
|
if CoD.isZombie == true then
|
||||||
CoD.PrivateGameLobby.PopulateButtons_Project_Zombie(PrivateGameLobbyButtonPane, IsHost)
|
CoD.PrivateGameLobby.PopulateButtons_Project_Zombie(PrivateGameLobbyButtonPane, IsHost)
|
||||||
else
|
else
|
||||||
@ -365,7 +365,7 @@ CoD.PrivateGameLobby.PopulateButtons_Project = function (PrivateGameLobbyButtonP
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local LobbyTeamChangeAllowed = function ()
|
local LobbyTeamChangeAllowed = function()
|
||||||
if Engine.GetGametypeSetting("allowSpectating") == 1 then
|
if Engine.GetGametypeSetting("allowSpectating") == 1 then
|
||||||
return true
|
return true
|
||||||
elseif Engine.GetGametypeSetting("autoTeamBalance") == 1 then
|
elseif Engine.GetGametypeSetting("autoTeamBalance") == 1 then
|
||||||
@ -381,7 +381,7 @@ local LobbyTeamChangeAllowed = function ()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.PopulateButtonPrompts_Project = function (PrivateGameLobbyWidget)
|
CoD.PrivateGameLobby.PopulateButtonPrompts_Project = function(PrivateGameLobbyWidget)
|
||||||
if PrivateGameLobbyWidget.cycleTeamButtonPrompt ~= nil then
|
if PrivateGameLobbyWidget.cycleTeamButtonPrompt ~= nil then
|
||||||
PrivateGameLobbyWidget.cycleTeamButtonPrompt:close()
|
PrivateGameLobbyWidget.cycleTeamButtonPrompt:close()
|
||||||
end
|
end
|
||||||
@ -398,7 +398,7 @@ CoD.PrivateGameLobby.PopulateButtonPrompts_Project = function (PrivateGameLobbyW
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.LeaveLobby_Project_Multiplayer = function (PrivateGameLobbyWidget, ClientInstance)
|
CoD.PrivateGameLobby.LeaveLobby_Project_Multiplayer = function(PrivateGameLobbyWidget, ClientInstance)
|
||||||
Engine.SetDvar("invite_visible", 1)
|
Engine.SetDvar("invite_visible", 1)
|
||||||
Engine.SetGametype(Dvar.ui_gametype:get())
|
Engine.SetGametype(Dvar.ui_gametype:get())
|
||||||
if Engine.SessionModeIsMode(CoD.SESSIONMODE_OFFLINE) == true or Engine.SessionModeIsMode(CoD.SESSIONMODE_SYSTEMLINK) == true then
|
if Engine.SessionModeIsMode(CoD.SESSIONMODE_OFFLINE) == true or Engine.SessionModeIsMode(CoD.SESSIONMODE_SYSTEMLINK) == true then
|
||||||
@ -422,20 +422,20 @@ CoD.PrivateGameLobby.LeaveLobby_Project_Multiplayer = function (PrivateGameLobby
|
|||||||
end
|
end
|
||||||
Engine.SessionModeSetPrivate(false)
|
Engine.SessionModeSetPrivate(false)
|
||||||
PrivateGameLobbyWidget:processEvent({
|
PrivateGameLobbyWidget:processEvent({
|
||||||
name = "lose_host"
|
name = "lose_host",
|
||||||
})
|
})
|
||||||
PrivateGameLobbyWidget:goBack(ClientInstance)
|
PrivateGameLobbyWidget:goBack(ClientInstance)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.LeaveLobby_Project_Zombie_After_Animation = function (PrivateGameLobbyWidget, ClientInstance)
|
CoD.PrivateGameLobby.LeaveLobby_Project_Zombie_After_Animation = function(PrivateGameLobbyWidget, ClientInstance)
|
||||||
CoD.PrivateGameLobby.LeaveLobby_Project_Multiplayer(PrivateGameLobbyWidget, {
|
CoD.PrivateGameLobby.LeaveLobby_Project_Multiplayer(PrivateGameLobbyWidget, {
|
||||||
name = PrivateGameLobbyWidget.leaveType,
|
name = PrivateGameLobbyWidget.leaveType,
|
||||||
controller = ClientInstance.controller
|
controller = ClientInstance.controller,
|
||||||
})
|
})
|
||||||
PrivateGameLobbyWidget.leaveType = nil
|
PrivateGameLobbyWidget.leaveType = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.LeaveLobby_Project_Zombie = function (PrivateGameLobbyWidget, ClientInstance)
|
CoD.PrivateGameLobby.LeaveLobby_Project_Zombie = function(PrivateGameLobbyWidget, ClientInstance)
|
||||||
PrivateGameLobbyWidget.leaveType = ClientInstance.name
|
PrivateGameLobbyWidget.leaveType = ClientInstance.name
|
||||||
CoD.GameGlobeZombie.gameGlobe.currentMenu = PrivateGameLobbyWidget
|
CoD.GameGlobeZombie.gameGlobe.currentMenu = PrivateGameLobbyWidget
|
||||||
if PrivateGameLobbyWidget.menuName == "TheaterLobby" then
|
if PrivateGameLobbyWidget.menuName == "TheaterLobby" then
|
||||||
@ -446,7 +446,7 @@ CoD.PrivateGameLobby.LeaveLobby_Project_Zombie = function (PrivateGameLobbyWidge
|
|||||||
CoD.PrivateGameLobby.LeaveLobby_Project_Zombie_After_Animation(PrivateGameLobbyWidget, ClientInstance)
|
CoD.PrivateGameLobby.LeaveLobby_Project_Zombie_After_Animation(PrivateGameLobbyWidget, ClientInstance)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.LeaveLobby_Project = function (PrivateGameLobbyWidget, ClientInstance)
|
CoD.PrivateGameLobby.LeaveLobby_Project = function(PrivateGameLobbyWidget, ClientInstance)
|
||||||
if CoD.isZombie == true then
|
if CoD.isZombie == true then
|
||||||
CoD.PrivateGameLobby.LeaveLobby_Project_Zombie(PrivateGameLobbyWidget, ClientInstance)
|
CoD.PrivateGameLobby.LeaveLobby_Project_Zombie(PrivateGameLobbyWidget, ClientInstance)
|
||||||
else
|
else
|
||||||
@ -454,7 +454,7 @@ CoD.PrivateGameLobby.LeaveLobby_Project = function (PrivateGameLobbyWidget, Clie
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.OpenChangeStartLoc = function (PrivateGameLobbyWidget, ClientInstance)
|
CoD.PrivateGameLobby.OpenChangeStartLoc = function(PrivateGameLobbyWidget, ClientInstance)
|
||||||
Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_SELECTING_GAMETYPE)
|
Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_SELECTING_GAMETYPE)
|
||||||
Engine.SetDvar("ui_game_lobby_open", 1)
|
Engine.SetDvar("ui_game_lobby_open", 1)
|
||||||
if UIExpression.DvarString(nil, "ui_gameType") == "zclassic" then
|
if UIExpression.DvarString(nil, "ui_gameType") == "zclassic" then
|
||||||
@ -470,7 +470,7 @@ CoD.PrivateGameLobby.OpenChangeStartLoc = function (PrivateGameLobbyWidget, Clie
|
|||||||
PrivateGameLobbyWidget:close()
|
PrivateGameLobbyWidget:close()
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.OpenSetupGameFlyout = function (PrivateGameLobbyWidget, f28_arg1)
|
CoD.PrivateGameLobby.OpenSetupGameFlyout = function(PrivateGameLobbyWidget, f28_arg1)
|
||||||
if PrivateGameLobbyWidget.buttonPane ~= nil and PrivateGameLobbyWidget.buttonPane.body ~= nil then
|
if PrivateGameLobbyWidget.buttonPane ~= nil and PrivateGameLobbyWidget.buttonPane.body ~= nil then
|
||||||
CoD.PrivateGameLobby.RemoveSetupGameFlyout(PrivateGameLobbyWidget.buttonPane)
|
CoD.PrivateGameLobby.RemoveSetupGameFlyout(PrivateGameLobbyWidget.buttonPane)
|
||||||
CoD.PrivateGameLobby.AddSetupGameFlyout(PrivateGameLobbyWidget.buttonPane)
|
CoD.PrivateGameLobby.AddSetupGameFlyout(PrivateGameLobbyWidget.buttonPane)
|
||||||
@ -478,13 +478,13 @@ CoD.PrivateGameLobby.OpenSetupGameFlyout = function (PrivateGameLobbyWidget, f28
|
|||||||
CoD.ButtonList.DisableInput(PrivateGameLobbyWidget.buttonPane.body.buttonList)
|
CoD.ButtonList.DisableInput(PrivateGameLobbyWidget.buttonPane.body.buttonList)
|
||||||
PrivateGameLobbyWidget.buttonPane.body.buttonList:animateToState("disabled")
|
PrivateGameLobbyWidget.buttonPane.body.buttonList:animateToState("disabled")
|
||||||
PrivateGameLobbyWidget.buttonPane.body.setupGameFlyoutContainer:processEvent({
|
PrivateGameLobbyWidget.buttonPane.body.setupGameFlyoutContainer:processEvent({
|
||||||
name = "gain_focus"
|
name = "gain_focus",
|
||||||
})
|
})
|
||||||
PrivateGameLobbyWidget:registerEventHandler("button_prompt_back", CoD.PrivateGameLobby.CloseSetupGameFlyout)
|
PrivateGameLobbyWidget:registerEventHandler("button_prompt_back", CoD.PrivateGameLobby.CloseSetupGameFlyout)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.CloseSetupGameFlyout = function (PrivateGameLobbyWidget, f29_arg1)
|
CoD.PrivateGameLobby.CloseSetupGameFlyout = function(PrivateGameLobbyWidget, f29_arg1)
|
||||||
if PrivateGameLobbyWidget.buttonPane ~= nil and PrivateGameLobbyWidget.buttonPane.body ~= nil and PrivateGameLobbyWidget.buttonPane.body.setupGameFlyoutContainer ~= nil then
|
if PrivateGameLobbyWidget.buttonPane ~= nil and PrivateGameLobbyWidget.buttonPane.body ~= nil and PrivateGameLobbyWidget.buttonPane.body.setupGameFlyoutContainer ~= nil then
|
||||||
CoD.PrivateGameLobby.RemoveSetupGameFlyout(PrivateGameLobbyWidget.buttonPane)
|
CoD.PrivateGameLobby.RemoveSetupGameFlyout(PrivateGameLobbyWidget.buttonPane)
|
||||||
CoD.ButtonList.EnableInput(PrivateGameLobbyWidget.buttonPane.body.buttonList)
|
CoD.ButtonList.EnableInput(PrivateGameLobbyWidget.buttonPane.body.buttonList)
|
||||||
@ -495,41 +495,41 @@ CoD.PrivateGameLobby.CloseSetupGameFlyout = function (PrivateGameLobbyWidget, f2
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.OpenBotsMenu = function (PrivateGameLobbyWidget, ClientInstance)
|
CoD.PrivateGameLobby.OpenBotsMenu = function(PrivateGameLobbyWidget, ClientInstance)
|
||||||
Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_EDITING_GAME_OPTIONS)
|
Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_EDITING_GAME_OPTIONS)
|
||||||
PrivateGameLobbyWidget:openPopup("EditBotOptions", ClientInstance.controller)
|
PrivateGameLobbyWidget:openPopup("EditBotOptions", ClientInstance.controller)
|
||||||
Engine.PlaySound("cac_screen_fade")
|
Engine.PlaySound("cac_screen_fade")
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.OpenChangeMap = function (PrivateGameLobbyWidget, ClientInstance)
|
CoD.PrivateGameLobby.OpenChangeMap = function(PrivateGameLobbyWidget, ClientInstance)
|
||||||
Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_SELECTING_MAP)
|
Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_SELECTING_MAP)
|
||||||
PrivateGameLobbyWidget:openPopup("ChangeMap", ClientInstance.controller)
|
PrivateGameLobbyWidget:openPopup("ChangeMap", ClientInstance.controller)
|
||||||
Engine.PlaySound("cac_screen_fade")
|
Engine.PlaySound("cac_screen_fade")
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.OpenChangeGameMode = function (PrivateGameLobbyWidget, ClientInstance)
|
CoD.PrivateGameLobby.OpenChangeGameMode = function(PrivateGameLobbyWidget, ClientInstance)
|
||||||
Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_SELECTING_GAMETYPE)
|
Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_SELECTING_GAMETYPE)
|
||||||
PrivateGameLobbyWidget:openPopup("ChangeGameMode", ClientInstance.controller)
|
PrivateGameLobbyWidget:openPopup("ChangeGameMode", ClientInstance.controller)
|
||||||
Engine.PlaySound("cac_screen_fade")
|
Engine.PlaySound("cac_screen_fade")
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.OpenEditGameOptionsMenu = function (PrivateGameLobbyWidget, ClientInstance)
|
CoD.PrivateGameLobby.OpenEditGameOptionsMenu = function(PrivateGameLobbyWidget, ClientInstance)
|
||||||
Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_EDITING_GAME_OPTIONS)
|
Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_EDITING_GAME_OPTIONS)
|
||||||
PrivateGameLobbyWidget:openPopup("EditGameOptions", ClientInstance.controller)
|
PrivateGameLobbyWidget:openPopup("EditGameOptions", ClientInstance.controller)
|
||||||
Engine.PlaySound("cac_screen_fade")
|
Engine.PlaySound("cac_screen_fade")
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.OpenViewGameOptionsMenu = function (PrivateGameLobbyWidget, ClientInstance)
|
CoD.PrivateGameLobby.OpenViewGameOptionsMenu = function(PrivateGameLobbyWidget, ClientInstance)
|
||||||
Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_EDITING_GAME_OPTIONS)
|
Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_EDITING_GAME_OPTIONS)
|
||||||
PrivateGameLobbyWidget:openPopup("ViewGameOptions", ClientInstance.controller)
|
PrivateGameLobbyWidget:openPopup("ViewGameOptions", ClientInstance.controller)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.CloseAllPopups = function (PrivateGameLobbyWidget, ClientInstance)
|
CoD.PrivateGameLobby.CloseAllPopups = function(PrivateGameLobbyWidget, ClientInstance)
|
||||||
CoD.PrivateGameLobby.CloseSetupGameFlyout(PrivateGameLobbyWidget, ClientInstance)
|
CoD.PrivateGameLobby.CloseSetupGameFlyout(PrivateGameLobbyWidget, ClientInstance)
|
||||||
CoD.Menu.MenuChanged(PrivateGameLobbyWidget, ClientInstance)
|
CoD.Menu.MenuChanged(PrivateGameLobbyWidget, ClientInstance)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.PrivateGameLobby.RegisterEventHandler_Project = function (PrivateGameLobbyWidget)
|
CoD.PrivateGameLobby.RegisterEventHandler_Project = function(PrivateGameLobbyWidget)
|
||||||
if CoD.isZombie == true then
|
if CoD.isZombie == true then
|
||||||
PrivateGameLobbyWidget:registerEventHandler("open_change_startLoc", CoD.PrivateGameLobby.OpenChangeStartLoc)
|
PrivateGameLobbyWidget:registerEventHandler("open_change_startLoc", CoD.PrivateGameLobby.OpenChangeStartLoc)
|
||||||
PrivateGameLobbyWidget:registerEventHandler("open_setup_game_flyout", CoD.PrivateGameLobby.OpenSetupGameFlyout)
|
PrivateGameLobbyWidget:registerEventHandler("open_setup_game_flyout", CoD.PrivateGameLobby.OpenSetupGameFlyout)
|
||||||
@ -546,4 +546,4 @@ CoD.PrivateGameLobby.RegisterEventHandler_Project = function (PrivateGameLobbyWi
|
|||||||
PrivateGameLobbyWidget:registerEventHandler("open_viewGameOptions_menu", CoD.PrivateGameLobby.OpenViewGameOptionsMenu)
|
PrivateGameLobbyWidget:registerEventHandler("open_viewGameOptions_menu", CoD.PrivateGameLobby.OpenViewGameOptionsMenu)
|
||||||
PrivateGameLobbyWidget:registerEventHandler("close_all_popups", CoD.PrivateGameLobby.CloseAllPopups)
|
PrivateGameLobbyWidget:registerEventHandler("close_all_popups", CoD.PrivateGameLobby.CloseAllPopups)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -17,7 +17,7 @@ CoD.AmmoAreaZombie.CircleSize = 128
|
|||||||
CoD.AmmoAreaZombie.InventoryIconSize = 64
|
CoD.AmmoAreaZombie.InventoryIconSize = 64
|
||||||
CoD.AmmoAreaZombie.InventoryIconEnabledAlpha = 1
|
CoD.AmmoAreaZombie.InventoryIconEnabledAlpha = 1
|
||||||
CoD.AmmoAreaZombie.InventoryAnimationDuration = 250
|
CoD.AmmoAreaZombie.InventoryAnimationDuration = 250
|
||||||
LUI.createMenu.AmmoAreaZombie = function (f1_arg0)
|
LUI.createMenu.AmmoAreaZombie = function(f1_arg0)
|
||||||
local f1_local0 = CoD.Menu.NewSafeAreaFromState("AmmoAreaZombie", f1_arg0)
|
local f1_local0 = CoD.Menu.NewSafeAreaFromState("AmmoAreaZombie", f1_arg0)
|
||||||
f1_local0:setOwner(f1_arg0)
|
f1_local0:setOwner(f1_arg0)
|
||||||
f1_local0.scaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier)
|
f1_local0.scaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier)
|
||||||
@ -167,7 +167,7 @@ LUI.createMenu.AmmoAreaZombie = function (f1_arg0)
|
|||||||
return f1_local0
|
return f1_local0
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
CoD.AmmoAreaZombie.UpdateActionSlots = function(f2_arg0, f2_arg1)
|
||||||
if f2_arg0.actionSlots == nil then
|
if f2_arg0.actionSlots == nil then
|
||||||
f2_arg0.actionSlots = {}
|
f2_arg0.actionSlots = {}
|
||||||
else
|
else
|
||||||
@ -195,7 +195,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
leftAnchor = false,
|
leftAnchor = false,
|
||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
rightAnchor = false,
|
rightAnchor = false,
|
||||||
bottomAnchor = false
|
bottomAnchor = false,
|
||||||
}
|
}
|
||||||
elseif f2_local4 == 2 then
|
elseif f2_local4 == 2 then
|
||||||
f2_local7 = {
|
f2_local7 = {
|
||||||
@ -206,7 +206,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
leftAnchor = false,
|
leftAnchor = false,
|
||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
rightAnchor = false,
|
rightAnchor = false,
|
||||||
bottomAnchor = true
|
bottomAnchor = true,
|
||||||
}
|
}
|
||||||
elseif f2_local4 == 3 then
|
elseif f2_local4 == 3 then
|
||||||
f2_local7 = {
|
f2_local7 = {
|
||||||
@ -217,7 +217,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
leftAnchor = true,
|
leftAnchor = true,
|
||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
rightAnchor = false,
|
rightAnchor = false,
|
||||||
bottomAnchor = false
|
bottomAnchor = false,
|
||||||
}
|
}
|
||||||
elseif f2_local4 == 4 then
|
elseif f2_local4 == 4 then
|
||||||
f2_local7 = {
|
f2_local7 = {
|
||||||
@ -228,7 +228,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
leftAnchor = false,
|
leftAnchor = false,
|
||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
rightAnchor = true,
|
rightAnchor = true,
|
||||||
bottomAnchor = false
|
bottomAnchor = false,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
if f2_local7 ~= nil then
|
if f2_local7 ~= nil then
|
||||||
@ -265,7 +265,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
top = -f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
top = -f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
||||||
bottom = f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
bottom = f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
||||||
alignment = LUI.Alignment.Right
|
alignment = LUI.Alignment.Right,
|
||||||
}
|
}
|
||||||
elseif f2_local4 == 3 then
|
elseif f2_local4 == 3 then
|
||||||
f2_local11 = {
|
f2_local11 = {
|
||||||
@ -277,7 +277,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
top = -f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
top = -f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
||||||
bottom = f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
bottom = f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
||||||
alignment = LUI.Alignment.Right
|
alignment = LUI.Alignment.Right,
|
||||||
}
|
}
|
||||||
elseif f2_local4 == 2 then
|
elseif f2_local4 == 2 then
|
||||||
f2_local11 = {
|
f2_local11 = {
|
||||||
@ -289,7 +289,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
top = -f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
top = -f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
||||||
bottom = f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
bottom = f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
||||||
alignment = LUI.Alignment.Right
|
alignment = LUI.Alignment.Right,
|
||||||
}
|
}
|
||||||
elseif f2_local4 == 4 then
|
elseif f2_local4 == 4 then
|
||||||
f2_local11 = {
|
f2_local11 = {
|
||||||
@ -301,7 +301,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
top = -f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
top = -f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
||||||
bottom = f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
bottom = f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10,
|
||||||
alignment = LUI.Alignment.Right
|
alignment = LUI.Alignment.Right,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
if f2_local11 ~= nil then
|
if f2_local11 ~= nil then
|
||||||
@ -317,11 +317,11 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
Widget:addElement(Widget.keyPrompt)
|
Widget:addElement(Widget.keyPrompt)
|
||||||
if CoD.useController and Engine.LastInput_Gamepad() or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then
|
if CoD.useController and Engine.LastInput_Gamepad() or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then
|
||||||
CoD.AmmoAreaZombie.ActionSlotInputSourceChanged(Widget, {
|
CoD.AmmoAreaZombie.ActionSlotInputSourceChanged(Widget, {
|
||||||
source = 0
|
source = 0,
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
CoD.AmmoAreaZombie.ActionSlotInputSourceChanged(Widget, {
|
CoD.AmmoAreaZombie.ActionSlotInputSourceChanged(Widget, {
|
||||||
source = 1
|
source = 1,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -331,7 +331,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.UpdateInventoryWeapon = function (f3_arg0, f3_arg1)
|
CoD.AmmoAreaZombie.UpdateInventoryWeapon = function(f3_arg0, f3_arg1)
|
||||||
local f3_local0 = f3_arg0.inventoryWeapon
|
local f3_local0 = f3_arg0.inventoryWeapon
|
||||||
local f3_local1 = nil
|
local f3_local1 = nil
|
||||||
if f3_arg1.teleported ~= true then
|
if f3_arg1.teleported ~= true then
|
||||||
@ -347,7 +347,7 @@ CoD.AmmoAreaZombie.UpdateInventoryWeapon = function (f3_arg0, f3_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.UpdateFading = function (f4_arg0, f4_arg1)
|
CoD.AmmoAreaZombie.UpdateFading = function(f4_arg0, f4_arg1)
|
||||||
if UIExpression.IsVisibilityBitSet(controller, CoD.BIT_HUD_VISIBLE) == 1 then
|
if UIExpression.IsVisibilityBitSet(controller, CoD.BIT_HUD_VISIBLE) == 1 then
|
||||||
if f4_arg1.alpha == 0 then
|
if f4_arg1.alpha == 0 then
|
||||||
f4_arg0:beginAnimation("fading", 500)
|
f4_arg0:beginAnimation("fading", 500)
|
||||||
@ -356,14 +356,14 @@ CoD.AmmoAreaZombie.UpdateFading = function (f4_arg0, f4_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.GetThreeDigits = function (f5_arg0)
|
CoD.AmmoAreaZombie.GetThreeDigits = function(f5_arg0)
|
||||||
local f5_local0 = math.floor(f5_arg0 / 100)
|
local f5_local0 = math.floor(f5_arg0 / 100)
|
||||||
f5_arg0 = f5_arg0 - f5_local0 * 100
|
f5_arg0 = f5_arg0 - f5_local0 * 100
|
||||||
local f5_local1 = math.floor(f5_arg0 / 10)
|
local f5_local1 = math.floor(f5_arg0 / 10)
|
||||||
return f5_local0, f5_local1, f5_arg0 - f5_local1 * 10
|
return f5_local0, f5_local1, f5_arg0 - f5_local1 * 10
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.UpdateAmmo = function (f6_arg0, f6_arg1)
|
CoD.AmmoAreaZombie.UpdateAmmo = function(f6_arg0, f6_arg1)
|
||||||
if f6_arg1.ammoInClip == 0 and f6_arg1.ammoStock == 0 and f6_arg1.lowClip ~= true then
|
if f6_arg1.ammoInClip == 0 and f6_arg1.ammoStock == 0 and f6_arg1.lowClip ~= true then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -471,11 +471,9 @@ CoD.AmmoAreaZombie.UpdateAmmo = function (f6_arg0, f6_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.UpdateFuel = function (f7_arg0, f7_arg1)
|
CoD.AmmoAreaZombie.UpdateFuel = function(f7_arg0, f7_arg1) end
|
||||||
|
|
||||||
end
|
CoD.AmmoAreaZombie.UpdateOverheat = function(f8_arg0, f8_arg1)
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.UpdateOverheat = function (f8_arg0, f8_arg1)
|
|
||||||
if CoD.AmmoAreaZombie.ShouldHideOverheatCounter(f8_arg0, f8_arg1) then
|
if CoD.AmmoAreaZombie.ShouldHideOverheatCounter(f8_arg0, f8_arg1) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -549,7 +547,7 @@ CoD.AmmoAreaZombie.UpdateOverheat = function (f8_arg0, f8_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.UpdateVisibility = function (f9_arg0, f9_arg1)
|
CoD.AmmoAreaZombie.UpdateVisibility = function(f9_arg0, f9_arg1)
|
||||||
local f9_local0 = f9_arg1.controller
|
local f9_local0 = f9_arg1.controller
|
||||||
if UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IS_PLAYER_IN_AFTERLIFE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_GAME_ENDED) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IN_KILLCAM) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_HUD_HARDCORE) == 0 and (not CoD.IsShoutcaster(f9_local0) or CoD.ExeProfileVarBool(f9_local0, "shoutcaster_inventory") and Engine.IsSpectatingActiveClient(f9_local0)) and CoD.FSM_VISIBILITY(f9_local0) == 0 then
|
if UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IS_PLAYER_IN_AFTERLIFE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_GAME_ENDED) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IN_KILLCAM) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_HUD_HARDCORE) == 0 and (not CoD.IsShoutcaster(f9_local0) or CoD.ExeProfileVarBool(f9_local0, "shoutcaster_inventory") and Engine.IsSpectatingActiveClient(f9_local0)) and CoD.FSM_VISIBILITY(f9_local0) == 0 then
|
||||||
if f9_arg0.visible ~= true then
|
if f9_arg0.visible ~= true then
|
||||||
@ -564,7 +562,7 @@ CoD.AmmoAreaZombie.UpdateVisibility = function (f9_arg0, f9_arg1)
|
|||||||
CoD.AmmoAreaZombie.UpdateAmmoVisibility(f9_arg0, f9_arg1)
|
CoD.AmmoAreaZombie.UpdateAmmoVisibility(f9_arg0, f9_arg1)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.ShouldHideAmmoCounter = function (f10_arg0, f10_arg1)
|
CoD.AmmoAreaZombie.ShouldHideAmmoCounter = function(f10_arg0, f10_arg1)
|
||||||
if f10_arg0.weapon ~= nil then
|
if f10_arg0.weapon ~= nil then
|
||||||
if Engine.IsWeaponType(f10_arg0.weapon, "melee") then
|
if Engine.IsWeaponType(f10_arg0.weapon, "melee") then
|
||||||
return true
|
return true
|
||||||
@ -575,7 +573,7 @@ CoD.AmmoAreaZombie.ShouldHideAmmoCounter = function (f10_arg0, f10_arg1)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.ShouldHideOverheatCounter = function (f10_arg0, f10_arg1)
|
CoD.AmmoAreaZombie.ShouldHideOverheatCounter = function(f10_arg0, f10_arg1)
|
||||||
if f10_arg0.weapon ~= nil then
|
if f10_arg0.weapon ~= nil then
|
||||||
if CoD.isZombie == true and (Engine.IsWeaponType(f10_arg0.weapon, "gas") or Engine.IsOverheatWeapon(f10_arg0.weapon)) then
|
if CoD.isZombie == true and (Engine.IsWeaponType(f10_arg0.weapon, "gas") or Engine.IsOverheatWeapon(f10_arg0.weapon)) then
|
||||||
return false
|
return false
|
||||||
@ -584,7 +582,7 @@ CoD.AmmoAreaZombie.ShouldHideOverheatCounter = function (f10_arg0, f10_arg1)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.UpdateAmmoVisibility = function (f11_arg0, f11_arg1)
|
CoD.AmmoAreaZombie.UpdateAmmoVisibility = function(f11_arg0, f11_arg1)
|
||||||
if f11_arg1.weapon ~= nil then
|
if f11_arg1.weapon ~= nil then
|
||||||
f11_arg0.weapon = f11_arg1.weapon
|
f11_arg0.weapon = f11_arg1.weapon
|
||||||
end
|
end
|
||||||
@ -595,7 +593,7 @@ CoD.AmmoAreaZombie.UpdateAmmoVisibility = function (f11_arg0, f11_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.UpdateWeapon = function (f12_arg0, f12_arg1)
|
CoD.AmmoAreaZombie.UpdateWeapon = function(f12_arg0, f12_arg1)
|
||||||
if f12_arg1.weapon and (Engine.IsWeaponType(f12_arg1.weapon, "melee") or Engine.IsWeaponType(f12_arg1.weapon, "riotshield") or Engine.IsWeaponType(f12_arg1.weapon, "grenade")) then
|
if f12_arg1.weapon and (Engine.IsWeaponType(f12_arg1.weapon, "melee") or Engine.IsWeaponType(f12_arg1.weapon, "riotshield") or Engine.IsWeaponType(f12_arg1.weapon, "grenade")) then
|
||||||
f12_arg0.hideAmmo = true
|
f12_arg0.hideAmmo = true
|
||||||
else
|
else
|
||||||
@ -605,7 +603,7 @@ CoD.AmmoAreaZombie.UpdateWeapon = function (f12_arg0, f12_arg1)
|
|||||||
f12_arg0:dispatchEventToChildren(f12_arg1)
|
f12_arg0:dispatchEventToChildren(f12_arg1)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.UpdateWeaponSelect = function (f13_arg0, f13_arg1)
|
CoD.AmmoAreaZombie.UpdateWeaponSelect = function(f13_arg0, f13_arg1)
|
||||||
f13_arg0.weaponLabelContainer:setAlpha(1)
|
f13_arg0.weaponLabelContainer:setAlpha(1)
|
||||||
local f13_local0 = UIExpression.ToUpper(nil, Engine.Localize(f13_arg1.weaponDisplayName))
|
local f13_local0 = UIExpression.ToUpper(nil, Engine.Localize(f13_arg1.weaponDisplayName))
|
||||||
if CoD.isZombie == true then
|
if CoD.isZombie == true then
|
||||||
@ -616,7 +614,7 @@ CoD.AmmoAreaZombie.UpdateWeaponSelect = function (f13_arg0, f13_arg1)
|
|||||||
f13_arg0:dispatchEventToChildren(f13_arg1)
|
f13_arg0:dispatchEventToChildren(f13_arg1)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.SetKeyBind = function (f14_arg0)
|
CoD.AmmoAreaZombie.SetKeyBind = function(f14_arg0)
|
||||||
local f14_local0, f14_local1 = nil
|
local f14_local0, f14_local1 = nil
|
||||||
if f14_arg0.keyPrompt ~= nil and f14_arg0.slotIndex ~= nil then
|
if f14_arg0.keyPrompt ~= nil and f14_arg0.slotIndex ~= nil then
|
||||||
if f14_arg0.slotIndex == 4 then
|
if f14_arg0.slotIndex == 4 then
|
||||||
@ -634,7 +632,7 @@ CoD.AmmoAreaZombie.SetKeyBind = function (f14_arg0)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.ActionSlotInputSourceChanged = function (f15_arg0, f15_arg1)
|
CoD.AmmoAreaZombie.ActionSlotInputSourceChanged = function(f15_arg0, f15_arg1)
|
||||||
if CoD.isPC then
|
if CoD.isPC then
|
||||||
if CoD.useController and f15_arg1.source == 0 or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then
|
if CoD.useController and f15_arg1.source == 0 or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then
|
||||||
f15_arg0:animateToState("default")
|
f15_arg0:animateToState("default")
|
||||||
@ -651,7 +649,7 @@ CoD.AmmoAreaZombie.ActionSlotInputSourceChanged = function (f15_arg0, f15_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.AmmoAreaZombie.InputSourceChanged = function (f16_arg0, f16_arg1)
|
CoD.AmmoAreaZombie.InputSourceChanged = function(f16_arg0, f16_arg1)
|
||||||
if CoD.isPC then
|
if CoD.isPC then
|
||||||
if f16_arg0.carouselArrows ~= nil then
|
if f16_arg0.carouselArrows ~= nil then
|
||||||
f16_arg0.carouselArrows:setAlpha(1)
|
f16_arg0.carouselArrows:setAlpha(1)
|
||||||
@ -665,4 +663,4 @@ CoD.AmmoAreaZombie.InputSourceChanged = function (f16_arg0, f16_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -7,7 +7,7 @@ CoD.HudAfterlifeDisplay.IconHeight = CoD.HudAfterlifeDisplay.IconWidth / CoD.Hud
|
|||||||
CoD.HudAfterlifeDisplay.InventoryWidth = 64
|
CoD.HudAfterlifeDisplay.InventoryWidth = 64
|
||||||
CoD.HudAfterlifeDisplay.InventoryHeight = CoD.HudAfterlifeDisplay.InventoryWidth / CoD.HudAfterlifeDisplay.IconRatio
|
CoD.HudAfterlifeDisplay.InventoryHeight = CoD.HudAfterlifeDisplay.InventoryWidth / CoD.HudAfterlifeDisplay.IconRatio
|
||||||
CoD.HudAfterlifeDisplay.PULSE_DURATION = 3000
|
CoD.HudAfterlifeDisplay.PULSE_DURATION = 3000
|
||||||
LUI.createMenu.AfterlifeArea = function (f1_arg0)
|
LUI.createMenu.AfterlifeArea = function(f1_arg0)
|
||||||
local f1_local0 = CoD.Menu.NewSafeAreaFromState("AfterlifeArea", f1_arg0)
|
local f1_local0 = CoD.Menu.NewSafeAreaFromState("AfterlifeArea", f1_arg0)
|
||||||
f1_local0:setOwner(f1_arg0)
|
f1_local0:setOwner(f1_arg0)
|
||||||
CoD.HudAfterlifeDisplay.AfterlifeMeterMaterial = RegisterMaterial("hud_zombie_afterlife_meter")
|
CoD.HudAfterlifeDisplay.AfterlifeMeterMaterial = RegisterMaterial("hud_zombie_afterlife_meter")
|
||||||
@ -95,7 +95,7 @@ LUI.createMenu.AfterlifeArea = function (f1_arg0)
|
|||||||
return f1_local0
|
return f1_local0
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.HudAfterlifeDisplay.UpdateVisibility = function (f2_arg0, f2_arg1)
|
CoD.HudAfterlifeDisplay.UpdateVisibility = function(f2_arg0, f2_arg1)
|
||||||
local f2_local0 = f2_arg1.controller
|
local f2_local0 = f2_arg1.controller
|
||||||
if UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_SCOPED) == 0 and (not CoD.IsShoutcaster(f2_local0) or CoD.ExeProfileVarBool(f2_local0, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(f2_local0)) and CoD.FSM_VISIBILITY(f2_local0) == 0 then
|
if UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_SCOPED) == 0 and (not CoD.IsShoutcaster(f2_local0) or CoD.ExeProfileVarBool(f2_local0, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(f2_local0)) and CoD.FSM_VISIBILITY(f2_local0) == 0 then
|
||||||
if f2_arg0.visible ~= true then
|
if f2_arg0.visible ~= true then
|
||||||
@ -111,7 +111,7 @@ CoD.HudAfterlifeDisplay.UpdateVisibility = function (f2_arg0, f2_arg1)
|
|||||||
f2_arg0:dispatchEventToChildren(f2_arg1)
|
f2_arg0:dispatchEventToChildren(f2_arg1)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.HudAfterlifeDisplay.UpdatePlayerLives = function (f3_arg0, f3_arg1)
|
CoD.HudAfterlifeDisplay.UpdatePlayerLives = function(f3_arg0, f3_arg1)
|
||||||
f3_arg0.afterlifeInventoryCount:setText(f3_arg1.newValue)
|
f3_arg0.afterlifeInventoryCount:setText(f3_arg1.newValue)
|
||||||
if f3_arg1.oldValue < f3_arg1.newValue then
|
if f3_arg1.oldValue < f3_arg1.newValue then
|
||||||
if f3_arg0.afterLifeInventoryContainer.alternatorTimer then
|
if f3_arg0.afterLifeInventoryContainer.alternatorTimer then
|
||||||
@ -121,7 +121,7 @@ CoD.HudAfterlifeDisplay.UpdatePlayerLives = function (f3_arg0, f3_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.HudAfterlifeDisplay.UpdatePlayerInAfterlife = function (f4_arg0, f4_arg1)
|
CoD.HudAfterlifeDisplay.UpdatePlayerInAfterlife = function(f4_arg0, f4_arg1)
|
||||||
local f4_local0 = f4_arg0.entNum ~= f4_arg1.entNum
|
local f4_local0 = f4_arg0.entNum ~= f4_arg1.entNum
|
||||||
f4_arg0.entNum = f4_arg1.entNum
|
f4_arg0.entNum = f4_arg1.entNum
|
||||||
if f4_arg1.newValue == 1 then
|
if f4_arg1.newValue == 1 then
|
||||||
@ -141,7 +141,7 @@ CoD.HudAfterlifeDisplay.UpdatePlayerInAfterlife = function (f4_arg0, f4_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.HudAfterlifeDisplay.UpdateAfterlifeMana = function (f5_arg0, f5_arg1)
|
CoD.HudAfterlifeDisplay.UpdateAfterlifeMana = function(f5_arg0, f5_arg1)
|
||||||
local f5_local0 = f5_arg0.entNum ~= f5_arg1.entNum
|
local f5_local0 = f5_arg0.entNum ~= f5_arg1.entNum
|
||||||
f5_arg0.afterlifeIcon:completeAnimation()
|
f5_arg0.afterlifeIcon:completeAnimation()
|
||||||
if f5_arg1.newValue ~= 0 and f5_arg1.wasDemoJump == false and f5_local0 == false then
|
if f5_arg1.newValue ~= 0 and f5_arg1.wasDemoJump == false and f5_local0 == false then
|
||||||
@ -150,7 +150,7 @@ CoD.HudAfterlifeDisplay.UpdateAfterlifeMana = function (f5_arg0, f5_arg1)
|
|||||||
f5_arg0.afterlifeIcon:setShaderVector(0, f5_arg1.newValue, 0, 0, 0)
|
f5_arg0.afterlifeIcon:setShaderVector(0, f5_arg1.newValue, 0, 0, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.HudAfterlifeDisplay.UpdateAfterlifeWaypoint = function (f6_arg0, f6_arg1)
|
CoD.HudAfterlifeDisplay.UpdateAfterlifeWaypoint = function(f6_arg0, f6_arg1)
|
||||||
local f6_local0 = f6_arg1.newValue
|
local f6_local0 = f6_arg1.newValue
|
||||||
local f6_local1 = f6_local0 - 1
|
local f6_local1 = f6_local0 - 1
|
||||||
local f6_local2 = f6_arg1.entNum
|
local f6_local2 = f6_arg1.entNum
|
||||||
@ -187,7 +187,7 @@ CoD.HudAfterlifeDisplay.UpdateAfterlifeWaypoint = function (f6_arg0, f6_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.HudAfterlifeDisplay.UpdateAfterlifeIconsDemoJump = function (f7_arg0, f7_arg1)
|
CoD.HudAfterlifeDisplay.UpdateAfterlifeIconsDemoJump = function(f7_arg0, f7_arg1)
|
||||||
local f7_local0 = {}
|
local f7_local0 = {}
|
||||||
for f7_local1 = 1, #f7_arg0.afterlifeWaypointIcons, 1 do
|
for f7_local1 = 1, #f7_arg0.afterlifeWaypointIcons, 1 do
|
||||||
if Engine.IsEntityNumberInUse(f7_arg1.controller, f7_arg0.afterlifeWaypointIcons[f7_local1].entNum, CoD.EntityType.ET_SCRIPTMOVER) == false then
|
if Engine.IsEntityNumberInUse(f7_arg1.controller, f7_arg0.afterlifeWaypointIcons[f7_local1].entNum, CoD.EntityType.ET_SCRIPTMOVER) == false then
|
||||||
@ -202,7 +202,7 @@ CoD.HudAfterlifeDisplay.UpdateAfterlifeIconsDemoJump = function (f7_arg0, f7_arg
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.HudAfterlifeDisplay.AfterlifeWaypointExists = function (f8_arg0, f8_arg1)
|
CoD.HudAfterlifeDisplay.AfterlifeWaypointExists = function(f8_arg0, f8_arg1)
|
||||||
local f8_local0 = false
|
local f8_local0 = false
|
||||||
for f8_local1 = 1, #f8_arg0.afterlifeWaypointIcons, 1 do
|
for f8_local1 = 1, #f8_arg0.afterlifeWaypointIcons, 1 do
|
||||||
if f8_arg0.afterlifeWaypointIcons[f8_local1].entNum == f8_arg1 then
|
if f8_arg0.afterlifeWaypointIcons[f8_local1].entNum == f8_arg1 then
|
||||||
@ -213,12 +213,12 @@ CoD.HudAfterlifeDisplay.AfterlifeWaypointExists = function (f8_arg0, f8_arg1)
|
|||||||
return f8_local0
|
return f8_local0
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.HudAfterlifeDisplay.PulseOff = function (f9_arg0, f9_arg1)
|
CoD.HudAfterlifeDisplay.PulseOff = function(f9_arg0, f9_arg1)
|
||||||
f9_arg0:beginAnimation("pulse_off", f9_arg1)
|
f9_arg0:beginAnimation("pulse_off", f9_arg1)
|
||||||
f9_arg0:setAlpha(0.1)
|
f9_arg0:setAlpha(0.1)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.HudAfterlifeDisplay.PulseOn = function (f10_arg0, f10_arg1)
|
CoD.HudAfterlifeDisplay.PulseOn = function(f10_arg0, f10_arg1)
|
||||||
f10_arg0:beginAnimation("pulse_on", f10_arg1)
|
f10_arg0:beginAnimation("pulse_on", f10_arg1)
|
||||||
f10_arg0:setAlpha(1)
|
f10_arg0:setAlpha(1)
|
||||||
end
|
end
|
||||||
|
@ -4,7 +4,7 @@ CoD.CompetitiveScoreboard.RowHeight = 30
|
|||||||
CoD.CompetitiveScoreboard.FloatingLosePointsColor = {
|
CoD.CompetitiveScoreboard.FloatingLosePointsColor = {
|
||||||
r = 0.21,
|
r = 0.21,
|
||||||
g = 0,
|
g = 0,
|
||||||
b = 0
|
b = 0,
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.IsDLC2Map = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC2Maps)
|
CoD.CompetitiveScoreboard.IsDLC2Map = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC2Maps)
|
||||||
CoD.CompetitiveScoreboard.IsDLC3Map = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC3Maps)
|
CoD.CompetitiveScoreboard.IsDLC3Map = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC3Maps)
|
||||||
@ -22,37 +22,37 @@ CoD.CompetitiveScoreboard.ClientFields = {}
|
|||||||
CoD.CompetitiveScoreboard.ClientFields.score_cf_damage = {
|
CoD.CompetitiveScoreboard.ClientFields.score_cf_damage = {
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 7,
|
max = 7,
|
||||||
scoreScale = 10
|
scoreScale = 10,
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.ClientFields.score_cf_death_normal = {
|
CoD.CompetitiveScoreboard.ClientFields.score_cf_death_normal = {
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 3,
|
max = 3,
|
||||||
scoreScale = 50
|
scoreScale = 50,
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.ClientFields.score_cf_death_torso = {
|
CoD.CompetitiveScoreboard.ClientFields.score_cf_death_torso = {
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 3,
|
max = 3,
|
||||||
scoreScale = 60
|
scoreScale = 60,
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.ClientFields.score_cf_death_neck = {
|
CoD.CompetitiveScoreboard.ClientFields.score_cf_death_neck = {
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 3,
|
max = 3,
|
||||||
scoreScale = 70
|
scoreScale = 70,
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.ClientFields.score_cf_death_head = {
|
CoD.CompetitiveScoreboard.ClientFields.score_cf_death_head = {
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 3,
|
max = 3,
|
||||||
scoreScale = 100
|
scoreScale = 100,
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.ClientFields.score_cf_death_melee = {
|
CoD.CompetitiveScoreboard.ClientFields.score_cf_death_melee = {
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 3,
|
max = 3,
|
||||||
scoreScale = 130
|
scoreScale = 130,
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.ClientFields.score_cf_double_points_active = {
|
CoD.CompetitiveScoreboard.ClientFields.score_cf_double_points_active = {
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 1,
|
max = 1,
|
||||||
scoreScale = 2
|
scoreScale = 2,
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.DoublePointsActive_ClientFieldName = "score_cf_double_points_active"
|
CoD.CompetitiveScoreboard.DoublePointsActive_ClientFieldName = "score_cf_double_points_active"
|
||||||
CoD.CompetitiveScoreboard.FlyingDurationMin = 800
|
CoD.CompetitiveScoreboard.FlyingDurationMin = 800
|
||||||
@ -76,59 +76,59 @@ if CoD.CompetitiveScoreboard.IsDLC2Map == true then
|
|||||||
CoD.CompetitiveScoreboard.CharacterNames = {}
|
CoD.CompetitiveScoreboard.CharacterNames = {}
|
||||||
CoD.CompetitiveScoreboard.CharacterNames[1] = {
|
CoD.CompetitiveScoreboard.CharacterNames[1] = {
|
||||||
name = "Finn",
|
name = "Finn",
|
||||||
modelName = "c_zom_player_oleary_fb"
|
modelName = "c_zom_player_oleary_fb",
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.CharacterNames[2] = {
|
CoD.CompetitiveScoreboard.CharacterNames[2] = {
|
||||||
name = "Sal",
|
name = "Sal",
|
||||||
modelName = "c_zom_player_deluca_fb"
|
modelName = "c_zom_player_deluca_fb",
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.CharacterNames[3] = {
|
CoD.CompetitiveScoreboard.CharacterNames[3] = {
|
||||||
name = "Billy",
|
name = "Billy",
|
||||||
modelName = "c_zom_player_handsome_fb"
|
modelName = "c_zom_player_handsome_fb",
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.CharacterNames[4] = {
|
CoD.CompetitiveScoreboard.CharacterNames[4] = {
|
||||||
name = "Weasel",
|
name = "Weasel",
|
||||||
modelName = "c_zom_player_arlington_fb"
|
modelName = "c_zom_player_arlington_fb",
|
||||||
}
|
}
|
||||||
elseif CoD.CompetitiveScoreboard.IsDLC3Map == true then
|
elseif CoD.CompetitiveScoreboard.IsDLC3Map == true then
|
||||||
CoD.CompetitiveScoreboard.CharacterNames = {}
|
CoD.CompetitiveScoreboard.CharacterNames = {}
|
||||||
CoD.CompetitiveScoreboard.CharacterNames[1] = {
|
CoD.CompetitiveScoreboard.CharacterNames[1] = {
|
||||||
name = "Misty",
|
name = "Misty",
|
||||||
modelName = "c_zom_player_farmgirl_fb"
|
modelName = "c_zom_player_farmgirl_fb",
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.CharacterNames[2] = {
|
CoD.CompetitiveScoreboard.CharacterNames[2] = {
|
||||||
name = "Marlton",
|
name = "Marlton",
|
||||||
modelName = "c_zom_player_engineer_fb"
|
modelName = "c_zom_player_engineer_fb",
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.CharacterNames[3] = {
|
CoD.CompetitiveScoreboard.CharacterNames[3] = {
|
||||||
name = "Stuhlinger",
|
name = "Stuhlinger",
|
||||||
modelName = "c_zom_player_reporter_dam_fb"
|
modelName = "c_zom_player_reporter_dam_fb",
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.CharacterNames[4] = {
|
CoD.CompetitiveScoreboard.CharacterNames[4] = {
|
||||||
name = "Russman",
|
name = "Russman",
|
||||||
modelName = "c_zom_player_oldman_fb"
|
modelName = "c_zom_player_oldman_fb",
|
||||||
}
|
}
|
||||||
elseif CoD.CompetitiveScoreboard.IsDLC4Map == true then
|
elseif CoD.CompetitiveScoreboard.IsDLC4Map == true then
|
||||||
CoD.CompetitiveScoreboard.CharacterNames = {}
|
CoD.CompetitiveScoreboard.CharacterNames = {}
|
||||||
CoD.CompetitiveScoreboard.CharacterNames[1] = {
|
CoD.CompetitiveScoreboard.CharacterNames[1] = {
|
||||||
name = "Richtofen",
|
name = "Richtofen",
|
||||||
modelName = "c_zom_tomb_richtofen_fb"
|
modelName = "c_zom_tomb_richtofen_fb",
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.CharacterNames[2] = {
|
CoD.CompetitiveScoreboard.CharacterNames[2] = {
|
||||||
name = "Takeo",
|
name = "Takeo",
|
||||||
modelName = "c_zom_tomb_takeo_fb"
|
modelName = "c_zom_tomb_takeo_fb",
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.CharacterNames[3] = {
|
CoD.CompetitiveScoreboard.CharacterNames[3] = {
|
||||||
name = "Nikolai",
|
name = "Nikolai",
|
||||||
modelName = "c_zom_tomb_nikolai_fb"
|
modelName = "c_zom_tomb_nikolai_fb",
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.CharacterNames[4] = {
|
CoD.CompetitiveScoreboard.CharacterNames[4] = {
|
||||||
name = "Dempsey",
|
name = "Dempsey",
|
||||||
modelName = "c_zom_tomb_dempsey_fb"
|
modelName = "c_zom_tomb_dempsey_fb",
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
LUI.createMenu.CompetitiveScoreboard = function (LocalClientIndex)
|
LUI.createMenu.CompetitiveScoreboard = function(LocalClientIndex)
|
||||||
local CompetitiveScoreboardWidget = CoD.Menu.NewSafeAreaFromState("CompetitiveScoreboard", LocalClientIndex)
|
local CompetitiveScoreboardWidget = CoD.Menu.NewSafeAreaFromState("CompetitiveScoreboard", LocalClientIndex)
|
||||||
CompetitiveScoreboardWidget:setOwner(LocalClientIndex)
|
CompetitiveScoreboardWidget:setOwner(LocalClientIndex)
|
||||||
CompetitiveScoreboardWidget.scaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier)
|
CompetitiveScoreboardWidget.scaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier)
|
||||||
@ -184,13 +184,13 @@ LUI.createMenu.CompetitiveScoreboard = function (LocalClientIndex)
|
|||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0
|
0,
|
||||||
}
|
}
|
||||||
CoD.CompetitiveScoreboard.HelmetStates = {
|
CoD.CompetitiveScoreboard.HelmetStates = {
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0
|
0,
|
||||||
}
|
}
|
||||||
PlayerScoreListWidget.shovelIcon = LUI.UIImage.new()
|
PlayerScoreListWidget.shovelIcon = LUI.UIImage.new()
|
||||||
PlayerScoreListWidget.shovelIcon:setLeftRight(false, true, -CoD.CompetitiveScoreboard.RowHeight, 0)
|
PlayerScoreListWidget.shovelIcon:setLeftRight(false, true, -CoD.CompetitiveScoreboard.RowHeight, 0)
|
||||||
@ -258,7 +258,7 @@ LUI.createMenu.CompetitiveScoreboard = function (LocalClientIndex)
|
|||||||
return CompetitiveScoreboardWidget
|
return CompetitiveScoreboardWidget
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.CompetitiveScoreShow = function (PlayerScoreListWidget, ClientIndex, AnimDelay)
|
CoD.CompetitiveScoreboard.CompetitiveScoreShow = function(PlayerScoreListWidget, ClientIndex, AnimDelay)
|
||||||
if not AnimDelay then
|
if not AnimDelay then
|
||||||
AnimDelay = 0
|
AnimDelay = 0
|
||||||
end
|
end
|
||||||
@ -269,7 +269,7 @@ CoD.CompetitiveScoreboard.CompetitiveScoreShow = function (PlayerScoreListWidget
|
|||||||
PlayerScoreListWidget:setAlpha(1)
|
PlayerScoreListWidget:setAlpha(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.CompetitiveScoreShowSelf = function (PlayerScoreListWidget, ClientScoreIndex, AnimDelay)
|
CoD.CompetitiveScoreboard.CompetitiveScoreShowSelf = function(PlayerScoreListWidget, ClientScoreIndex, AnimDelay)
|
||||||
if not AnimDelay then
|
if not AnimDelay then
|
||||||
AnimDelay = 0
|
AnimDelay = 0
|
||||||
end
|
end
|
||||||
@ -280,7 +280,7 @@ CoD.CompetitiveScoreboard.CompetitiveScoreShowSelf = function (PlayerScoreListWi
|
|||||||
PlayerScoreListWidget:setAlpha(1)
|
PlayerScoreListWidget:setAlpha(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.CompetitiveScoreHide = function (PlayerScoreListWidget, AnimDelay)
|
CoD.CompetitiveScoreboard.CompetitiveScoreHide = function(PlayerScoreListWidget, AnimDelay)
|
||||||
if not AnimDelay then
|
if not AnimDelay then
|
||||||
AnimDelay = 0
|
AnimDelay = 0
|
||||||
end
|
end
|
||||||
@ -288,7 +288,7 @@ CoD.CompetitiveScoreboard.CompetitiveScoreHide = function (PlayerScoreListWidget
|
|||||||
PlayerScoreListWidget:setAlpha(0)
|
PlayerScoreListWidget:setAlpha(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.CompetitiveScoreTextShowPlayerColor = function (Text, ClientIndex, AnimDelay)
|
CoD.CompetitiveScoreboard.CompetitiveScoreTextShowPlayerColor = function(Text, ClientIndex, AnimDelay)
|
||||||
if not AnimDelay then
|
if not AnimDelay then
|
||||||
AnimDelay = 0
|
AnimDelay = 0
|
||||||
end
|
end
|
||||||
@ -296,7 +296,7 @@ CoD.CompetitiveScoreboard.CompetitiveScoreTextShowPlayerColor = function (Text,
|
|||||||
Text:setRGB(CoD.Zombie.PlayerColors[ClientIndex].r, CoD.Zombie.PlayerColors[ClientIndex].g, CoD.Zombie.PlayerColors[ClientIndex].b)
|
Text:setRGB(CoD.Zombie.PlayerColors[ClientIndex].r, CoD.Zombie.PlayerColors[ClientIndex].g, CoD.Zombie.PlayerColors[ClientIndex].b)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.UpdateVisibility = function (CompetitiveScoreboardWidget, ClientInstance)
|
CoD.CompetitiveScoreboard.UpdateVisibility = function(CompetitiveScoreboardWidget, ClientInstance)
|
||||||
local LocalClientIndex = ClientInstance.controller
|
local LocalClientIndex = ClientInstance.controller
|
||||||
if UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IS_PLAYER_IN_AFTERLIFE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IS_SCOPED) == 0 and (not CoD.IsShoutcaster(LocalClientIndex) or CoD.IsShoutcasterProfileVariableTrue(LocalClientIndex, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(LocalClientIndex)) and CoD.FSM_VISIBILITY(LocalClientIndex) == 0 then
|
if UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IS_PLAYER_IN_AFTERLIFE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IS_SCOPED) == 0 and (not CoD.IsShoutcaster(LocalClientIndex) or CoD.IsShoutcasterProfileVariableTrue(LocalClientIndex, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(LocalClientIndex)) and CoD.FSM_VISIBILITY(LocalClientIndex) == 0 then
|
||||||
if CompetitiveScoreboardWidget.visible ~= true then
|
if CompetitiveScoreboardWidget.visible ~= true then
|
||||||
@ -312,7 +312,7 @@ CoD.CompetitiveScoreboard.UpdateVisibility = function (CompetitiveScoreboardWidg
|
|||||||
CompetitiveScoreboardWidget:dispatchEventToChildren(ClientInstance)
|
CompetitiveScoreboardWidget:dispatchEventToChildren(ClientInstance)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.UpdateTeamChange = function (CompetitiveScoreboardWidget, ClientInstance)
|
CoD.CompetitiveScoreboard.UpdateTeamChange = function(CompetitiveScoreboardWidget, ClientInstance)
|
||||||
if Dvar.ui_gametype:get() == CoD.Zombie.GAMETYPE_ZCLEANSED then
|
if Dvar.ui_gametype:get() == CoD.Zombie.GAMETYPE_ZCLEANSED then
|
||||||
if ClientInstance.team == CoD.TEAM_AXIS then
|
if ClientInstance.team == CoD.TEAM_AXIS then
|
||||||
if CompetitiveScoreboardWidget.visible == true then
|
if CompetitiveScoreboardWidget.visible == true then
|
||||||
@ -328,7 +328,7 @@ CoD.CompetitiveScoreboard.UpdateTeamChange = function (CompetitiveScoreboardWidg
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.CopyPreNavCardAndShow = function (CompetitiveScoreboardWidget, PlayerScoreListWidget, LocalClientIndex)
|
CoD.CompetitiveScoreboard.CopyPreNavCardAndShow = function(CompetitiveScoreboardWidget, PlayerScoreListWidget, LocalClientIndex)
|
||||||
local PreviousPlayerScoreListWidget = nil
|
local PreviousPlayerScoreListWidget = nil
|
||||||
for PlayerScoreListWidgetIndex = 1, CoD.CompetitiveScoreboard.TeamPlayerCount, 1 do
|
for PlayerScoreListWidgetIndex = 1, CoD.CompetitiveScoreboard.TeamPlayerCount, 1 do
|
||||||
PreviousPlayerScoreListWidget = CompetitiveScoreboardWidget.Scores[PlayerScoreListWidgetIndex]
|
PreviousPlayerScoreListWidget = CompetitiveScoreboardWidget.Scores[PlayerScoreListWidgetIndex]
|
||||||
@ -346,7 +346,7 @@ CoD.CompetitiveScoreboard.CopyPreNavCardAndShow = function (CompetitiveScoreboar
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.UpdateItemDisplay = function (UnusedArg1, PlayerScoreListWidget, ClientInstance)
|
CoD.CompetitiveScoreboard.UpdateItemDisplay = function(UnusedArg1, PlayerScoreListWidget, ClientInstance)
|
||||||
if PlayerScoreListWidget.clientNum then
|
if PlayerScoreListWidget.clientNum then
|
||||||
local ClientIndex = PlayerScoreListWidget.clientNum + 1
|
local ClientIndex = PlayerScoreListWidget.clientNum + 1
|
||||||
local ShovelClientFieldState = CoD.CompetitiveScoreboard.ShovelStates[ClientIndex]
|
local ShovelClientFieldState = CoD.CompetitiveScoreboard.ShovelStates[ClientIndex]
|
||||||
@ -378,7 +378,7 @@ CoD.CompetitiveScoreboard.UpdateItemDisplay = function (UnusedArg1, PlayerScoreL
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.Update = function (CompetitiveScoreboardWidget, ClientInstance)
|
CoD.CompetitiveScoreboard.Update = function(CompetitiveScoreboardWidget, ClientInstance)
|
||||||
local ClientScoreIndex = 1
|
local ClientScoreIndex = 1
|
||||||
local PlayerScoreListWidget = nil
|
local PlayerScoreListWidget = nil
|
||||||
if #ClientInstance.competitivescores <= #CompetitiveScoreboardWidget.Scores then
|
if #ClientInstance.competitivescores <= #CompetitiveScoreboardWidget.Scores then
|
||||||
@ -443,7 +443,7 @@ CoD.CompetitiveScoreboard.Update = function (CompetitiveScoreboardWidget, Client
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.Update_ClientFields_FlyingScore = function (CompetitiveScoreboardWidget, ClientInstance)
|
CoD.CompetitiveScoreboard.Update_ClientFields_FlyingScore = function(CompetitiveScoreboardWidget, ClientInstance)
|
||||||
local PlayerScoreListWidget = nil
|
local PlayerScoreListWidget = nil
|
||||||
for PlayerScoreListWidgetIndex = 1, CoD.CompetitiveScoreboard.TeamPlayerCount, 1 do
|
for PlayerScoreListWidgetIndex = 1, CoD.CompetitiveScoreboard.TeamPlayerCount, 1 do
|
||||||
if CompetitiveScoreboardWidget.Scores[PlayerScoreListWidgetIndex].clientNum == ClientInstance.entNum then
|
if CompetitiveScoreboardWidget.Scores[PlayerScoreListWidgetIndex].clientNum == ClientInstance.entNum then
|
||||||
@ -476,7 +476,7 @@ CoD.CompetitiveScoreboard.Update_ClientFields_FlyingScore = function (Competitiv
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.FloatingScoreStart = function (PlayerScoreListWidget, ScoreAmount)
|
CoD.CompetitiveScoreboard.FloatingScoreStart = function(PlayerScoreListWidget, ScoreAmount)
|
||||||
local AvailableFloatingScoreText = CoD.CompetitiveScoreboard.GetFloatingScoreText(PlayerScoreListWidget)
|
local AvailableFloatingScoreText = CoD.CompetitiveScoreboard.GetFloatingScoreText(PlayerScoreListWidget)
|
||||||
if AvailableFloatingScoreText ~= nil then
|
if AvailableFloatingScoreText ~= nil then
|
||||||
AvailableFloatingScoreText:setAlpha(1)
|
AvailableFloatingScoreText:setAlpha(1)
|
||||||
@ -499,7 +499,7 @@ CoD.CompetitiveScoreboard.FloatingScoreStart = function (PlayerScoreListWidget,
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.GetScore = function (CompetitiveScoreboardWidget, ClientIndex)
|
CoD.CompetitiveScoreboard.GetScore = function(CompetitiveScoreboardWidget, ClientIndex)
|
||||||
for PlayerScoreListWidgetIndex = 1, CoD.CompetitiveScoreboard.TeamPlayerCount, 1 do
|
for PlayerScoreListWidgetIndex = 1, CoD.CompetitiveScoreboard.TeamPlayerCount, 1 do
|
||||||
if CompetitiveScoreboardWidget.Scores[PlayerScoreListWidgetIndex].clientNum == ClientIndex then
|
if CompetitiveScoreboardWidget.Scores[PlayerScoreListWidgetIndex].clientNum == ClientIndex then
|
||||||
return CompetitiveScoreboardWidget.Scores[PlayerScoreListWidgetIndex]
|
return CompetitiveScoreboardWidget.Scores[PlayerScoreListWidgetIndex]
|
||||||
@ -508,7 +508,7 @@ CoD.CompetitiveScoreboard.GetScore = function (CompetitiveScoreboardWidget, Clie
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.GetFloatingScoreText = function (PlayerScoreListWidget)
|
CoD.CompetitiveScoreboard.GetFloatingScoreText = function(PlayerScoreListWidget)
|
||||||
for ScoreTextIndex = 1, CoD.CompetitiveScoreboard.ClientFieldMaxValue, 1 do
|
for ScoreTextIndex = 1, CoD.CompetitiveScoreboard.ClientFieldMaxValue, 1 do
|
||||||
if PlayerScoreListWidget.floatingScoreTexts[ScoreTextIndex].isUsed == false then
|
if PlayerScoreListWidget.floatingScoreTexts[ScoreTextIndex].isUsed == false then
|
||||||
return PlayerScoreListWidget.floatingScoreTexts[ScoreTextIndex]
|
return PlayerScoreListWidget.floatingScoreTexts[ScoreTextIndex]
|
||||||
@ -517,7 +517,7 @@ CoD.CompetitiveScoreboard.GetFloatingScoreText = function (PlayerScoreListWidget
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.FloatingTextFlyingFinish = function (FloatingScoreText, ClientInstance)
|
CoD.CompetitiveScoreboard.FloatingTextFlyingFinish = function(FloatingScoreText, ClientInstance)
|
||||||
if ClientInstance.interrupted ~= true then
|
if ClientInstance.interrupted ~= true then
|
||||||
FloatingScoreText.isUsed = false
|
FloatingScoreText.isUsed = false
|
||||||
FloatingScoreText:setLeftRight(true, false, -30, -30 + CoD.CompetitiveScoreboard.RowWidth)
|
FloatingScoreText:setLeftRight(true, false, -30, -30 + CoD.CompetitiveScoreboard.RowWidth)
|
||||||
@ -525,7 +525,7 @@ CoD.CompetitiveScoreboard.FloatingTextFlyingFinish = function (FloatingScoreText
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.Update_ClientField_NavCards = function (CompetitiveScoreboardWidget, ClientInstance)
|
CoD.CompetitiveScoreboard.Update_ClientField_NavCards = function(CompetitiveScoreboardWidget, ClientInstance)
|
||||||
local PlayerScoreListWidget = CoD.CompetitiveScoreboard.GetScore(CompetitiveScoreboardWidget, ClientInstance.entNum)
|
local PlayerScoreListWidget = CoD.CompetitiveScoreboard.GetScore(CompetitiveScoreboardWidget, ClientInstance.entNum)
|
||||||
for NavCardIconIndex = 1, CoD.CompetitiveScoreboard.NavCardsCount, 1 do
|
for NavCardIconIndex = 1, CoD.CompetitiveScoreboard.NavCardsCount, 1 do
|
||||||
if CoD.CompetitiveScoreboard.HasBit(ClientInstance.newValue, CoD.CompetitiveScoreboard.Bit(NavCardIconIndex)) == true then
|
if CoD.CompetitiveScoreboard.HasBit(ClientInstance.newValue, CoD.CompetitiveScoreboard.Bit(NavCardIconIndex)) == true then
|
||||||
@ -542,7 +542,7 @@ CoD.CompetitiveScoreboard.Update_ClientField_NavCards = function (CompetitiveSco
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.Update_ClientField_Shovel = function (CompetitiveScoreboardWidget, ClientInstance)
|
CoD.CompetitiveScoreboard.Update_ClientField_Shovel = function(CompetitiveScoreboardWidget, ClientInstance)
|
||||||
local ShovelClientFieldState = ClientInstance.newValue
|
local ShovelClientFieldState = ClientInstance.newValue
|
||||||
local ClientFieldNameIndex = tonumber(string.sub(ClientInstance.name, string.len(ClientInstance.name))) - 1
|
local ClientFieldNameIndex = tonumber(string.sub(ClientInstance.name, string.len(ClientInstance.name))) - 1
|
||||||
local PlayerScoreListWidget = CoD.CompetitiveScoreboard.GetScore(CompetitiveScoreboardWidget, ClientFieldNameIndex)
|
local PlayerScoreListWidget = CoD.CompetitiveScoreboard.GetScore(CompetitiveScoreboardWidget, ClientFieldNameIndex)
|
||||||
@ -568,7 +568,7 @@ CoD.CompetitiveScoreboard.Update_ClientField_Shovel = function (CompetitiveScore
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.Update_ClientField_Helmet = function (CompetitiveScoreboardWidget, ClientInstance)
|
CoD.CompetitiveScoreboard.Update_ClientField_Helmet = function(CompetitiveScoreboardWidget, ClientInstance)
|
||||||
local HelmetClientFieldState = ClientInstance.newValue
|
local HelmetClientFieldState = ClientInstance.newValue
|
||||||
local ClientFieldNameIndex = tonumber(string.sub(ClientInstance.name, string.len(ClientInstance.name))) - 1
|
local ClientFieldNameIndex = tonumber(string.sub(ClientInstance.name, string.len(ClientInstance.name))) - 1
|
||||||
local PlayerScoreListWidget = CoD.CompetitiveScoreboard.GetScore(CompetitiveScoreboardWidget, ClientFieldNameIndex)
|
local PlayerScoreListWidget = CoD.CompetitiveScoreboard.GetScore(CompetitiveScoreboardWidget, ClientFieldNameIndex)
|
||||||
@ -589,15 +589,15 @@ CoD.CompetitiveScoreboard.Update_ClientField_Helmet = function (CompetitiveScore
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.Bit = function (Index)
|
CoD.CompetitiveScoreboard.Bit = function(Index)
|
||||||
return 2 ^ (Index - 1)
|
return 2 ^ (Index - 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.HasBit = function (ClientFieldValue, NavCardBit)
|
CoD.CompetitiveScoreboard.HasBit = function(ClientFieldValue, NavCardBit)
|
||||||
return NavCardBit <= ClientFieldValue % (NavCardBit + NavCardBit)
|
return NavCardBit <= ClientFieldValue % (NavCardBit + NavCardBit)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.UpdateCharacterName = function (CompetitiveScoreboardWidget, ClientInstanceModelName, PlayerScoreListWidget, ClientIndex)
|
CoD.CompetitiveScoreboard.UpdateCharacterName = function(CompetitiveScoreboardWidget, ClientInstanceModelName, PlayerScoreListWidget, ClientIndex)
|
||||||
if not ClientInstanceModelName and PlayerScoreListWidget.characterName then
|
if not ClientInstanceModelName and PlayerScoreListWidget.characterName then
|
||||||
PlayerScoreListWidget.characterName:setText("")
|
PlayerScoreListWidget.characterName:setText("")
|
||||||
return
|
return
|
||||||
@ -622,14 +622,14 @@ CoD.CompetitiveScoreboard.UpdateCharacterName = function (CompetitiveScoreboardW
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.FadeoutCharacterName = function (CharacterNameWidget, ClientInstance)
|
CoD.CompetitiveScoreboard.FadeoutCharacterName = function(CharacterNameWidget, ClientInstance)
|
||||||
CharacterNameWidget:beginAnimation("fade_out", CoD.CompetitiveScoreboard.CHARACTER_NAME_FADE_OUT_DURATION)
|
CharacterNameWidget:beginAnimation("fade_out", CoD.CompetitiveScoreboard.CHARACTER_NAME_FADE_OUT_DURATION)
|
||||||
CharacterNameWidget:setAlpha(0)
|
CharacterNameWidget:setAlpha(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CompetitiveScoreboard.ClearCharacterName = function (PlayerScoreListWidget)
|
CoD.CompetitiveScoreboard.ClearCharacterName = function(PlayerScoreListWidget)
|
||||||
if PlayerScoreListWidget.playerModelName then
|
if PlayerScoreListWidget.playerModelName then
|
||||||
PlayerScoreListWidget.playerModelName = nil
|
PlayerScoreListWidget.playerModelName = nil
|
||||||
PlayerScoreListWidget.characterName:setText("")
|
PlayerScoreListWidget.characterName:setText("")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -21,7 +21,7 @@ CoD.CraftablesTomb.OneInchIconHeight = CoD.CraftablesTomb.OneInchIconWidth
|
|||||||
CoD.CraftablesTomb.NEED_TABLET = 0
|
CoD.CraftablesTomb.NEED_TABLET = 0
|
||||||
CoD.CraftablesTomb.HAVE_TABLET_CLEAN = 1
|
CoD.CraftablesTomb.HAVE_TABLET_CLEAN = 1
|
||||||
CoD.CraftablesTomb.NEED_TABLET_DIRTY = 2
|
CoD.CraftablesTomb.NEED_TABLET_DIRTY = 2
|
||||||
LUI.createMenu.CraftablesTombArea = function (f1_arg0)
|
LUI.createMenu.CraftablesTombArea = function(f1_arg0)
|
||||||
local f1_local0 = CoD.Menu.NewSafeAreaFromState("CraftablesTombArea", f1_arg0)
|
local f1_local0 = CoD.Menu.NewSafeAreaFromState("CraftablesTombArea", f1_arg0)
|
||||||
f1_local0:setOwner(f1_arg0)
|
f1_local0:setOwner(f1_arg0)
|
||||||
f1_local0.topLeftScaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier)
|
f1_local0.topLeftScaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier)
|
||||||
@ -118,7 +118,7 @@ LUI.createMenu.CraftablesTombArea = function (f1_arg0)
|
|||||||
return f1_local0
|
return f1_local0
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CraftablesTomb.UpdateVisibility = function (f2_arg0, f2_arg1)
|
CoD.CraftablesTomb.UpdateVisibility = function(f2_arg0, f2_arg1)
|
||||||
local f2_local0 = f2_arg1.controller
|
local f2_local0 = f2_arg1.controller
|
||||||
if UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_SCOPED) == 0 and (not CoD.IsShoutcaster(f2_local0) or CoD.ExeProfileVarBool(f2_local0, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(f2_local0)) and CoD.FSM_VISIBILITY(f2_local0) == 0 then
|
if UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_SCOPED) == 0 and (not CoD.IsShoutcaster(f2_local0) or CoD.ExeProfileVarBool(f2_local0, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(f2_local0)) and CoD.FSM_VISIBILITY(f2_local0) == 0 then
|
||||||
if f2_arg0.visible ~= true then
|
if f2_arg0.visible ~= true then
|
||||||
@ -134,7 +134,7 @@ CoD.CraftablesTomb.UpdateVisibility = function (f2_arg0, f2_arg1)
|
|||||||
f2_arg0:dispatchEventToChildren(f2_arg1)
|
f2_arg0:dispatchEventToChildren(f2_arg1)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.CraftablesTomb.UpdateTabletState = function (f3_arg0, f3_arg1)
|
CoD.CraftablesTomb.UpdateTabletState = function(f3_arg0, f3_arg1)
|
||||||
local f3_local0 = f3_arg1.newValue
|
local f3_local0 = f3_arg1.newValue
|
||||||
if f3_local0 == CoD.CraftablesTomb.NEED_TABLET then
|
if f3_local0 == CoD.CraftablesTomb.NEED_TABLET then
|
||||||
f3_arg0.tabletContainer:setAlpha(0)
|
f3_arg0.tabletContainer:setAlpha(0)
|
||||||
@ -145,4 +145,4 @@ CoD.CraftablesTomb.UpdateTabletState = function (f3_arg0, f3_arg1)
|
|||||||
f3_arg0.tabletIcon:setImage(CoD.CraftablesTomb.OneInchPunchDirtyMaterial)
|
f3_arg0.tabletIcon:setImage(CoD.CraftablesTomb.OneInchPunchDirtyMaterial)
|
||||||
f3_arg0.tabletContainer:setAlpha(1)
|
f3_arg0.tabletContainer:setAlpha(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@ CoD.DPadArea.InventoryAnimationDuration = 250
|
|||||||
CoD.DPadArea.ArrowColor = {
|
CoD.DPadArea.ArrowColor = {
|
||||||
r = 1,
|
r = 1,
|
||||||
g = 1,
|
g = 1,
|
||||||
b = 1
|
b = 1,
|
||||||
}
|
}
|
||||||
CoD.DPadArea.RewardIconSize = 64
|
CoD.DPadArea.RewardIconSize = 64
|
||||||
CoD.DPadArea.InterlacedLinesMaterial = RegisterMaterial("hud_dpad_blood")
|
CoD.DPadArea.InterlacedLinesMaterial = RegisterMaterial("hud_dpad_blood")
|
||||||
@ -18,7 +18,7 @@ if CoD.isPS3 == true then
|
|||||||
else
|
else
|
||||||
CoD.DPadArea.DPadMaterial = RegisterMaterial("hud_dpad_xenon")
|
CoD.DPadArea.DPadMaterial = RegisterMaterial("hud_dpad_xenon")
|
||||||
end
|
end
|
||||||
LUI.createMenu.DPadArea = function (f1_arg0)
|
LUI.createMenu.DPadArea = function(f1_arg0)
|
||||||
local f1_local0 = CoD.Menu.NewSafeAreaFromState("DPadArea", f1_arg0)
|
local f1_local0 = CoD.Menu.NewSafeAreaFromState("DPadArea", f1_arg0)
|
||||||
f1_local0:setOwner(f1_arg0)
|
f1_local0:setOwner(f1_arg0)
|
||||||
f1_local0.scaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier)
|
f1_local0.scaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier)
|
||||||
@ -43,7 +43,7 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
red = 0.21,
|
red = 0.21,
|
||||||
green = 0,
|
green = 0,
|
||||||
blue = 0,
|
blue = 0,
|
||||||
material = CoD.DPadArea.InterlacedLinesMaterial
|
material = CoD.DPadArea.InterlacedLinesMaterial,
|
||||||
}))
|
}))
|
||||||
Widget.circleBackground = LUI.UIImage.new()
|
Widget.circleBackground = LUI.UIImage.new()
|
||||||
Widget.circleBackground:setLeftRight(true, true, 0, 0)
|
Widget.circleBackground:setLeftRight(true, true, 0, 0)
|
||||||
@ -59,7 +59,7 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
leftAnchor = true,
|
leftAnchor = true,
|
||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
rightAnchor = true,
|
rightAnchor = true,
|
||||||
bottomAnchor = true
|
bottomAnchor = true,
|
||||||
}))
|
}))
|
||||||
Widget:addElement(CoD.OtherAmmoCounters.new({
|
Widget:addElement(CoD.OtherAmmoCounters.new({
|
||||||
left = 0,
|
left = 0,
|
||||||
@ -69,7 +69,7 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
leftAnchor = true,
|
leftAnchor = true,
|
||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
rightAnchor = true,
|
rightAnchor = true,
|
||||||
bottomAnchor = true
|
bottomAnchor = true,
|
||||||
}))
|
}))
|
||||||
local f1_local3 = -88
|
local f1_local3 = -88
|
||||||
local f1_local4 = -131
|
local f1_local4 = -131
|
||||||
@ -81,7 +81,7 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
leftAnchor = false,
|
leftAnchor = false,
|
||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
rightAnchor = true,
|
rightAnchor = true,
|
||||||
bottomAnchor = true
|
bottomAnchor = true,
|
||||||
}))
|
}))
|
||||||
local f1_local5 = -49
|
local f1_local5 = -49
|
||||||
local f1_local6 = -1
|
local f1_local6 = -1
|
||||||
@ -93,7 +93,7 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
leftAnchor = false,
|
leftAnchor = false,
|
||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
rightAnchor = true,
|
rightAnchor = true,
|
||||||
bottomAnchor = true
|
bottomAnchor = true,
|
||||||
}))
|
}))
|
||||||
Widget:addElement(CoD.OffhandIcons.new("tactical", {
|
Widget:addElement(CoD.OffhandIcons.new("tactical", {
|
||||||
left = f1_local5 - CoD.OffhandIcons.Width * 2,
|
left = f1_local5 - CoD.OffhandIcons.Width * 2,
|
||||||
@ -103,7 +103,7 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
leftAnchor = false,
|
leftAnchor = false,
|
||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
rightAnchor = true,
|
rightAnchor = true,
|
||||||
bottomAnchor = true
|
bottomAnchor = true,
|
||||||
}))
|
}))
|
||||||
Widget.carouselArrows = LUI.UIElement.new({
|
Widget.carouselArrows = LUI.UIElement.new({
|
||||||
left = 0,
|
left = 0,
|
||||||
@ -113,7 +113,7 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
leftAnchor = true,
|
leftAnchor = true,
|
||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
rightAnchor = true,
|
rightAnchor = true,
|
||||||
bottomAnchor = true
|
bottomAnchor = true,
|
||||||
})
|
})
|
||||||
Widget:addElement(Widget.carouselArrows)
|
Widget:addElement(Widget.carouselArrows)
|
||||||
local f1_local7 = 8
|
local f1_local7 = 8
|
||||||
@ -132,7 +132,7 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
green = CoD.DPadArea.ArrowColor.g,
|
green = CoD.DPadArea.ArrowColor.g,
|
||||||
blue = CoD.DPadArea.ArrowColor.b,
|
blue = CoD.DPadArea.ArrowColor.b,
|
||||||
alpha = CoD.HUDAlphaFull,
|
alpha = CoD.HUDAlphaFull,
|
||||||
material = CoD.DPadArea.ArrowMaterial
|
material = CoD.DPadArea.ArrowMaterial,
|
||||||
}))
|
}))
|
||||||
Widget.carouselArrows:addElement(LUI.UIImage.new({
|
Widget.carouselArrows:addElement(LUI.UIImage.new({
|
||||||
left = -f1_local7 / 2,
|
left = -f1_local7 / 2,
|
||||||
@ -148,7 +148,7 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
blue = CoD.DPadArea.ArrowColor.b,
|
blue = CoD.DPadArea.ArrowColor.b,
|
||||||
alpha = CoD.HUDAlphaFull,
|
alpha = CoD.HUDAlphaFull,
|
||||||
material = CoD.DPadArea.ArrowMaterial,
|
material = CoD.DPadArea.ArrowMaterial,
|
||||||
zRot = 180
|
zRot = 180,
|
||||||
}))
|
}))
|
||||||
Widget.carouselArrows:addElement(LUI.UIImage.new({
|
Widget.carouselArrows:addElement(LUI.UIImage.new({
|
||||||
left = -f1_local9 - f1_local8 / 2 - f1_local7 / 2,
|
left = -f1_local9 - f1_local8 / 2 - f1_local7 / 2,
|
||||||
@ -164,7 +164,7 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
blue = CoD.DPadArea.ArrowColor.b,
|
blue = CoD.DPadArea.ArrowColor.b,
|
||||||
alpha = CoD.HUDAlphaFull,
|
alpha = CoD.HUDAlphaFull,
|
||||||
material = CoD.DPadArea.ArrowMaterial,
|
material = CoD.DPadArea.ArrowMaterial,
|
||||||
zRot = 90
|
zRot = 90,
|
||||||
}))
|
}))
|
||||||
Widget.carouselArrows:addElement(LUI.UIImage.new({
|
Widget.carouselArrows:addElement(LUI.UIImage.new({
|
||||||
left = f1_local9 + f1_local8 / 2 - f1_local7 / 2,
|
left = f1_local9 + f1_local8 / 2 - f1_local7 / 2,
|
||||||
@ -180,7 +180,7 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
blue = CoD.DPadArea.ArrowColor.b,
|
blue = CoD.DPadArea.ArrowColor.b,
|
||||||
alpha = CoD.HUDAlphaFull,
|
alpha = CoD.HUDAlphaFull,
|
||||||
material = CoD.DPadArea.ArrowMaterial,
|
material = CoD.DPadArea.ArrowMaterial,
|
||||||
zRot = -90
|
zRot = -90,
|
||||||
}))
|
}))
|
||||||
local f1_local10 = 3
|
local f1_local10 = 3
|
||||||
|
|
||||||
@ -193,10 +193,10 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
rightAnchor = false,
|
rightAnchor = false,
|
||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
alpha = 0
|
alpha = 0,
|
||||||
})
|
})
|
||||||
inventoryWeapon:registerAnimationState("show", {
|
inventoryWeapon:registerAnimationState("show", {
|
||||||
alpha = 1
|
alpha = 1,
|
||||||
})
|
})
|
||||||
Widget:addElement(inventoryWeapon)
|
Widget:addElement(inventoryWeapon)
|
||||||
Widget.inventoryWeapon = inventoryWeapon
|
Widget.inventoryWeapon = inventoryWeapon
|
||||||
@ -210,7 +210,7 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
rightAnchor = false,
|
rightAnchor = false,
|
||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
alpha = CoD.DPadArea.RewardIconEnabledAlpha
|
alpha = CoD.DPadArea.RewardIconEnabledAlpha,
|
||||||
})
|
})
|
||||||
inventoryWeapon:addElement(inventoryWeaponIcon)
|
inventoryWeapon:addElement(inventoryWeaponIcon)
|
||||||
Widget.inventoryWeaponIcon = inventoryWeaponIcon
|
Widget.inventoryWeaponIcon = inventoryWeaponIcon
|
||||||
@ -223,7 +223,7 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
leftAnchor = false,
|
leftAnchor = false,
|
||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
rightAnchor = false,
|
rightAnchor = false,
|
||||||
bottomAnchor = true
|
bottomAnchor = true,
|
||||||
})
|
})
|
||||||
f1_local13:setText(Engine.Localize("MPUI_HINT_INVENTORY_CAPS", UIExpression.KeyBinding(f1_arg0, "+weapnext_inventory")))
|
f1_local13:setText(Engine.Localize("MPUI_HINT_INVENTORY_CAPS", UIExpression.KeyBinding(f1_arg0, "+weapnext_inventory")))
|
||||||
f1_local13:setFont(CoD.fonts.Big)
|
f1_local13:setFont(CoD.fonts.Big)
|
||||||
@ -252,11 +252,11 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
Widget:registerEventHandler("input_source_changed", CoD.DPadArea.InputSourceChanged)
|
Widget:registerEventHandler("input_source_changed", CoD.DPadArea.InputSourceChanged)
|
||||||
if CoD.useController and Engine.LastInput_Gamepad() or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then
|
if CoD.useController and Engine.LastInput_Gamepad() or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then
|
||||||
CoD.DPadArea.InputSourceChanged(Widget, {
|
CoD.DPadArea.InputSourceChanged(Widget, {
|
||||||
source = 0
|
source = 0,
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
CoD.DPadArea.InputSourceChanged(Widget, {
|
CoD.DPadArea.InputSourceChanged(Widget, {
|
||||||
source = 1
|
source = 1,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -264,7 +264,7 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
return f1_local0
|
return f1_local0
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
CoD.DPadArea.UpdateActionSlots = function(f2_arg0, f2_arg1)
|
||||||
if f2_arg0.actionSlots == nil then
|
if f2_arg0.actionSlots == nil then
|
||||||
f2_arg0.actionSlots = {}
|
f2_arg0.actionSlots = {}
|
||||||
else
|
else
|
||||||
@ -293,7 +293,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
topAnchor = true,
|
topAnchor = true,
|
||||||
rightAnchor = false,
|
rightAnchor = false,
|
||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
alphaMultiplier = 1
|
alphaMultiplier = 1,
|
||||||
}
|
}
|
||||||
elseif f2_local4 == 2 then
|
elseif f2_local4 == 2 then
|
||||||
f2_local7 = {
|
f2_local7 = {
|
||||||
@ -305,7 +305,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
rightAnchor = false,
|
rightAnchor = false,
|
||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
alphaMultiplier = 1
|
alphaMultiplier = 1,
|
||||||
}
|
}
|
||||||
elseif f2_local4 == 3 then
|
elseif f2_local4 == 3 then
|
||||||
f2_local7 = {
|
f2_local7 = {
|
||||||
@ -317,7 +317,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
rightAnchor = false,
|
rightAnchor = false,
|
||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
alphaMultiplier = 1
|
alphaMultiplier = 1,
|
||||||
}
|
}
|
||||||
elseif f2_local4 == 4 then
|
elseif f2_local4 == 4 then
|
||||||
f2_local7 = {
|
f2_local7 = {
|
||||||
@ -328,7 +328,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
leftAnchor = false,
|
leftAnchor = false,
|
||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
rightAnchor = true,
|
rightAnchor = true,
|
||||||
bottomAnchor = false
|
bottomAnchor = false,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
if f2_local7 ~= nil then
|
if f2_local7 ~= nil then
|
||||||
@ -349,7 +349,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
green = CoD.HUDBaseColor.g,
|
green = CoD.HUDBaseColor.g,
|
||||||
blue = CoD.HUDBaseColor.b,
|
blue = CoD.HUDBaseColor.b,
|
||||||
alpha = f2_local5,
|
alpha = f2_local5,
|
||||||
material = f2_local9.material
|
material = f2_local9.material,
|
||||||
}))
|
}))
|
||||||
if f2_local4 ~= 1 and f2_local4 ~= 2 and f2_local9.hasSelectFireAttachment == false then
|
if f2_local4 ~= 1 and f2_local4 ~= 2 and f2_local9.hasSelectFireAttachment == false then
|
||||||
local f2_local8 = LUI.UIText.new({
|
local f2_local8 = LUI.UIText.new({
|
||||||
@ -364,7 +364,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
red = 1,
|
red = 1,
|
||||||
green = 1,
|
green = 1,
|
||||||
blue = 1,
|
blue = 1,
|
||||||
alpha = CoD.HUDAlphaFull
|
alpha = CoD.HUDAlphaFull,
|
||||||
})
|
})
|
||||||
f2_local8:setText(f2_local9.ammo)
|
f2_local8:setText(f2_local9.ammo)
|
||||||
Widget:addElement(f2_local8)
|
Widget:addElement(f2_local8)
|
||||||
@ -382,7 +382,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
alignment = LUI.Alignment.Right
|
alignment = LUI.Alignment.Right,
|
||||||
}
|
}
|
||||||
elseif f2_local4 == 3 then
|
elseif f2_local4 == 3 then
|
||||||
f2_local8 = {
|
f2_local8 = {
|
||||||
@ -394,7 +394,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
alignment = LUI.Alignment.Right
|
alignment = LUI.Alignment.Right,
|
||||||
}
|
}
|
||||||
elseif f2_local4 == 2 then
|
elseif f2_local4 == 2 then
|
||||||
f2_local8 = {
|
f2_local8 = {
|
||||||
@ -406,7 +406,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
alignment = LUI.Alignment.Right
|
alignment = LUI.Alignment.Right,
|
||||||
}
|
}
|
||||||
elseif f2_local4 == 4 then
|
elseif f2_local4 == 4 then
|
||||||
f2_local8 = {
|
f2_local8 = {
|
||||||
@ -418,7 +418,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
alignment = LUI.Alignment.Right
|
alignment = LUI.Alignment.Right,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
if f2_local8 ~= nil then
|
if f2_local8 ~= nil then
|
||||||
@ -434,11 +434,11 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
Widget:addElement(Widget.keyPrompt)
|
Widget:addElement(Widget.keyPrompt)
|
||||||
if CoD.useController and Engine.LastInput_Gamepad() or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then
|
if CoD.useController and Engine.LastInput_Gamepad() or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then
|
||||||
CoD.DPadArea.ActionSlotInputSourceChanged(Widget, {
|
CoD.DPadArea.ActionSlotInputSourceChanged(Widget, {
|
||||||
source = 0
|
source = 0,
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
CoD.DPadArea.ActionSlotInputSourceChanged(Widget, {
|
CoD.DPadArea.ActionSlotInputSourceChanged(Widget, {
|
||||||
source = 1
|
source = 1,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -448,7 +448,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.DPadArea.UpdateInventoryWeapon = function (f3_arg0, f3_arg1)
|
CoD.DPadArea.UpdateInventoryWeapon = function(f3_arg0, f3_arg1)
|
||||||
local f3_local0 = f3_arg0.inventoryWeapon
|
local f3_local0 = f3_arg0.inventoryWeapon
|
||||||
local f3_local1 = nil
|
local f3_local1 = nil
|
||||||
if f3_arg1.teleported ~= true then
|
if f3_arg1.teleported ~= true then
|
||||||
@ -457,7 +457,7 @@ CoD.DPadArea.UpdateInventoryWeapon = function (f3_arg0, f3_arg1)
|
|||||||
if f3_arg1.materialName ~= nil then
|
if f3_arg1.materialName ~= nil then
|
||||||
local f3_local2 = f3_arg0.inventoryWeaponIcon
|
local f3_local2 = f3_arg0.inventoryWeaponIcon
|
||||||
f3_local2:registerAnimationState("default", {
|
f3_local2:registerAnimationState("default", {
|
||||||
material = f3_arg1.material
|
material = f3_arg1.material,
|
||||||
})
|
})
|
||||||
f3_local2:animateToState("default")
|
f3_local2:animateToState("default")
|
||||||
f3_local0:animateToState("show", f3_local1)
|
f3_local0:animateToState("show", f3_local1)
|
||||||
@ -466,7 +466,7 @@ CoD.DPadArea.UpdateInventoryWeapon = function (f3_arg0, f3_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.DPadArea.UpdateFading = function (f4_arg0, f4_arg1)
|
CoD.DPadArea.UpdateFading = function(f4_arg0, f4_arg1)
|
||||||
if UIExpression.IsVisibilityBitSet(controller, CoD.BIT_HUD_VISIBLE) == 1 then
|
if UIExpression.IsVisibilityBitSet(controller, CoD.BIT_HUD_VISIBLE) == 1 then
|
||||||
if f4_arg1.alpha == 0 then
|
if f4_arg1.alpha == 0 then
|
||||||
f4_arg0:beginAnimation("fading", 500)
|
f4_arg0:beginAnimation("fading", 500)
|
||||||
@ -475,7 +475,7 @@ CoD.DPadArea.UpdateFading = function (f4_arg0, f4_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.DPadArea.UpdateVisibility = function (f5_arg0, f5_arg1)
|
CoD.DPadArea.UpdateVisibility = function(f5_arg0, f5_arg1)
|
||||||
local f5_local0 = f5_arg1.controller
|
local f5_local0 = f5_arg1.controller
|
||||||
if UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IN_KILLCAM) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IS_SCOPED) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IS_PLAYER_ZOMBIE) == 0 and (not CoD.IsShoutcaster(f5_local0) or CoD.ExeProfileVarBool(f5_local0, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(f5_local0)) and CoD.FSM_VISIBILITY(f5_local0) == 0 then
|
if UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IN_KILLCAM) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IS_SCOPED) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IS_PLAYER_ZOMBIE) == 0 and (not CoD.IsShoutcaster(f5_local0) or CoD.ExeProfileVarBool(f5_local0, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(f5_local0)) and CoD.FSM_VISIBILITY(f5_local0) == 0 then
|
||||||
if f5_arg0.visible ~= true then
|
if f5_arg0.visible ~= true then
|
||||||
@ -491,7 +491,7 @@ CoD.DPadArea.UpdateVisibility = function (f5_arg0, f5_arg1)
|
|||||||
f5_arg0:dispatchEventToChildren(f5_arg1)
|
f5_arg0:dispatchEventToChildren(f5_arg1)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.DPadArea.UpdateTeamChange = function (f6_arg0, f6_arg1)
|
CoD.DPadArea.UpdateTeamChange = function(f6_arg0, f6_arg1)
|
||||||
if Dvar.ui_gametype:get() == CoD.Zombie.GAMETYPE_ZCLEANSED then
|
if Dvar.ui_gametype:get() == CoD.Zombie.GAMETYPE_ZCLEANSED then
|
||||||
if f6_arg1.team == CoD.TEAM_AXIS then
|
if f6_arg1.team == CoD.TEAM_AXIS then
|
||||||
if f6_arg0.visible == true then
|
if f6_arg0.visible == true then
|
||||||
@ -507,7 +507,7 @@ CoD.DPadArea.UpdateTeamChange = function (f6_arg0, f6_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.DPadArea.SetKeyBind = function (f7_arg0)
|
CoD.DPadArea.SetKeyBind = function(f7_arg0)
|
||||||
local f7_local0, f7_local1 = nil
|
local f7_local0, f7_local1 = nil
|
||||||
if f7_arg0.keyPrompt ~= nil and f7_arg0.slotIndex ~= nil then
|
if f7_arg0.keyPrompt ~= nil and f7_arg0.slotIndex ~= nil then
|
||||||
if f7_arg0.slotIndex == 4 then
|
if f7_arg0.slotIndex == 4 then
|
||||||
@ -525,7 +525,7 @@ CoD.DPadArea.SetKeyBind = function (f7_arg0)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.DPadArea.ActionSlotInputSourceChanged = function (f8_arg0, f8_arg1)
|
CoD.DPadArea.ActionSlotInputSourceChanged = function(f8_arg0, f8_arg1)
|
||||||
if CoD.isPC then
|
if CoD.isPC then
|
||||||
if CoD.useController and f8_arg1.source == 0 or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then
|
if CoD.useController and f8_arg1.source == 0 or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then
|
||||||
f8_arg0:animateToState("default")
|
f8_arg0:animateToState("default")
|
||||||
@ -542,7 +542,7 @@ CoD.DPadArea.ActionSlotInputSourceChanged = function (f8_arg0, f8_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.DPadArea.InputSourceChanged = function (f9_arg0, f9_arg1)
|
CoD.DPadArea.InputSourceChanged = function(f9_arg0, f9_arg1)
|
||||||
if CoD.isPC then
|
if CoD.isPC then
|
||||||
if f9_arg0.carouselArrows ~= nil then
|
if f9_arg0.carouselArrows ~= nil then
|
||||||
f9_arg0.carouselArrows:setAlpha(1)
|
f9_arg0.carouselArrows:setAlpha(1)
|
||||||
@ -556,4 +556,4 @@ CoD.DPadArea.InputSourceChanged = function (f9_arg0, f9_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -9,57 +9,57 @@ CoD.Perks.STATE_TBD = 3
|
|||||||
CoD.Perks.ClientFieldNames = {}
|
CoD.Perks.ClientFieldNames = {}
|
||||||
CoD.Perks.ClientFieldNames[1] = {
|
CoD.Perks.ClientFieldNames[1] = {
|
||||||
clientFieldName = "perk_additional_primary_weapon",
|
clientFieldName = "perk_additional_primary_weapon",
|
||||||
material = RegisterMaterial("specialty_additionalprimaryweapon_zombies")
|
material = RegisterMaterial("specialty_additionalprimaryweapon_zombies"),
|
||||||
}
|
}
|
||||||
CoD.Perks.ClientFieldNames[2] = {
|
CoD.Perks.ClientFieldNames[2] = {
|
||||||
clientFieldName = "perk_dead_shot",
|
clientFieldName = "perk_dead_shot",
|
||||||
material = RegisterMaterial("specialty_ads_zombies")
|
material = RegisterMaterial("specialty_ads_zombies"),
|
||||||
}
|
}
|
||||||
CoD.Perks.ClientFieldNames[3] = {
|
CoD.Perks.ClientFieldNames[3] = {
|
||||||
clientFieldName = "perk_dive_to_nuke",
|
clientFieldName = "perk_dive_to_nuke",
|
||||||
material = RegisterMaterial("specialty_divetonuke_zombies")
|
material = RegisterMaterial("specialty_divetonuke_zombies"),
|
||||||
}
|
}
|
||||||
CoD.Perks.ClientFieldNames[4] = {
|
CoD.Perks.ClientFieldNames[4] = {
|
||||||
clientFieldName = "perk_double_tap",
|
clientFieldName = "perk_double_tap",
|
||||||
material = RegisterMaterial("specialty_doubletap_zombies")
|
material = RegisterMaterial("specialty_doubletap_zombies"),
|
||||||
}
|
}
|
||||||
CoD.Perks.ClientFieldNames[5] = {
|
CoD.Perks.ClientFieldNames[5] = {
|
||||||
clientFieldName = "perk_juggernaut",
|
clientFieldName = "perk_juggernaut",
|
||||||
material = RegisterMaterial("specialty_juggernaut_zombies")
|
material = RegisterMaterial("specialty_juggernaut_zombies"),
|
||||||
}
|
}
|
||||||
CoD.Perks.ClientFieldNames[6] = {
|
CoD.Perks.ClientFieldNames[6] = {
|
||||||
clientFieldName = "perk_marathon",
|
clientFieldName = "perk_marathon",
|
||||||
material = RegisterMaterial("specialty_marathon_zombies")
|
material = RegisterMaterial("specialty_marathon_zombies"),
|
||||||
}
|
}
|
||||||
CoD.Perks.ClientFieldNames[7] = {
|
CoD.Perks.ClientFieldNames[7] = {
|
||||||
clientFieldName = "perk_quick_revive",
|
clientFieldName = "perk_quick_revive",
|
||||||
material = RegisterMaterial("specialty_quickrevive_zombies")
|
material = RegisterMaterial("specialty_quickrevive_zombies"),
|
||||||
}
|
}
|
||||||
CoD.Perks.ClientFieldNames[8] = {
|
CoD.Perks.ClientFieldNames[8] = {
|
||||||
clientFieldName = "perk_sleight_of_hand",
|
clientFieldName = "perk_sleight_of_hand",
|
||||||
material = RegisterMaterial("specialty_fastreload_zombies")
|
material = RegisterMaterial("specialty_fastreload_zombies"),
|
||||||
}
|
}
|
||||||
CoD.Perks.ClientFieldNames[9] = {
|
CoD.Perks.ClientFieldNames[9] = {
|
||||||
clientFieldName = "perk_tombstone",
|
clientFieldName = "perk_tombstone",
|
||||||
material = RegisterMaterial("specialty_tombstone_zombies")
|
material = RegisterMaterial("specialty_tombstone_zombies"),
|
||||||
}
|
}
|
||||||
CoD.Perks.ClientFieldNames[10] = {
|
CoD.Perks.ClientFieldNames[10] = {
|
||||||
clientFieldName = "perk_chugabud",
|
clientFieldName = "perk_chugabud",
|
||||||
material = RegisterMaterial("specialty_chugabud_zombies")
|
material = RegisterMaterial("specialty_chugabud_zombies"),
|
||||||
}
|
}
|
||||||
CoD.Perks.ClientFieldNames[11] = {
|
CoD.Perks.ClientFieldNames[11] = {
|
||||||
clientFieldName = "perk_electric_cherry",
|
clientFieldName = "perk_electric_cherry",
|
||||||
material = RegisterMaterial("specialty_electric_cherry_zombie")
|
material = RegisterMaterial("specialty_electric_cherry_zombie"),
|
||||||
}
|
}
|
||||||
CoD.Perks.ClientFieldNames[12] = {
|
CoD.Perks.ClientFieldNames[12] = {
|
||||||
clientFieldName = "perk_vulture",
|
clientFieldName = "perk_vulture",
|
||||||
material = RegisterMaterial("specialty_vulture_zombies"),
|
material = RegisterMaterial("specialty_vulture_zombies"),
|
||||||
glowMaterial = RegisterMaterial("zm_hud_stink_perk_glow")
|
glowMaterial = RegisterMaterial("zm_hud_stink_perk_glow"),
|
||||||
}
|
}
|
||||||
CoD.Perks.PulseDuration = 200
|
CoD.Perks.PulseDuration = 200
|
||||||
CoD.Perks.PulseScale = 1.3
|
CoD.Perks.PulseScale = 1.3
|
||||||
CoD.Perks.PausedAlpha = 0.3
|
CoD.Perks.PausedAlpha = 0.3
|
||||||
LUI.createMenu.PerksArea = function (LocalClientIndex)
|
LUI.createMenu.PerksArea = function(LocalClientIndex)
|
||||||
local PerksAreaWidget = CoD.Menu.NewSafeAreaFromState("PerksArea", LocalClientIndex)
|
local PerksAreaWidget = CoD.Menu.NewSafeAreaFromState("PerksArea", LocalClientIndex)
|
||||||
PerksAreaWidget:setOwner(LocalClientIndex)
|
PerksAreaWidget:setOwner(LocalClientIndex)
|
||||||
PerksAreaWidget.scaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier)
|
PerksAreaWidget.scaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier)
|
||||||
@ -111,7 +111,7 @@ LUI.createMenu.PerksArea = function (LocalClientIndex)
|
|||||||
return PerksAreaWidget
|
return PerksAreaWidget
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.Perks.UpdateVisibility = function (Menu, ClientInstance)
|
CoD.Perks.UpdateVisibility = function(Menu, ClientInstance)
|
||||||
local f2_local0 = ClientInstance.controller
|
local f2_local0 = ClientInstance.controller
|
||||||
if UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_PLAYER_IN_AFTERLIFE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_SCOPED) == 0 and (not CoD.IsShoutcaster(f2_local0) or CoD.ExeProfileVarBool(f2_local0, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(f2_local0)) and CoD.FSM_VISIBILITY(f2_local0) == 0 then
|
if UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_PLAYER_IN_AFTERLIFE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_SCOPED) == 0 and (not CoD.IsShoutcaster(f2_local0) or CoD.ExeProfileVarBool(f2_local0, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(f2_local0)) and CoD.FSM_VISIBILITY(f2_local0) == 0 then
|
||||||
if Menu.visible ~= true then
|
if Menu.visible ~= true then
|
||||||
@ -127,7 +127,7 @@ CoD.Perks.UpdateVisibility = function (Menu, ClientInstance)
|
|||||||
Menu:dispatchEventToChildren(ClientInstance)
|
Menu:dispatchEventToChildren(ClientInstance)
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.Perks.GetMaterial = function (Menu, ClientFieldName)
|
CoD.Perks.GetMaterial = function(Menu, ClientFieldName)
|
||||||
local Material = nil
|
local Material = nil
|
||||||
for ClientFieldIndex = 1, #CoD.Perks.ClientFieldNames, 1 do
|
for ClientFieldIndex = 1, #CoD.Perks.ClientFieldNames, 1 do
|
||||||
if CoD.Perks.ClientFieldNames[ClientFieldIndex].clientFieldName == ClientFieldName then
|
if CoD.Perks.ClientFieldNames[ClientFieldIndex].clientFieldName == ClientFieldName then
|
||||||
@ -138,7 +138,7 @@ CoD.Perks.GetMaterial = function (Menu, ClientFieldName)
|
|||||||
return Material
|
return Material
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.Perks.GetGlowMaterial = function (Menu, ClientFieldName)
|
CoD.Perks.GetGlowMaterial = function(Menu, ClientFieldName)
|
||||||
local Material = nil
|
local Material = nil
|
||||||
for ClientFieldIndex = 1, #CoD.Perks.ClientFieldNames, 1 do
|
for ClientFieldIndex = 1, #CoD.Perks.ClientFieldNames, 1 do
|
||||||
if CoD.Perks.ClientFieldNames[ClientFieldIndex].clientFieldName == ClientFieldName then
|
if CoD.Perks.ClientFieldNames[ClientFieldIndex].clientFieldName == ClientFieldName then
|
||||||
@ -151,7 +151,7 @@ CoD.Perks.GetGlowMaterial = function (Menu, ClientFieldName)
|
|||||||
return Material
|
return Material
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.Perks.RemovePerkIcon = function (Menu, OwnedPerkIndex)
|
CoD.Perks.RemovePerkIcon = function(Menu, OwnedPerkIndex)
|
||||||
local PerkWidget, NextPerkWidget = nil, nil
|
local PerkWidget, NextPerkWidget = nil, nil
|
||||||
for PerkIndex = OwnedPerkIndex, #CoD.Perks.ClientFieldNames, 1 do
|
for PerkIndex = OwnedPerkIndex, #CoD.Perks.ClientFieldNames, 1 do
|
||||||
PerkWidget = Menu.perks[PerkIndex]
|
PerkWidget = Menu.perks[PerkIndex]
|
||||||
@ -163,7 +163,6 @@ CoD.Perks.RemovePerkIcon = function (Menu, OwnedPerkIndex)
|
|||||||
if not NextPerkWidget then
|
if not NextPerkWidget then
|
||||||
PerkWidget.perkIcon:setAlpha(0)
|
PerkWidget.perkIcon:setAlpha(0)
|
||||||
if PerkWidget.perkGlowIcon then
|
if PerkWidget.perkGlowIcon then
|
||||||
|
|
||||||
else
|
else
|
||||||
PerkWidget.perkId = nil
|
PerkWidget.perkId = nil
|
||||||
break
|
break
|
||||||
@ -176,7 +175,6 @@ CoD.Perks.RemovePerkIcon = function (Menu, OwnedPerkIndex)
|
|||||||
PerkWidget.perkGlowIcon = nil
|
PerkWidget.perkGlowIcon = nil
|
||||||
end
|
end
|
||||||
if PerkWidget.meterContainer then
|
if PerkWidget.meterContainer then
|
||||||
|
|
||||||
else
|
else
|
||||||
PerkWidget.perkId = nil
|
PerkWidget.perkId = nil
|
||||||
break
|
break
|
||||||
@ -194,7 +192,7 @@ CoD.Perks.RemovePerkIcon = function (Menu, OwnedPerkIndex)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.Perks.Update = function (Menu, ClientInstance)
|
CoD.Perks.Update = function(Menu, ClientInstance)
|
||||||
local PerkWidget = nil
|
local PerkWidget = nil
|
||||||
for OwnedPerkIndex = 1, #CoD.Perks.ClientFieldNames, 1 do
|
for OwnedPerkIndex = 1, #CoD.Perks.ClientFieldNames, 1 do
|
||||||
PerkWidget = Menu.perks[OwnedPerkIndex]
|
PerkWidget = Menu.perks[OwnedPerkIndex]
|
||||||
@ -204,7 +202,6 @@ CoD.Perks.Update = function (Menu, ClientInstance)
|
|||||||
PerkWidget.perkIcon:setImage(CoD.Perks.GetMaterial(Menu, ClientInstance.name))
|
PerkWidget.perkIcon:setImage(CoD.Perks.GetMaterial(Menu, ClientInstance.name))
|
||||||
PerkWidget.perkIcon:setAlpha(1)
|
PerkWidget.perkIcon:setAlpha(1)
|
||||||
if PerkWidget.perkId == "perk_vulture" then
|
if PerkWidget.perkId == "perk_vulture" then
|
||||||
|
|
||||||
else
|
else
|
||||||
local f6_local4 = CoD.Perks.GetGlowMaterial(Menu, ClientInstance.name)
|
local f6_local4 = CoD.Perks.GetGlowMaterial(Menu, ClientInstance.name)
|
||||||
if f6_local4 and PerkWidget.perkGlowIcon then
|
if f6_local4 and PerkWidget.perkGlowIcon then
|
||||||
@ -248,19 +245,18 @@ CoD.Perks.Update = function (Menu, ClientInstance)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if ClientInstance.newValue == CoD.Perks.STATE_TBD then
|
if ClientInstance.newValue == CoD.Perks.STATE_TBD then
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.Perks.IconPulseFinish = function (Menu, ClientInstance)
|
CoD.Perks.IconPulseFinish = function(Menu, ClientInstance)
|
||||||
if ClientInstance.interrupted ~= true then
|
if ClientInstance.interrupted ~= true then
|
||||||
Menu:beginAnimation("pulse_done", CoD.Perks.PulseDuration)
|
Menu:beginAnimation("pulse_done", CoD.Perks.PulseDuration)
|
||||||
Menu:setScale(1)
|
Menu:setScale(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.Perks.AddGlowIcon = function (Menu, PerkWidget)
|
CoD.Perks.AddGlowIcon = function(Menu, PerkWidget)
|
||||||
if not PerkWidget.perkGlowIcon then
|
if not PerkWidget.perkGlowIcon then
|
||||||
local GlowIcon = LUI.UIImage.new()
|
local GlowIcon = LUI.UIImage.new()
|
||||||
GlowIcon:setLeftRight(true, true, -CoD.Perks.IconSize / 2, CoD.Perks.IconSize / 2)
|
GlowIcon:setLeftRight(true, true, -CoD.Perks.IconSize / 2, CoD.Perks.IconSize / 2)
|
||||||
@ -271,7 +267,7 @@ CoD.Perks.AddGlowIcon = function (Menu, PerkWidget)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.Perks.AddVultureMeter = function (Menu, PerkWidget)
|
CoD.Perks.AddVultureMeter = function(Menu, PerkWidget)
|
||||||
if not PerkWidget.meterContainer then
|
if not PerkWidget.meterContainer then
|
||||||
local f9_local0 = CoD.Perks.TopStart + CoD.Perks.IconSize * 2
|
local f9_local0 = CoD.Perks.TopStart + CoD.Perks.IconSize * 2
|
||||||
local f9_local1 = -CoD.Perks.IconSize
|
local f9_local1 = -CoD.Perks.IconSize
|
||||||
@ -298,7 +294,7 @@ CoD.Perks.AddVultureMeter = function (Menu, PerkWidget)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.Perks.UpdateVultureDiseaseMeter = function (Menu, ClientInstance)
|
CoD.Perks.UpdateVultureDiseaseMeter = function(Menu, ClientInstance)
|
||||||
local f10_local0 = ClientInstance.newValue
|
local f10_local0 = ClientInstance.newValue
|
||||||
if Menu.meterContainer then
|
if Menu.meterContainer then
|
||||||
Menu.meterContainer:setAlpha(f10_local0)
|
Menu.meterContainer:setAlpha(f10_local0)
|
||||||
@ -306,4 +302,4 @@ CoD.Perks.UpdateVultureDiseaseMeter = function (Menu, ClientInstance)
|
|||||||
if Menu.perkGlowIcon then
|
if Menu.perkGlowIcon then
|
||||||
Menu.perkGlowIcon:setAlpha(f10_local0)
|
Menu.perkGlowIcon:setAlpha(f10_local0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,60 +1,60 @@
|
|||||||
CoD.Reimagined = {}
|
CoD.Reimagined = {}
|
||||||
|
|
||||||
LUI.createMenu.ReimaginedArea = function (LocalClientIndex)
|
LUI.createMenu.ReimaginedArea = function(LocalClientIndex)
|
||||||
local safeArea = CoD.Menu.NewSafeAreaFromState("ReimaginedArea", LocalClientIndex)
|
local safeArea = CoD.Menu.NewSafeAreaFromState("ReimaginedArea", LocalClientIndex)
|
||||||
safeArea:setOwner(LocalClientIndex)
|
safeArea:setOwner(LocalClientIndex)
|
||||||
|
|
||||||
local x = 7
|
local x = 7
|
||||||
local y = -163
|
local y = -163
|
||||||
local width = 169
|
local width = 169
|
||||||
local height = 13
|
local height = 13
|
||||||
local bgDiff = 2
|
local bgDiff = 2
|
||||||
|
|
||||||
local healthBarWidget = LUI.UIElement.new()
|
local healthBarWidget = LUI.UIElement.new()
|
||||||
healthBarWidget:setLeftRight(true, false, x, x)
|
healthBarWidget:setLeftRight(true, false, x, x)
|
||||||
healthBarWidget:setTopBottom(false, true, y, y)
|
healthBarWidget:setTopBottom(false, true, y, y)
|
||||||
healthBarWidget.width = width
|
healthBarWidget.width = width
|
||||||
healthBarWidget.height = height
|
healthBarWidget.height = height
|
||||||
healthBarWidget.bgDiff = bgDiff
|
healthBarWidget.bgDiff = bgDiff
|
||||||
safeArea:addElement(healthBarWidget)
|
safeArea:addElement(healthBarWidget)
|
||||||
|
|
||||||
local healthBarBg = LUI.UIImage.new()
|
local healthBarBg = LUI.UIImage.new()
|
||||||
healthBarBg:setLeftRight(true, false, 0, 0 + width)
|
healthBarBg:setLeftRight(true, false, 0, 0 + width)
|
||||||
healthBarBg:setTopBottom(false, true, 0, 0 + height)
|
healthBarBg:setTopBottom(false, true, 0, 0 + height)
|
||||||
healthBarBg:setImage(RegisterMaterial("white"))
|
healthBarBg:setImage(RegisterMaterial("white"))
|
||||||
healthBarBg:setRGB(0, 0, 0)
|
healthBarBg:setRGB(0, 0, 0)
|
||||||
healthBarBg:setAlpha(0.5)
|
healthBarBg:setAlpha(0.5)
|
||||||
healthBarWidget:addElement(healthBarBg)
|
healthBarWidget:addElement(healthBarBg)
|
||||||
healthBarWidget.healthBarBg = healthBarBg
|
healthBarWidget.healthBarBg = healthBarBg
|
||||||
|
|
||||||
local healthBar = LUI.UIImage.new()
|
local healthBar = LUI.UIImage.new()
|
||||||
healthBar:setLeftRight(true, false, bgDiff, width - bgDiff)
|
healthBar:setLeftRight(true, false, bgDiff, width - bgDiff)
|
||||||
healthBar:setTopBottom(true, false, bgDiff, height - bgDiff)
|
healthBar:setTopBottom(true, false, bgDiff, height - bgDiff)
|
||||||
healthBar:setImage(RegisterMaterial("white"))
|
healthBar:setImage(RegisterMaterial("white"))
|
||||||
healthBar:setAlpha(1)
|
healthBar:setAlpha(1)
|
||||||
healthBarWidget:addElement(healthBar)
|
healthBarWidget:addElement(healthBar)
|
||||||
healthBarWidget.healthBar = healthBar
|
healthBarWidget.healthBar = healthBar
|
||||||
|
|
||||||
local shieldBar = LUI.UIImage.new()
|
local shieldBar = LUI.UIImage.new()
|
||||||
shieldBar:setLeftRight(true, false, bgDiff, width - bgDiff)
|
shieldBar:setLeftRight(true, false, bgDiff, width - bgDiff)
|
||||||
shieldBar:setTopBottom(true, false, bgDiff, (height - bgDiff) / 2)
|
shieldBar:setTopBottom(true, false, bgDiff, (height - bgDiff) / 2)
|
||||||
shieldBar:setImage(RegisterMaterial("white"))
|
shieldBar:setImage(RegisterMaterial("white"))
|
||||||
shieldBar:setRGB(0.5, 0.5, 0.5)
|
shieldBar:setRGB(0.5, 0.5, 0.5)
|
||||||
shieldBar:setAlpha(0)
|
shieldBar:setAlpha(0)
|
||||||
healthBarWidget:addElement(shieldBar)
|
healthBarWidget:addElement(shieldBar)
|
||||||
healthBarWidget.shieldBar = shieldBar
|
healthBarWidget.shieldBar = shieldBar
|
||||||
|
|
||||||
local healthText = LUI.UIText.new()
|
local healthText = LUI.UIText.new()
|
||||||
healthText:setLeftRight(true, false, width + bgDiff * 2, 0)
|
healthText:setLeftRight(true, false, width + bgDiff * 2, 0)
|
||||||
healthText:setTopBottom(false, true, 0 - bgDiff, height + bgDiff)
|
healthText:setTopBottom(false, true, 0 - bgDiff, height + bgDiff)
|
||||||
healthText:setFont(CoD.fonts.Condensed)
|
healthText:setFont(CoD.fonts.Condensed)
|
||||||
healthText:setAlignment(LUI.Alignment.Left)
|
healthText:setAlignment(LUI.Alignment.Left)
|
||||||
healthBarWidget:addElement(healthText)
|
healthBarWidget:addElement(healthText)
|
||||||
healthBarWidget.healthText = healthText
|
healthBarWidget.healthText = healthText
|
||||||
|
|
||||||
healthBarWidget:registerEventHandler("hud_update_refresh", CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
healthBarWidget:registerEventHandler("hud_update_refresh", CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_HUD_VISIBLE, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_HUD_VISIBLE, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_PLAYER_IN_AFTERLIFE, CoD.Perks.UpdateVisibility)
|
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_PLAYER_IN_AFTERLIFE, CoD.Perks.UpdateVisibility)
|
||||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_EMP_ACTIVE, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_EMP_ACTIVE, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||||
@ -69,15 +69,15 @@ LUI.createMenu.ReimaginedArea = function (LocalClientIndex)
|
|||||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_PLAYER_DEAD, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_PLAYER_DEAD, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_SCOPED, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_SCOPED, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_PLAYER_ZOMBIE, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_PLAYER_ZOMBIE, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||||
healthBarWidget:registerEventHandler("hud_update_health", CoD.Reimagined.HealthBarArea.UpdateHealthBar)
|
healthBarWidget:registerEventHandler("hud_update_health", CoD.Reimagined.HealthBarArea.UpdateHealthBar)
|
||||||
|
|
||||||
healthBarWidget.visible = true
|
healthBarWidget.visible = true
|
||||||
|
|
||||||
return safeArea
|
return safeArea
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.Reimagined.HealthBarArea = {}
|
CoD.Reimagined.HealthBarArea = {}
|
||||||
CoD.Reimagined.HealthBarArea.UpdateVisibility = function (Menu, ClientInstance)
|
CoD.Reimagined.HealthBarArea.UpdateVisibility = function(Menu, ClientInstance)
|
||||||
local controller = ClientInstance.controller
|
local controller = ClientInstance.controller
|
||||||
if UIExpression.IsVisibilityBitSet(controller, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_PLAYER_IN_AFTERLIFE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IN_KILLCAM) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IS_SCOPED) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IS_PLAYER_ZOMBIE) == 0 and (not CoD.IsShoutcaster(controller) or CoD.ExeProfileVarBool(controller, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(controller)) and CoD.FSM_VISIBILITY(controller) == 0 then
|
if UIExpression.IsVisibilityBitSet(controller, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_PLAYER_IN_AFTERLIFE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IN_KILLCAM) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IS_SCOPED) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IS_PLAYER_ZOMBIE) == 0 and (not CoD.IsShoutcaster(controller) or CoD.ExeProfileVarBool(controller, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(controller)) and CoD.FSM_VISIBILITY(controller) == 0 then
|
||||||
if Menu.visible ~= true then
|
if Menu.visible ~= true then
|
||||||
@ -90,23 +90,23 @@ CoD.Reimagined.HealthBarArea.UpdateVisibility = function (Menu, ClientInstance)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.Reimagined.HealthBarArea.UpdateHealthBar = function (Menu, ClientInstance)
|
CoD.Reimagined.HealthBarArea.UpdateHealthBar = function(Menu, ClientInstance)
|
||||||
local health = ClientInstance.data[1]
|
local health = ClientInstance.data[1]
|
||||||
local maxHealth = ClientInstance.data[2]
|
local maxHealth = ClientInstance.data[2]
|
||||||
local shieldHealth = ClientInstance.data[3]
|
local shieldHealth = ClientInstance.data[3]
|
||||||
local healthPercent = health / maxHealth
|
local healthPercent = health / maxHealth
|
||||||
local shieldHealthPercent = shieldHealth / 100
|
local shieldHealthPercent = shieldHealth / 100
|
||||||
|
|
||||||
Menu.healthBar:setLeftRight(true, false, Menu.bgDiff, (Menu.width * healthPercent) - Menu.bgDiff)
|
Menu.healthBar:setLeftRight(true, false, Menu.bgDiff, (Menu.width * healthPercent) - Menu.bgDiff)
|
||||||
|
|
||||||
if shieldHealthPercent > 0 then
|
if shieldHealthPercent > 0 then
|
||||||
Menu.shieldBar:setAlpha(1)
|
Menu.shieldBar:setAlpha(1)
|
||||||
Menu.shieldBar:setLeftRight(true, false, Menu.bgDiff, (Menu.width * shieldHealthPercent) - Menu.bgDiff)
|
Menu.shieldBar:setLeftRight(true, false, Menu.bgDiff, (Menu.width * shieldHealthPercent) - Menu.bgDiff)
|
||||||
Menu.healthBar:setTopBottom(true, false, (Menu.height + Menu.bgDiff) / 2, Menu.height - Menu.bgDiff)
|
Menu.healthBar:setTopBottom(true, false, (Menu.height + Menu.bgDiff) / 2, Menu.height - Menu.bgDiff)
|
||||||
Menu.healthText:setText(health .. " | " .. shieldHealth)
|
Menu.healthText:setText(health .. " | " .. shieldHealth)
|
||||||
else
|
else
|
||||||
Menu.shieldBar:setAlpha(0)
|
Menu.shieldBar:setAlpha(0)
|
||||||
Menu.healthBar:setTopBottom(true, false, Menu.bgDiff, Menu.height - Menu.bgDiff)
|
Menu.healthBar:setTopBottom(true, false, Menu.bgDiff, Menu.height - Menu.bgDiff)
|
||||||
Menu.healthText:setText(health)
|
Menu.healthText:setText(health)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,19 +5,19 @@ CoD.OtherAmmoCounters.PulseDuration = 500
|
|||||||
CoD.OtherAmmoCounters.NormalColor = {
|
CoD.OtherAmmoCounters.NormalColor = {
|
||||||
r = 1,
|
r = 1,
|
||||||
g = 1,
|
g = 1,
|
||||||
b = 1
|
b = 1,
|
||||||
}
|
}
|
||||||
CoD.OtherAmmoCounters.OverheatColor = {
|
CoD.OtherAmmoCounters.OverheatColor = {
|
||||||
r = 1,
|
r = 1,
|
||||||
g = 0,
|
g = 0,
|
||||||
b = 0
|
b = 0,
|
||||||
}
|
}
|
||||||
CoD.OtherAmmoCounters.LowFuelColor = {
|
CoD.OtherAmmoCounters.LowFuelColor = {
|
||||||
r = 1,
|
r = 1,
|
||||||
g = 1,
|
g = 1,
|
||||||
b = 0
|
b = 0,
|
||||||
}
|
}
|
||||||
CoD.OtherAmmoCounters.new = function ()
|
CoD.OtherAmmoCounters.new = function()
|
||||||
local Widget = LUI.UIElement.new()
|
local Widget = LUI.UIElement.new()
|
||||||
Widget:setLeftRight(true, true, 0, 0)
|
Widget:setLeftRight(true, true, 0, 0)
|
||||||
Widget:setTopBottom(true, true, 0, 0)
|
Widget:setTopBottom(true, true, 0, 0)
|
||||||
@ -43,7 +43,7 @@ CoD.OtherAmmoCounters.new = function ()
|
|||||||
return Widget
|
return Widget
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.OtherAmmoCounters.UpdateHeat = function (f2_arg0, f2_arg1)
|
CoD.OtherAmmoCounters.UpdateHeat = function(f2_arg0, f2_arg1)
|
||||||
f2_arg0.ammoLabel:setText(f2_arg1.heatPercent .. "%")
|
f2_arg0.ammoLabel:setText(f2_arg1.heatPercent .. "%")
|
||||||
if f2_arg1.overheat and f2_arg0.overheat ~= true then
|
if f2_arg1.overheat and f2_arg0.overheat ~= true then
|
||||||
f2_arg0.overheat = true
|
f2_arg0.overheat = true
|
||||||
@ -61,7 +61,7 @@ CoD.OtherAmmoCounters.UpdateHeat = function (f2_arg0, f2_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.OtherAmmoCounters.UpdateFuel = function (f3_arg0, f3_arg1)
|
CoD.OtherAmmoCounters.UpdateFuel = function(f3_arg0, f3_arg1)
|
||||||
f3_arg0.ammoLabel:setText(f3_arg1.fuelPercent .. "%")
|
f3_arg0.ammoLabel:setText(f3_arg1.fuelPercent .. "%")
|
||||||
if f3_arg1.lowFuel and f3_arg0.lowFuel ~= true then
|
if f3_arg1.lowFuel and f3_arg0.lowFuel ~= true then
|
||||||
f3_arg0.lowFuel = true
|
f3_arg0.lowFuel = true
|
||||||
@ -77,7 +77,7 @@ CoD.OtherAmmoCounters.UpdateFuel = function (f3_arg0, f3_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.OtherAmmoCounters.ShouldHideAmmoCounter = function (f4_arg0, f4_arg1)
|
CoD.OtherAmmoCounters.ShouldHideAmmoCounter = function(f4_arg0, f4_arg1)
|
||||||
if f4_arg0.weapon ~= nil then
|
if f4_arg0.weapon ~= nil then
|
||||||
if CoD.isZombie == true and (Engine.IsWeaponType(f4_arg0.weapon, "gas") or Engine.IsOverheatWeapon(f4_arg0.weapon)) then
|
if CoD.isZombie == true and (Engine.IsWeaponType(f4_arg0.weapon, "gas") or Engine.IsOverheatWeapon(f4_arg0.weapon)) then
|
||||||
return false
|
return false
|
||||||
@ -86,7 +86,7 @@ CoD.OtherAmmoCounters.ShouldHideAmmoCounter = function (f4_arg0, f4_arg1)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.OtherAmmoCounters.UpdateVisibility = function (f5_arg0, f5_arg1)
|
CoD.OtherAmmoCounters.UpdateVisibility = function(f5_arg0, f5_arg1)
|
||||||
local f5_local0 = f5_arg1.controller
|
local f5_local0 = f5_arg1.controller
|
||||||
if f5_arg1.weapon ~= nil then
|
if f5_arg1.weapon ~= nil then
|
||||||
f5_arg0.weapon = f5_arg1.weapon
|
f5_arg0.weapon = f5_arg1.weapon
|
||||||
@ -105,16 +105,16 @@ CoD.OtherAmmoCounters.UpdateVisibility = function (f5_arg0, f5_arg1)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.OtherAmmoCounters.Ammo_PulseHigh = function (f6_arg0, f6_arg1)
|
CoD.OtherAmmoCounters.Ammo_PulseHigh = function(f6_arg0, f6_arg1)
|
||||||
if f6_arg1.interrupted ~= true then
|
if f6_arg1.interrupted ~= true then
|
||||||
f6_arg0:beginAnimation("pluse_low", CoD.OtherAmmoCounters.LowAmmoFadeTime, true, false)
|
f6_arg0:beginAnimation("pluse_low", CoD.OtherAmmoCounters.LowAmmoFadeTime, true, false)
|
||||||
f6_arg0:setAlpha(1)
|
f6_arg0:setAlpha(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CoD.OtherAmmoCounters.Ammo_PulseLow = function (f7_arg0, f7_arg1)
|
CoD.OtherAmmoCounters.Ammo_PulseLow = function(f7_arg0, f7_arg1)
|
||||||
if f7_arg1.interrupted ~= true then
|
if f7_arg1.interrupted ~= true then
|
||||||
f7_arg0:beginAnimation("pulse_high", CoD.OtherAmmoCounters.LowAmmoFadeTime, false, true)
|
f7_arg0:beginAnimation("pulse_high", CoD.OtherAmmoCounters.LowAmmoFadeTime, false, true)
|
||||||
f7_arg0:setAlpha(0.5)
|
f7_arg0:setAlpha(0.5)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user