From f99404c5a6274624dcd992cc0cf59e3aaedea756 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Thu, 9 Oct 2008 00:40:03 +0200 Subject: [PATCH] Added a Vertical MicroMenu option The MicroMenu can once again be vertical again, however it does not have a full-blown Rows configuration like the actionbars do, due to some issues with the non-square micromenu buttons. As a result of that, padding between the buttons is currently not available either. Its planned to make the MicroMenu use the default ButtonBar template too in the future. --- MicroMenu.lua | 9 ++++++++- Options/MicroMenu.lua | 10 ++++++++++ locale/deDE.lua | 2 ++ locale/enUS.lua | 2 ++ locale/esES.lua | 2 ++ locale/esMX.lua | 2 ++ locale/frFR.lua | 2 ++ locale/koKR.lua | 2 ++ locale/ruRU.lua | 2 ++ locale/zhCN.lua | 2 ++ locale/zhTW.lua | 2 ++ 11 files changed, 36 insertions(+), 1 deletion(-) diff --git a/MicroMenu.lua b/MicroMenu.lua index 2c8e5fd..bc33909 100644 --- a/MicroMenu.lua +++ b/MicroMenu.lua @@ -43,6 +43,7 @@ function MicroMenuMod:OnEnable() self.bar.buttons = buttons self:RawHook("UpdateTalentButton", noopFunc, true) + self:RawHook("AchievementMicroButton_Update", noopFunc, true) for i,v in pairs(buttons) do v:SetParent(self.bar) @@ -75,7 +76,13 @@ end function MicroMenuBar:PerformLayout() if self.config.vertical then - -- TODO: vertical + self:SetSize(35, 377) + self.buttons[1]:ClearAllPoints() + self.buttons[1]:SetPoint("TOPLEFT", self, "TOPLEFT", 5, 18) + for i = 2, #self.buttons do + self.buttons[i]:ClearAllPoints() + self.buttons[i]:SetPoint("TOPLEFT", self.buttons[i-1], "BOTTOMLEFT", 0, 21) + end else self:SetSize(252, 45) self.buttons[1]:ClearAllPoints() diff --git a/Options/MicroMenu.lua b/Options/MicroMenu.lua index 90e26c0..8ade0a0 100644 --- a/Options/MicroMenu.lua +++ b/Options/MicroMenu.lua @@ -19,6 +19,16 @@ function MicroMenuMod:SetupOptions() } self.optionobject:AddElement("general", "enabled", enabled) + local vertical = { + type = "toggle", + order = 150, + name = L["Vertical MicroMenu"], + desc = L["Show the MicroMenu vertically."], + get = function() return self.db.profile.vertical end, + set = function(info, state) self.db.profile.vertical = state; self.bar:PerformLayout() end, + } + self.optionobject:AddElement("general", "vertical", vertical) + self.disabledoptions = { general = { type = "group", diff --git a/locale/deDE.lua b/locale/deDE.lua index d6afcad..ee0b57a 100644 --- a/locale/deDE.lua +++ b/locale/deDE.lua @@ -93,6 +93,7 @@ if not L then return end -- L["SHIFT"] = true -- L["Scale"] = true -- L["Self-Cast by modifier"] = true +-- L["Show the MicroMenu vertically."] = true -- L["Show the keyring button."] = true -- L["Specify the Color of the Out of Mana Indicator"] = true -- L["Specify the Color of the Out of Range Indicator"] = true @@ -111,6 +112,7 @@ if not L then return end -- L["Toggle the use of the modifier-based self-cast functionality."] = true -- L["Toggle the use of the right-click self-cast functionality."] = true -- L["Use Custom Condition"] = true +-- L["Vertical MicroMenu"] = true -- L["Visibility"] = true -- L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true -- L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true diff --git a/locale/enUS.lua b/locale/enUS.lua index 865d1dd..105c2cf 100644 --- a/locale/enUS.lua +++ b/locale/enUS.lua @@ -93,6 +93,7 @@ L["Rows"] = true L["SHIFT"] = true L["Scale"] = true L["Self-Cast by modifier"] = true +L["Show the MicroMenu vertically."] = true L["Show the keyring button."] = true L["Specify the Color of the Out of Mana Indicator"] = true L["Specify the Color of the Out of Range Indicator"] = true @@ -111,6 +112,7 @@ L["Toggle the button grid."] = true L["Toggle the use of the modifier-based self-cast functionality."] = true L["Toggle the use of the right-click self-cast functionality."] = true L["Use Custom Condition"] = true +L["Vertical MicroMenu"] = true L["Visibility"] = true L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true diff --git a/locale/esES.lua b/locale/esES.lua index 5b33f5b..3a69052 100644 --- a/locale/esES.lua +++ b/locale/esES.lua @@ -93,6 +93,7 @@ if not L then return end -- L["SHIFT"] = true -- L["Scale"] = true -- L["Self-Cast by modifier"] = true +-- L["Show the MicroMenu vertically."] = true -- L["Show the keyring button."] = true -- L["Specify the Color of the Out of Mana Indicator"] = true -- L["Specify the Color of the Out of Range Indicator"] = true @@ -111,6 +112,7 @@ if not L then return end -- L["Toggle the use of the modifier-based self-cast functionality."] = true -- L["Toggle the use of the right-click self-cast functionality."] = true -- L["Use Custom Condition"] = true +-- L["Vertical MicroMenu"] = true -- L["Visibility"] = true -- L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true -- L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true diff --git a/locale/esMX.lua b/locale/esMX.lua index 1d503f4..ceb811c 100644 --- a/locale/esMX.lua +++ b/locale/esMX.lua @@ -93,6 +93,7 @@ if not L then return end -- L["SHIFT"] = true -- L["Scale"] = true -- L["Self-Cast by modifier"] = true +-- L["Show the MicroMenu vertically."] = true -- L["Show the keyring button."] = true -- L["Specify the Color of the Out of Mana Indicator"] = true -- L["Specify the Color of the Out of Range Indicator"] = true @@ -111,6 +112,7 @@ if not L then return end -- L["Toggle the use of the modifier-based self-cast functionality."] = true -- L["Toggle the use of the right-click self-cast functionality."] = true -- L["Use Custom Condition"] = true +-- L["Vertical MicroMenu"] = true -- L["Visibility"] = true -- L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true -- L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true diff --git a/locale/frFR.lua b/locale/frFR.lua index 74c2bcb..419c7a1 100644 --- a/locale/frFR.lua +++ b/locale/frFR.lua @@ -93,6 +93,7 @@ L["Rows"] = "Rangées" L["SHIFT"] = "SHIFT" L["Scale"] = "Échelle" L["Self-Cast by modifier"] = "Ciblage auto. modific." +-- L["Show the MicroMenu vertically."] = true L["Show the keyring button."] = "Affiche le bouton du trousseau de clés." L["Specify the Color of the Out of Mana Indicator"] = "Spécifie la couleur de l'indicateur Plus de mana." L["Specify the Color of the Out of Range Indicator"] = "Spécifie la couleur de l'indicateur Hors de portée." @@ -111,6 +112,7 @@ L["Toggle the button grid."] = "Affiche ou non la grille des boutons." L["Toggle the use of the modifier-based self-cast functionality."] = "Utilise ou non la fonctionnalité de ciblage auto. basé sur les modificateurs." L["Toggle the use of the right-click self-cast functionality."] = "Utilise ou non la fonctionnalité de ciblage auto. au clic droit." -- L["Use Custom Condition"] = true +-- L["Vertical MicroMenu"] = true -- L["Visibility"] = true -- L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true -- L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true diff --git a/locale/koKR.lua b/locale/koKR.lua index c88ddfe..46956f9 100644 --- a/locale/koKR.lua +++ b/locale/koKR.lua @@ -93,6 +93,7 @@ L["Rows"] = "열" L["SHIFT"] = "SHIFT" L["Scale"] = "크기" L["Self-Cast by modifier"] = "기능키에 의한 자신-시전" +-- L["Show the MicroMenu vertically."] = true L["Show the keyring button."] = "열쇠 고리 버튼을 표시합니다." L["Specify the Color of the Out of Mana Indicator"] = "마나 부족 지시기의 색상을 지정합니다." L["Specify the Color of the Out of Range Indicator"] = "사정 거리밖 지시기의 색상을 지정합니다." @@ -111,6 +112,7 @@ L["Toggle the button grid."] = "버튼 무늬를 전환합니다." L["Toggle the use of the modifier-based self-cast functionality."] = "기능키-기반 자신에게 시전 기능의 사용을 전환합니다." L["Toggle the use of the right-click self-cast functionality."] = "우-클릭시 자신에게 시전 기능의 사용을 전환합니다." L["Use Custom Condition"] = "사용자 설정 사용" +-- L["Vertical MicroMenu"] = true L["Visibility"] = "보이기" L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = "단축키로 지정해서 사용한다면 모든 바를 숨길 수 있습니다." L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = "매크로 조건을 통해 바의 상태를 변경할 수 있습니다. 예를 들어 '보기', '숨기기' 등은 [combat]hide;show와 같이 사용이 가능합니다." diff --git a/locale/ruRU.lua b/locale/ruRU.lua index 99ff012..08985aa 100644 --- a/locale/ruRU.lua +++ b/locale/ruRU.lua @@ -93,6 +93,7 @@ L["Rows"] = "Строки" L["SHIFT"] = "SHIFT" L["Scale"] = "Масштаб" L["Self-Cast by modifier"] = "Чтение на себя по умолчанию" +-- L["Show the MicroMenu vertically."] = true L["Show the keyring button."] = "Показывать кнопку для связки ключей" L["Specify the Color of the Out of Mana Indicator"] = "Выберите цвет для индикации нехватки маны" L["Specify the Color of the Out of Range Indicator"] = "Выберите цвет для индикации 'Вне Зоны'" @@ -111,6 +112,7 @@ L["Toggle the button grid."] = "Переключение отображения L["Toggle the use of the modifier-based self-cast functionality."] = "Переключение использования функции Чтение на себя по умолчанию." L["Toggle the use of the right-click self-cast functionality."] = "Переключение использования функции ПКМ Чтение на себя." -- L["Use Custom Condition"] = true +-- L["Vertical MicroMenu"] = true -- L["Visibility"] = true -- L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true -- L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true diff --git a/locale/zhCN.lua b/locale/zhCN.lua index 7885c19..34baaa4 100644 --- a/locale/zhCN.lua +++ b/locale/zhCN.lua @@ -93,6 +93,7 @@ L["Rows"] = "行" L["SHIFT"] = "按下SHIFT" L["Scale"] = "缩放" L["Self-Cast by modifier"] = "自我施法" +-- L["Show the MicroMenu vertically."] = true L["Show the keyring button."] = "显示钥匙链" L["Specify the Color of the Out of Mana Indicator"] = "设置法力不足的标识颜色" L["Specify the Color of the Out of Range Indicator"] = "设置射程之外的标识颜色" @@ -111,6 +112,7 @@ L["Toggle the button grid."] = "勾选该选项将显示空的按钮。" L["Toggle the use of the modifier-based self-cast functionality."] = "关闭/开启 自我施法功能。" L["Toggle the use of the right-click self-cast functionality."] = "关闭/开启 使用右键点击对自己施法功能。" -- L["Use Custom Condition"] = true +-- L["Vertical MicroMenu"] = true -- L["Visibility"] = true -- L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true -- L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true diff --git a/locale/zhTW.lua b/locale/zhTW.lua index 5b2ff53..0963c4f 100644 --- a/locale/zhTW.lua +++ b/locale/zhTW.lua @@ -93,6 +93,7 @@ L["Rows"] = "行" L["SHIFT"] = "SHIFT" L["Scale"] = "大小" L["Self-Cast by modifier"] = "自我施法" +-- L["Show the MicroMenu vertically."] = true L["Show the keyring button."] = "顯示鑰匙圈按鈕" L["Specify the Color of the Out of Mana Indicator"] = "指定法力不足提示的顏色" L["Specify the Color of the Out of Range Indicator"] = "指定超出距離提示的顏色" @@ -111,6 +112,7 @@ L["Toggle the button grid."] = "顯示空白按鈕" L["Toggle the use of the modifier-based self-cast functionality."] = "切換使用自我施法功能" L["Toggle the use of the right-click self-cast functionality."] = "切換使用右鍵自我施法功能" -- L["Use Custom Condition"] = true +-- L["Vertical MicroMenu"] = true -- L["Visibility"] = true -- L["You can set the bar to be always hidden, if you only wish to access it using key-bindings."] = true -- L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"] = true