diff --git a/UI/MultiBotAttackUI.lua b/UI/MultiBotAttackUI.lua index 671e93c..10e9213 100644 --- a/UI/MultiBotAttackUI.lua +++ b/UI/MultiBotAttackUI.lua @@ -11,8 +11,8 @@ local ATTACK_BUTTONS = { local ATTACK_ICON = "Interface\\AddOns\\MultiBot\\Icons\\attack.blp" local ATTACK_FRAME_NAME = "Attack" -local ATTACK_MAIN_X = -136 -local ATTACK_FRAME_X = -138 +local ATTACK_MAIN_X = -204 +local ATTACK_FRAME_X = -206 local ATTACK_FRAME_Y = 34 local ATTACK_CELL_HEIGHT = 30 diff --git a/UI/MultiBotDisperseUI.lua b/UI/MultiBotDisperseUI.lua index 8d090a2..c4b5a9c 100644 --- a/UI/MultiBotDisperseUI.lua +++ b/UI/MultiBotDisperseUI.lua @@ -53,7 +53,7 @@ function MultiBot.BuildDisperseUI(tLeft) local lastDistance = "10" local button - local menu = tLeft.addFrame("DisperseMenu", -238, 34, 24, 56, 96).doHide() + local menu = tLeft.addFrame("DisperseMenu", -34, 34, 24, 56, 96).doHide() local menuOpen = false menu._mbDropdownManaged = true menu:SetWidth(56) @@ -146,7 +146,7 @@ function MultiBot.BuildDisperseUI(tLeft) MultiBot.frames.disperseMenu = menu - button = tLeft.addButton("Disperse", -238, 0, "spell_nature_wispsplode", L("tips.disperse.main", "Disperse")).setDisable() + button = tLeft.addButton("Disperse", -34, 0, "spell_nature_wispsplode", L("tips.disperse.main", "Disperse")).setDisable() button.doLeft = function() if menuOpen then hideDisperseMenu() diff --git a/UI/MultiBotFleeUI.lua b/UI/MultiBotFleeUI.lua index 2d72a2b..624a2bd 100644 --- a/UI/MultiBotFleeUI.lua +++ b/UI/MultiBotFleeUI.lua @@ -12,8 +12,8 @@ local FLEE_BUTTONS = { local FLEE_ICON = "Interface\\AddOns\\MultiBot\\Icons\\flee.blp" local FLEE_FRAME_NAME = "Flee" -local FLEE_MAIN_X = -34 -local FLEE_FRAME_X = -36 +local FLEE_MAIN_X = -102 +local FLEE_FRAME_X = -104 local FLEE_FRAME_Y = 34 local FLEE_CELL_HEIGHT = 30 diff --git a/UI/MultiBotLeftCoreUI.lua b/UI/MultiBotLeftCoreUI.lua index 730dc66..8195a37 100644 --- a/UI/MultiBotLeftCoreUI.lua +++ b/UI/MultiBotLeftCoreUI.lua @@ -3,7 +3,7 @@ if not MultiBot then return end local MODE_FRAME_NAME = "Mode" local MODE_BUTTON_NAME = "Mode" local MODE_BUTTON_ICON = "Interface\\AddOns\\MultiBot\\Icons\\mode_passive.blp" -local MODE_FRAME_X = -104 +local MODE_FRAME_X = -172 local MODE_FRAME_Y = 34 local function bindModeToggleAction(modeButton, enableCommand, disableCommand) @@ -17,7 +17,7 @@ local function bindModeToggleAction(modeButton, enableCommand, disableCommand) end local function createModeUI(tLeft) - local modeButton = tLeft.addButton(MODE_BUTTON_NAME, -102, 0, MODE_BUTTON_ICON, MultiBot.L("tips.mode.master")).setDisable() + local modeButton = tLeft.addButton(MODE_BUTTON_NAME, -170, 0, MODE_BUTTON_ICON, MultiBot.L("tips.mode.master")).setDisable() modeButton.doRight = function(button) MultiBot.ShowHideSwitch(button.parent.frames[MODE_FRAME_NAME]) @@ -48,7 +48,7 @@ local function createModeUI(tLeft) end local function createStayFollowUI(tLeft) - tLeft.addButton("Stay", -68, 0, "Interface\\AddOns\\MultiBot\\Icons\\command_follow.blp", MultiBot.L("tips.stallow.stay")).doLeft = function(button) + tLeft.addButton("Stay", -136, 0, "Interface\\AddOns\\MultiBot\\Icons\\command_follow.blp", MultiBot.L("tips.stallow.stay")).doLeft = function(button) if MultiBot.ActionToGroup("stay") then button.parent.buttons["Follow"].doShow() button.parent.buttons["ExpandFollow"].setDisable() @@ -57,7 +57,7 @@ local function createStayFollowUI(tLeft) end end - tLeft.addButton("Follow", -68, 0, "Interface\\AddOns\\MultiBot\\Icons\\command_stay.blp", MultiBot.L("tips.stallow.follow")).doHide().doLeft = function(button) + tLeft.addButton("Follow", -136, 0, "Interface\\AddOns\\MultiBot\\Icons\\command_stay.blp", MultiBot.L("tips.stallow.follow")).doHide().doLeft = function(button) if MultiBot.ActionToGroup("follow") then button.parent.buttons["Stay"].doShow() button.parent.buttons["ExpandFollow"].setEnable() @@ -66,13 +66,13 @@ local function createStayFollowUI(tLeft) end end - tLeft.addButton("ExpandStay", -68, 0, "Interface\\AddOns\\MultiBot\\Icons\\command_stay.blp", MultiBot.tips.expand.stay).doHide().setDisable().doLeft = function(button) + tLeft.addButton("ExpandStay", -136, 0, "Interface\\AddOns\\MultiBot\\Icons\\command_stay.blp", MultiBot.tips.expand.stay).doHide().setDisable().doLeft = function(button) MultiBot.ActionToGroup("stay") button.parent.buttons["ExpandFollow"].setDisable() button.setEnable() end - tLeft.addButton("ExpandFollow", -102, 0, "Interface\\AddOns\\MultiBot\\Icons\\command_follow.blp", MultiBot.tips.expand.follow).doHide().doLeft = function(button) + tLeft.addButton("ExpandFollow", -170, 0, "Interface\\AddOns\\MultiBot\\Icons\\command_follow.blp", MultiBot.tips.expand.follow).doHide().doLeft = function(button) MultiBot.ActionToGroup("follow") button.parent.buttons["ExpandStay"].setDisable() button.setEnable() @@ -85,7 +85,7 @@ function MultiBot.InitializeLeftCoreUI(tLeft) end if MultiBot.BuildBotRTIActionUI then - MultiBot.BuildBotRTIActionUI(tLeft, -238, 0) + MultiBot.BuildBotRTIActionUI(tLeft, -306, 0) end if MultiBot.BuildDisperseUI then @@ -96,7 +96,7 @@ function MultiBot.InitializeLeftCoreUI(tLeft) MultiBot.BuildLootUI(tLeft) end - tLeft.addButton("Tanker", -170, 0, "ability_warrior_shieldbash", MultiBot.L("tips.tanker.master")).doLeft = function() + tLeft.addButton("Tanker", -238, 0, "ability_warrior_shieldbash", MultiBot.L("tips.tanker.master")).doLeft = function() if MultiBot.isTarget() then MultiBot.ActionToGroup("@tank do attack my target") end diff --git a/UI/MultiBotLootUI.lua b/UI/MultiBotLootUI.lua index 7c0c187..77a4139 100644 --- a/UI/MultiBotLootUI.lua +++ b/UI/MultiBotLootUI.lua @@ -53,7 +53,7 @@ function MultiBot.BuildLootUI(tLeft) end local button - local menu = tLeft.addFrame("LootMenu", -277, 34, 24, 24, 170).doHide() + local menu = tLeft.addFrame("LootMenu", -73, 34, 24, 24, 170).doHide() local menuOpen = false local menuButtons = {} local menuButtonsByKey = {} @@ -158,7 +158,7 @@ function MultiBot.BuildLootUI(tLeft) MultiBot.frames.lootMenu = menu - button = tLeft.addButton("Loot", -272, 0, "inv_misc_bag_10", L("tips.loot.main", "Loot rules")).setDisable() + button = tLeft.addButton("Loot", -68, 0, "inv_misc_bag_10", L("tips.loot.main", "Loot rules")).setDisable() button.doLeft = function() if menuOpen then hideLootMenu() diff --git a/UI/MultiBotMainUI.lua b/UI/MultiBotMainUI.lua index e0b100b..31cab65 100644 --- a/UI/MultiBotMainUI.lua +++ b/UI/MultiBotMainUI.lua @@ -13,6 +13,9 @@ local MAINBAR_AUTOHIDE_HOTSPOT_SIZE = 42 local MAINBAR_AUTOHIDE_UPDATE_INTERVAL = 0.2 local LEFT_LAYOUT_NAMES = { + "BotRTI", + "Disperse", + "Loot", "Tanker", "Attack", "Mode", @@ -25,6 +28,12 @@ local LEFT_LAYOUT_NAMES = { "Beast", } +local LEFT_LAYOUT_FRAME_NAMES = { + BotRTI = "BotRTIAction", + Disperse = "DisperseMenu", + Loot = "LootMenu", +} + local leftLayoutBase = nil local function withLeftRoot(callback) @@ -60,9 +69,10 @@ local function captureLeftLayoutBase(leftRoot) leftLayoutBase.buttons[name] = { x = button.x, y = button.y } end - local frame = leftRoot.frames and leftRoot.frames[name] + local frameName = LEFT_LAYOUT_FRAME_NAMES[name] or name + local frame = leftRoot.frames and leftRoot.frames[frameName] if frame then - leftLayoutBase.frames[name] = { x = frame.x, y = frame.y } + leftLayoutBase.frames[frameName] = { x = frame.x, y = frame.y } end end end @@ -73,10 +83,11 @@ local function setLeftElementX(leftRoot, name, x) button.setPoint(x, button.y) end - local frame = leftRoot.frames and leftRoot.frames[name] + local frameName = LEFT_LAYOUT_FRAME_NAMES[name] or name + local frame = leftRoot.frames and leftRoot.frames[frameName] if frame then local baseButton = leftLayoutBase and leftLayoutBase.buttons and leftLayoutBase.buttons[name] - local baseFrame = leftLayoutBase and leftLayoutBase.frames and leftLayoutBase.frames[name] + local baseFrame = leftLayoutBase and leftLayoutBase.frames and leftLayoutBase.frames[frameName] local frameOffset = -2 if baseButton and baseFrame then frameOffset = baseFrame.x - baseButton.x @@ -124,6 +135,7 @@ local function refreshLeftLayout() heavyShift = heavyShift - LEFT_LAYOUT_SHIFT end + setLeftElementX(leftRoot, "BotRTI", getLeftBaseX(leftRoot, "BotRTI") + heavyShift) setLeftElementX(leftRoot, "Tanker", getLeftBaseX(leftRoot, "Tanker") + heavyShift) setLeftElementX(leftRoot, "Attack", getLeftBaseX(leftRoot, "Attack") + heavyShift) setLeftElementX(leftRoot, "Mode", getLeftBaseX(leftRoot, "Mode") + heavyShift) @@ -133,6 +145,8 @@ local function refreshLeftLayout() setLeftElementX(leftRoot, "ExpandStay", getLeftBaseX(leftRoot, "ExpandStay") + commonShift) setLeftElementX(leftRoot, "ExpandFollow", getLeftBaseX(leftRoot, "ExpandFollow") + commonShift) setLeftElementX(leftRoot, "Flee", getLeftBaseX(leftRoot, "Flee") + commonShift) + setLeftElementX(leftRoot, "Loot", getLeftBaseX(leftRoot, "Loot") + commonShift) + setLeftElementX(leftRoot, "Disperse", getLeftBaseX(leftRoot, "Disperse") + commonShift) setLeftElementX(leftRoot, "Format", getLeftBaseX(leftRoot, "Format") + commonShift) setLeftElementX(leftRoot, "Beast", getLeftBaseX(leftRoot, "Beast") + (creatorEnabled and -LEFT_LAYOUT_SHIFT or 0)) diff --git a/UI/MultiBotRTIUI.lua b/UI/MultiBotRTIUI.lua index 8869786..7929a8d 100644 --- a/UI/MultiBotRTIUI.lua +++ b/UI/MultiBotRTIUI.lua @@ -473,12 +473,12 @@ function MultiBot.RunStoredBotRTISelections(command) return true end -function MultiBot.BuildBotRTIActionUI(tLeft) +function MultiBot.BuildBotRTIActionUI(tLeft, x, y) if not tLeft or not tLeft.addButton or not tLeft.addFrame then return nil end - local buttonX = x or -238 + local buttonX = x or -306 local buttonY = y or 0 local button = tLeft.addButton(