mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- added the ability to duplicate an existing custom bar
This commit is contained in:
@ -195,11 +195,13 @@ end
|
||||
function IceCore.prototype:AddNewDynamicModule(module, hasSettings)
|
||||
if not hasSettings then
|
||||
self.settings.modules[module.elementName] = module:GetDefaultSettings()
|
||||
elseif type(hasSettings) == "table" then
|
||||
self.settings.modules[module.elementName] = IceHUD.deepcopy(hasSettings)
|
||||
end
|
||||
|
||||
module:SetDatabase(self.settings)
|
||||
|
||||
if not hasSettings then
|
||||
if not hasSettings or type(hasSettings) == "table" then
|
||||
local numExisting = self:GetNumCustomModules(module, module:GetDefaultSettings().customBarType)
|
||||
self:RenameDynamicModule(module, "MyCustom"..module:GetDefaultSettings().customBarType..(numExisting+1))
|
||||
end
|
||||
|
Reference in New Issue
Block a user