Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions Core/MultiBotConfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ local UI_DEFAULTS = {
mainBar = {
moveLocked = true,
disableAutoCollapse = false,
autoHideEnabled = false,
autoHideDelay = 60,
},
}

Expand Down Expand Up @@ -83,6 +85,12 @@ local function migrateLegacyConfigIntoProfile(profile)
if type(profile.ui.mainBar.disableAutoCollapse) ~= "boolean" then
profile.ui.mainBar.disableAutoCollapse = UI_DEFAULTS.mainBar.disableAutoCollapse
end
if type(profile.ui.mainBar.autoHideEnabled) ~= "boolean" then
profile.ui.mainBar.autoHideEnabled = UI_DEFAULTS.mainBar.autoHideEnabled
end
if type(profile.ui.mainBar.autoHideDelay) ~= "number" or profile.ui.mainBar.autoHideDelay <= 0 then
profile.ui.mainBar.autoHideDelay = UI_DEFAULTS.mainBar.autoHideDelay
end
end

local function getConfigStore(createIfMissing)
Expand Down Expand Up @@ -147,6 +155,12 @@ function MultiBot.Config_Ensure()
if type(config.ui.mainBar.disableAutoCollapse) ~= "boolean" then
config.ui.mainBar.disableAutoCollapse = UI_DEFAULTS.mainBar.disableAutoCollapse
end
if type(config.ui.mainBar.autoHideEnabled) ~= "boolean" then
config.ui.mainBar.autoHideEnabled = UI_DEFAULTS.mainBar.autoHideEnabled
end
if type(config.ui.mainBar.autoHideDelay) ~= "number" or config.ui.mainBar.autoHideDelay <= 0 then
config.ui.mainBar.autoHideDelay = UI_DEFAULTS.mainBar.autoHideDelay
end
end

-- Copy saved values into runtime timers.
Expand Down Expand Up @@ -280,4 +294,59 @@ function MultiBot.SetDisableAutoCollapse(value)
config.ui.mainBar = config.ui.mainBar or {}
config.ui.mainBar.disableAutoCollapse = value and true or false
return config.ui.mainBar.disableAutoCollapse
end

local function normalizeMainBarAutoHideDelay(value)
if type(value) ~= "number" then
return UI_DEFAULTS.mainBar.autoHideDelay
end
if value < 5 then
return 5
end
if value > 600 then
return 600
end
return value
end

function MultiBot.GetMainBarAutoHideEnabled()
local config = getConfigStore(false)
local value = config and config.ui and config.ui.mainBar and config.ui.mainBar.autoHideEnabled
if type(value) == "boolean" then
return value
end

return UI_DEFAULTS.mainBar.autoHideEnabled
end

function MultiBot.SetMainBarAutoHideEnabled(value)
local config = getConfigStore(true)
config.ui = config.ui or {}
config.ui.mainBar = config.ui.mainBar or {}
config.ui.mainBar.autoHideEnabled = value and true or false
if MultiBot.RefreshMainBarAutoHideState then
MultiBot.RefreshMainBarAutoHideState()
end
return config.ui.mainBar.autoHideEnabled
end

function MultiBot.GetMainBarAutoHideDelay()
local config = getConfigStore(false)
local value = config and config.ui and config.ui.mainBar and config.ui.mainBar.autoHideDelay
if type(value) == "number" and value > 0 then
return normalizeMainBarAutoHideDelay(value)
end

return UI_DEFAULTS.mainBar.autoHideDelay
end

function MultiBot.SetMainBarAutoHideDelay(value)
local config = getConfigStore(true)
config.ui = config.ui or {}
config.ui.mainBar = config.ui.mainBar or {}
config.ui.mainBar.autoHideDelay = normalizeMainBarAutoHideDelay(value)
if MultiBot.RefreshMainBarAutoHideState then
MultiBot.RefreshMainBarAutoHideState()
end
return config.ui.mainBar.autoHideDelay
end
3 changes: 3 additions & 0 deletions Core/MultiBotEngine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,9 @@ MultiBot.newButton = function(pParent, pX, pY, pSize, pTexture, pTip, oTemplate)

if(pEvent == "RightButton" and button.doRight ~= nil) then button.doRight(button) end
if(pEvent == "LeftButton" and button.doLeft ~= nil) then button.doLeft(button) end
if MultiBot.MainBarAutoHide_NotifyInteraction then
MultiBot.MainBarAutoHide_NotifyInteraction()
end

