Merge branch 'develop' of https://github.com/h1-mod/h1-mod into develop
This commit is contained in:
commit
b07483f08b
@ -6,6 +6,7 @@ if (Engine.InFrontend()) then
|
|||||||
require("shaderdialog")
|
require("shaderdialog")
|
||||||
require("gamemodes")
|
require("gamemodes")
|
||||||
require("no_mode_switch")
|
require("no_mode_switch")
|
||||||
|
require("disable_useless_things")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- defined in mp_hud/hudutils.lua
|
-- defined in mp_hud/hudutils.lua
|
||||||
|
17
data/ui_scripts/patches/disable_useless_things.lua
Normal file
17
data/ui_scripts/patches/disable_useless_things.lua
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
-- Disable CP
|
||||||
|
Engine.SetDvarInt("ui_enable_cp", 0)
|
||||||
|
|
||||||
|
-- Disable CP store
|
||||||
|
Engine.SetDvarInt("ui_show_store", 0)
|
||||||
|
|
||||||
|
-- Remove CoD account button
|
||||||
|
if Engine.IsMultiplayer() then
|
||||||
|
LUI.removemenubutton("pc_controls", 4)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Remove social button
|
||||||
|
LUI.MenuBuilder.m_definitions["online_friends_widget"] = function()
|
||||||
|
return {
|
||||||
|
type = "UIElement"
|
||||||
|
}
|
||||||
|
end
|
@ -147,6 +147,24 @@ LUI.addmenubutton = function(name, data)
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
LUI.removemenubutton = function(name, index)
|
||||||
|
LUI.onmenuopen(name, function(menu)
|
||||||
|
if (not menu.list) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local buttonlist = menu:getChildById(menu.type .. "_list")
|
||||||
|
local button = buttonlist.childRecord[string.format("%s_button_%s", name, index)]
|
||||||
|
buttonlist:removeElement(button)
|
||||||
|
|
||||||
|
local hintbox = menu.optionTextInfo
|
||||||
|
menu:removeElement(hintbox)
|
||||||
|
|
||||||
|
LUI.Options.InitScrollingList(menu.list, nil)
|
||||||
|
menu.optionTextInfo = LUI.Options.AddOptionTextInfo(menu)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
LUI.openmenu = function(menu, args)
|
LUI.openmenu = function(menu, args)
|
||||||
stack = args
|
stack = args
|
||||||
LUI.FlowManager.RequestAddMenu(nil, menu)
|
LUI.FlowManager.RequestAddMenu(nil, menu)
|
||||||
|
Loading…
Reference in New Issue
Block a user