if button.parent and button.parent._mbDropdownManaged then
if MultiBot.RestoreCollapsedUnitBarsFromDropdown then
Expand Down
6 changes: 6 additions & 0 deletions Core/MultiBotHandler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,9 @@ function MultiBot.ResetMainBarLayoutState()
if multiBar and multiBar.setPoint then
multiBar.setPoint(-262, 144)
end
if MultiBot.RefreshMainBarAutoHideState then
MultiBot.RefreshMainBarAutoHideState()
end

return true, removed
end
Expand All @@ -489,6 +492,9 @@ local function applyImportedLayoutEntry(key, value)
local split = MultiBot.doSplit(value, ", ")
multibar.setPoint(tonumber(split[1]), tonumber(split[2]))
end
if MultiBot.RefreshMainBarAutoHideState then
MultiBot.RefreshMainBarAutoHideState()
end
return true
end

Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-deDE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ local deDEValues = {
["options.layout.lock_mainbar_desc"] = "Aktiviert: Strg + Rechtsklick zum Verschieben der Leiste. Deaktiviert: Rechtsklick genügt.",
["options.layout.disable_autocollapse"] = "Automatisches Einklappen für Bot-Leisten deaktivieren",
["options.layout.disable_autocollapse_desc"] = "Aktiviert: Das Öffnen von Bot-Untermenüs klappt andere Bot-Leisten nicht ein.",
["options.layout.mainbar_autohide"] = "Automatisches Ausblenden der Hauptleiste aktivieren",
["options.layout.mainbar_autohide_desc"] = "Aktiviert: Blendet die Hauptleiste nach Inaktivität aus und zeigt sie wieder an, wenn der Mauszeiger über den Hotspot bewegt wird.",
["options.layout.mainbar_autohide_delay"] = "Verzögerung für automatisches Ausblenden der Hauptleiste",
["options.layout.owner_import"] = "Spieler-Layout zum Importieren",
["options.layout.export"] = "Layout exportieren",
["options.layout.import"] = "Layout importieren",
Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-enGB.lua
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ local enGBValues = {
["options.layout.lock_mainbar_desc"] = "Checked: Ctrl + right-click to move the bar. Unchecked: right-click is enough.",
["options.layout.disable_autocollapse"] = "Disable auto-collapse for bot bars",
["options.layout.disable_autocollapse_desc"] = "Checked: opening bot submenus will not collapse other bot bars.",
["options.layout.mainbar_autohide"] = "Enable main bar auto-hide",
["options.layout.mainbar_autohide_desc"] = "Checked: hide the main bar after inactivity and show it again when hovering its hotspot.",
["options.layout.mainbar_autohide_delay"] = "Main bar auto-hide delay",
["options.layout.owner_import"] = "Player layout to import",
["options.layout.export"] = "Export layout",
["options.layout.import"] = "Import layout",
Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ local enUSValues = {
["options.layout.lock_mainbar_desc"] = "Checked: Ctrl + right-click to move the bar. Unchecked: right-click is enough.",
["options.layout.disable_autocollapse"] = "Disable auto-collapse for bot bars",
["options.layout.disable_autocollapse_desc"] = "Checked: opening bot submenus will not collapse other bot bars.",
["options.layout.mainbar_autohide"] = "Enable main bar auto-hide",
["options.layout.mainbar_autohide_desc"] = "Checked: hide the main bar after inactivity and show it again when hovering its hotspot.",
["options.layout.mainbar_autohide_delay"] = "Main bar auto-hide delay",
["options.layout.owner_import"] = "Player layout to import",
["options.layout.export"] = "Export layout",
["options.layout.import"] = "Import layout",
Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-esES.lua
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ local esESValues = {
["options.layout.lock_mainbar_desc"] = "Marcado: Ctrl + clic derecho para mover la barra. Desmarcado: clic derecho suficiente.",
["options.layout.disable_autocollapse"] = "Desactivar el auto-colapso de las barras de bots",
["options.layout.disable_autocollapse_desc"] = "Marcado: al abrir submenús de bots no se colapsarán otras barras de bots.",
["options.layout.mainbar_autohide"] = "Activar el auto-ocultado de la barra principal",
["options.layout.mainbar_autohide_desc"] = "Marcado: la barra principal se ocultará tras inactividad y volverá a mostrarse al pasar el cursor por su zona activa.",
["options.layout.mainbar_autohide_delay"] = "Retraso del auto-ocultado de la barra principal",
["options.layout.owner_import"] = "Layout de jugador para importar",
["options.layout.export"] = "Exportar diseño",
["options.layout.import"] = "Importar diseño",
Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-frFR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ local frFRValues = {
["options.layout.lock_mainbar_desc"] = "Coché : Ctrl + clic droit pour déplacer la barre. Décoché : clic droit suffit.",
["options.layout.disable_autocollapse"] = "Désactiver l'auto-repli des barres bots",
["options.layout.disable_autocollapse_desc"] = "Coché : l'ouverture d'un sous-menu bot ne replie plus les autres barres bots.",
["options.layout.mainbar_autohide"] = "Activer l'auto-masquage de la barre principale",
["options.layout.mainbar_autohide_desc"] = "Coché : masque la barre principale après inactivité et la réaffiche au survol de sa zone.",
["options.layout.mainbar_autohide_delay"] = "Délai avant auto-masquage de la barre principale",
["options.layout.owner_import"] = "Layout joueur à importer",
["options.layout.export"] = "Exporter le layout",
["options.layout.import"] = "Importer le layout",
Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-koKR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ local koKRValues = {
["options.layout.lock_mainbar_desc"] = "체크: Ctrl + 우클릭으로 바 이동. 해제: 우클릭만으로 이동.",
["options.layout.disable_autocollapse"] = "봇 바 자동 접기 비활성화",
["options.layout.disable_autocollapse_desc"] = "선택 시: 봇 하위 메뉴를 열어도 다른 봇 바가 접히지 않습니다.",
["options.layout.mainbar_autohide"] = "메인 바 자동 숨기기 활성화",
["options.layout.mainbar_autohide_desc"] = "선택 시: 비활성 상태 후 메인 바가 숨겨지며, 핫스팟에 마우스를 올리면 다시 표시됩니다.",
["options.layout.mainbar_autohide_delay"] = "메인 바 자동 숨기기 지연 시간",
["options.layout.owner_import"] = "가져올 플레이어 레이아웃",
["options.layout.export"] = "레이아웃 내보내기",
["options.layout.import"] = "레이아웃 가져오기",
Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-ruRU.lua
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ local ruRUValues = {
["options.layout.lock_mainbar_desc"] = "Включено: Ctrl + ПКМ для перемещения панели. Выключено: достаточно ПКМ.",
["options.layout.disable_autocollapse"] = "Отключить авто-сворачивание панелей ботов",
["options.layout.disable_autocollapse_desc"] = "Включено: при открытии подменю ботов другие панели ботов не будут сворачиваться.",
["options.layout.mainbar_autohide"] = "Включить авто‑скрытие главной панели",
["options.layout.mainbar_autohide_desc"] = "Включено: главная панель будет скрываться после бездействия и появляться при наведении на её область.",
["options.layout.mainbar_autohide_delay"] = "Задержка авто‑скрытия главной панели",
["options.layout.owner_import"] = "Макет игрока для импорта",
["options.layout.export"] = "Экспорт макета",
["options.layout.import"] = "Импорт макета",
Expand Down
3 changes: 3 additions & 0 deletions Locales/MultiBotAceLocale-zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ local zhCNValues = {
["options.layout.lock_mainbar_desc"] = "勾选:Ctrl + 右键拖动动作条。取消勾选:仅右键即可。",
["options.layout.disable_autocollapse"] = "禁用机器人栏的自动折叠",
["options.layout.disable_autocollapse_desc"] = "勾选:打开机器人子菜单时不会折叠其他机器人栏。",
["options.layout.mainbar_autohide"] = "启用主栏自动隐藏",
["options.layout.mainbar_autohide_desc"] = "勾选:主栏在无操作后会自动隐藏,鼠标悬停在热点区域时重新显示。",
["options.layout.mainbar_autohide_delay"] = "主栏自动隐藏延迟",
["options.layout.owner_import"] = "要导入的玩家布局",
["options.layout.export"] = "导出布局",
["options.layout.import"] = "导入布局",
Expand Down
Loading
Loading