├── img ├── a.tga ├── b.tga ├── up.tga ├── x.tga ├── y.tga ├── down.tga ├── left.tga └── right.tga ├── screenshots ├── mapping.jpg ├── keyboard.jpg ├── overview.jpg └── outofrange.jpg ├── core.lua ├── ShaguController.toc ├── loot.lua ├── Bindings.xml ├── LICENSE ├── keybinds.lua ├── README.md └── ui.lua /img/a.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shagu/ShaguController/HEAD/img/a.tga -------------------------------------------------------------------------------- /img/b.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shagu/ShaguController/HEAD/img/b.tga -------------------------------------------------------------------------------- /img/up.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shagu/ShaguController/HEAD/img/up.tga -------------------------------------------------------------------------------- /img/x.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shagu/ShaguController/HEAD/img/x.tga -------------------------------------------------------------------------------- /img/y.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shagu/ShaguController/HEAD/img/y.tga -------------------------------------------------------------------------------- /img/down.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shagu/ShaguController/HEAD/img/down.tga -------------------------------------------------------------------------------- /img/left.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shagu/ShaguController/HEAD/img/left.tga -------------------------------------------------------------------------------- /img/right.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shagu/ShaguController/HEAD/img/right.tga -------------------------------------------------------------------------------- /screenshots/mapping.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shagu/ShaguController/HEAD/screenshots/mapping.jpg -------------------------------------------------------------------------------- /screenshots/keyboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shagu/ShaguController/HEAD/screenshots/keyboard.jpg -------------------------------------------------------------------------------- /screenshots/overview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shagu/ShaguController/HEAD/screenshots/overview.jpg -------------------------------------------------------------------------------- /screenshots/outofrange.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shagu/ShaguController/HEAD/screenshots/outofrange.jpg -------------------------------------------------------------------------------- /core.lua: -------------------------------------------------------------------------------- 1 | ShaguController = {} 2 | ShaguControllerConfig = {} 3 | 4 | BINDING_HEADER_SHAGUCONTROL = "ShaguController Custom Buttons" 5 | -------------------------------------------------------------------------------- /ShaguController.toc: -------------------------------------------------------------------------------- 1 | ## Interface: 11200 2 | ## Title: |cffffcc00Shagu|cffffffffController 3 | ## Author: Shagu 4 | ## Notes: Adds a basic controller compatible UI and bindings 5 | ## SavedVariablesPerCharacter: ShaguControllerConfig 6 | ## Version: GIT 7 | 8 | core.lua 9 | 10 | keybinds.lua 11 | loot.lua 12 | ui.lua 13 | -------------------------------------------------------------------------------- /loot.lua: -------------------------------------------------------------------------------- 1 | local loot = CreateFrame("Frame", "ShaguControllerLoot", LootFrame) 2 | loot:SetScript("OnUpdate", function() 3 | if GetNumLootItems() == 0 then HideUIPanel(LootFrame) return end 4 | 5 | local x, y = GetCursorPosition() 6 | local s = LootFrame:GetEffectiveScale() 7 | x, y = x / s, y / s 8 | 9 | for i = 1, LOOTFRAME_NUMBUTTONS, 1 do 10 | local button = getglobal("LootButton"..i) 11 | if button:IsVisible() then 12 | 13 | if loot.last_button ~= button then 14 | local button_offset = (i-1) * button:GetHeight() 15 | LootFrame:ClearAllPoints() 16 | LootFrame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", x - 40, y + 100 + button_offset) 17 | loot.last_button = button 18 | end 19 | 20 | return 21 | end 22 | end 23 | end) 24 | 25 | loot:SetScript("OnShow", function() 26 | loot.last_button = nil 27 | end) 28 | 29 | -- save to main frame 30 | ShaguController.loot = loot 31 | -------------------------------------------------------------------------------- /Bindings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ShaguControlButton(0) 4 | 5 | 6 | 7 | if ( keystate == "down" ) then 8 | ToggleCharacter("PaperDollFrame") 9 | ToggleKeyRing() 10 | OpenAllBags() 11 | end 12 | 13 | 14 | 15 | 16 | if ( keystate == "down" ) then 17 | ToggleQuestLog() 18 | end 19 | 20 | 21 | 22 | 23 | if ( keystate == "down" ) then 24 | ToggleTalentFrame() 25 | ToggleFriendsFrame() 26 | end 27 | 28 | 29 | 30 | 31 | if ( keystate == "down" ) then 32 | ToggleSpellBook(BOOKTYPE_SPELL) 33 | end 34 | 35 | 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2022 Eric Mauser (Shagu) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /keybinds.lua: -------------------------------------------------------------------------------- 1 | local keybinds = CreateFrame("Frame", "ShaguControllerKeybinds") 2 | keybinds:RegisterEvent("PLAYER_LOGIN") 3 | keybinds:RegisterEvent("PLAYER_LOGOUT") 4 | keybinds:SetScript("OnEvent", function() 5 | if event == "PLAYER_LOGIN" then 6 | -- save previous keybinds 7 | keybinds.previous_bindings = GetCurrentBindingSet() 8 | 9 | -- overwrite keybindings on login 10 | SetBinding("TAB", "TOGGLEWORLDMAP") -- Window (TabKey) 11 | SetBinding("1", "SHAGUCONTROL1") -- Trackpad-Up: Inventory + Character 12 | SetBinding("2", "SHAGUCONTROL2") -- Trackpad-Right: QuestLog 13 | SetBinding("3", "SHAGUCONTROL3") -- Trackpad-Down: Talents & Social 14 | SetBinding("4", "SHAGUCONTROL4") -- Trackpad-Left: Spellbook 15 | SetBinding("MOUSEWHEELDOWN", "TARGETPREVIOUSENEMY") -- L1 16 | SetBinding("MOUSEWHEELUP", "TARGETNEARESTENEMY") -- R1 17 | SetBinding("F", "ACTIONBUTTON1") -- Y 18 | SetBinding("R", "ACTIONBUTTON2") -- X 19 | SetBinding("E", "ACTIONBUTTON3") -- B 20 | -- Jump -- A 21 | SetBinding("UP", "ACTIONBUTTON5") -- Arrow-Up 22 | SetBinding("RIGHT", "ACTIONBUTTON10") -- Arrow-Right 23 | SetBinding("DOWN", "ACTIONBUTTON11") -- Arrow-Down 24 | SetBinding("LEFT", "ACTIONBUTTON12") -- Arrow-Down 25 | SaveBindings(GetCurrentBindingSet()) 26 | 27 | -- notify the player for keybind changes 28 | DEFAULT_CHAT_FRAME:AddMessage("|cffffcc00Shagu|cffffffffController: Initialized Keybinds") 29 | elseif event == "PLAYER_LOGOUT" and keybinds.previous_bindings then 30 | SaveBindings(keybinds.previous_bindings) 31 | DEFAULT_CHAT_FRAME:AddMessage("|cffffcc00Shagu|cffffffffController: Old Keybinds Restored") 32 | end 33 | end) 34 | 35 | -- save to main frame 36 | ShaguController.keybinds = keybinds 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ShaguController 2 | 3 | A World of Warcraft (1.12) addon that enhances the default user interface to be more controller friendly. This addon is made with the [SteamDeck](https://www.steamdeck.com/en/) in mind. If you don't use a SteamDeck you need to use another software to map controller buttons to keyboard buttons. 4 | 5 | > WARNING: This addon changes in-game keybinds to align with the SteamDeck's 'Keyboard (WASD) and Mouse' layout. If you run this addon on your PC, you might need to restore your old keybinds manually after. 6 | 7 | ![Overview](screenshots/overview.jpg) 8 | *(Addons used: ShaguController, ShaguTweaks, ShaguPlates, pfQuest)* 9 | 10 | ## Installation (Vanilla, 1.12) 11 | 1. Download **[Latest Version](https://github.com/shagu/ShaguController/archive/master.zip)** 12 | 2. Unpack the Zip file 13 | 3. Rename the folder "ShaguController-master" to "ShaguController" 14 | 4. Copy "ShaguController" into Wow-Directory\Interface\AddOns 15 | 5. Restart Wow 16 | 17 | ## Keybinding 18 | 19 | The addon sets in-game keybinds based on the button mappings provided by SteamDeck's "Keyboard (WASD) and Mouse"-Layout: 20 | ![Mapping](screenshots/mapping.jpg) 21 | 22 | * The A button is bound to jump 23 | * The Y, B and X buttons are bound to the 3 action buttons on the right side 24 | * The D-Pad is bound to the 4 action buttons on the left side 25 | * The L1 and R1 buttons are used for next-target and previous-target selection 26 | * The "Tab Key" opens the world map 27 | * The "Left Trackpad" is bound to: 28 | - Up: Toggle bags and inventory 29 | - Right: Toggle quest log 30 | - Down: Toggle friend list 31 | - Left: Toggle spell book 32 | 33 | ## UI Changes 34 | 35 | * The action bar size is reduced and got all action buttons removed, to have only the 36 | bag buttons and the micro panel left. 37 | * The normal action buttons are moved to the left and the right side 38 | to match the gamepad layout. 39 | * Action buttons got their keybinds replaced by gamepad button icons. 40 | * Out-of-Range actions will be displayed as a gray-scaled texture. 41 | * The loot window is automatically positioned to have the most relevant part of it under your cursor. 42 | * The chat window is attached to the main actionbar and got buttons removed. 43 | * Clicking on the chat window will zoom and move it to make space for the onscreen keyboard. 44 | 45 | ![Keyboard](screenshots/keyboard.jpg) 46 | *Chat is moved, to make space for screen keyboard* 47 | 48 | ![Outofrange](screenshots/outofrange.jpg) 49 | *Buttons shade to grayscale if out of range* 50 | 51 | # Play on SteamDeck 52 | 53 | > Prerequisite: You already have the game copied over to the steamdeck. 54 | 55 | Enter the Desktop Mode, navigate to your World of Warcraft directory and install the add-on as usual: 56 | 57 | cd Interface/AddOns 58 | git clone https://github.com/shagu/ShaguController 59 | cd - 60 | 61 | Open Steam Library and click on "[+] Add a Game" and select "Add a Non-Steam Game...". 62 | Browse to your World of Warcraft Folder and select WoW.exe. Then choose "Add Selected Programs". 63 | Find the "WoW.exe" in your Steam Library and right click -> Properties. You can set the name there to: World of Warcraft 64 | 65 | Next, open the Steam Settings and navigate to "Steam Play". There you want to enable: "Enable Steam Play for all other titles". 66 | The preselected proton version should be fine. If something doesn't work or you have graphical glitches, try to select another version there. 67 | 68 | ## AutoLogin 69 | 70 | Entering an account and password on a Steam Deck can be a hassle. A client patch like [Turtle-Autologin](https://github.com/Haaxor1689/turtle-autologin) or 71 | [Vanilla-Autologin](https://github.com/Haaxor1689/vanilla-autologin) can help by adding an account selection field to the login screen. 72 | Follow the install instructions there to get it running. -------------------------------------------------------------------------------- /ui.lua: -------------------------------------------------------------------------------- 1 | local _G = _G or getfenv(0) 2 | 3 | local resizes = { 4 | MainMenuBar, MainMenuExpBar, MainMenuBarMaxLevelBar, 5 | ReputationWatchBar, ReputationWatchStatusBar, 6 | } 7 | 8 | local frames = { 9 | BonusActionBarTexture0, BonusActionBarTexture1, 10 | ShapeshiftBarLeft, ShapeshiftBarMiddle, ShapeshiftBarRight, 11 | MainMenuMaxLevelBar2, MainMenuMaxLevelBar3, 12 | } 13 | 14 | local textures = { 15 | MainMenuBarTexture0, MainMenuBarTexture1, 16 | MainMenuXPBarTexture2, MainMenuXPBarTexture3, 17 | ReputationWatchBarTexture2, ReputationWatchBarTexture3, 18 | ReputationXPBarTexture2, ReputationXPBarTexture3, 19 | SlidingActionBarTexture0, SlidingActionBarTexture1, 20 | } 21 | 22 | local normtextures = { 23 | ShapeshiftButton1, ShapeshiftButton2, 24 | ShapeshiftButton3, ShapeshiftButton4, 25 | ShapeshiftButton5, ShapeshiftButton6, 26 | } 27 | 28 | -- general function to hide textures and frames 29 | local function hide(frame, texture) 30 | if not frame then return end 31 | 32 | if texture and texture == 1 and frame.SetTexture then 33 | frame:SetTexture("") 34 | elseif texture and texture == 2 and frame.SetNormalTexture then 35 | frame:SetNormalTexture("") 36 | else 37 | frame:ClearAllPoints() 38 | frame.Show = function() return end 39 | frame:Hide() 40 | end 41 | end 42 | 43 | -- reduce actionbar size 44 | for id, frame in pairs(resizes) do frame:SetWidth(488) end 45 | 46 | -- hide reduced frames 47 | for id, frame in pairs(frames) do hide(frame) end 48 | 49 | -- clear reduced textures 50 | for id, frame in pairs(textures) do hide(frame, 1) end 51 | 52 | -- clear some button textures 53 | for id, frame in pairs(normtextures) do hide(frame, 2) end 54 | 55 | -- create a jump button 56 | ActionButtonJmp = CreateFrame("CheckButton", "ActionButtonJmp", MainMenuBarArtFrame, "ActionButtonTemplate") 57 | 58 | local ui = CreateFrame("Frame", "ShaguControllerUI", UIParent) 59 | ui:RegisterEvent("PLAYER_ENTERING_WORLD") 60 | ui:SetScript("OnEvent", function() 61 | -- update ui when frame positions get managed 62 | ui.manage_positions_hook = UIParent_ManageFramePositions 63 | UIParent_ManageFramePositions = ui.manage_positions 64 | ui:UnregisterAllEvents() 65 | end) 66 | 67 | ui:SetScript("OnUpdate", function() 68 | -- update ui once the first frame is shown 69 | UIParent_ManageFramePositions() 70 | this:Hide() 71 | end) 72 | 73 | local actionhide = CreateFrame("Frame", "ShaguControllerActionHide", BonusActionBarFrame) 74 | actionhide.buttons = {} 75 | 76 | actionhide:SetScript("OnShow", function() 77 | for button, bonus in pairs(this.buttons) do 78 | if button:GetID() ~= 0 then 79 | button:EnableMouse(bonus) 80 | button:SetAlpha(bonus) 81 | end 82 | end 83 | end) 84 | 85 | actionhide:SetScript("OnHide", function() 86 | for button, bonus in pairs(this.buttons) do 87 | if button:GetID() ~= 0 then 88 | button:EnableMouse(bonus == 0 and 1 or 0) 89 | button:SetAlpha(bonus == 0 and 1 or 0) 90 | end 91 | end 92 | end) 93 | 94 | ui.manage_button = function(self, frame, pos, x, y, image, bonus) 95 | if frame and tonumber(frame) then 96 | self:manage_button(_G["ActionButton" .. frame], pos, x, y, image) 97 | self:manage_button(_G["BonusActionButton" .. frame], pos, x, y, image, true) 98 | return 99 | end 100 | 101 | if pos == "DISABLED" then 102 | frame.Show = function() return end 103 | frame:ClearAllPoints() 104 | frame:Hide() 105 | return 106 | end 107 | 108 | -- add button to actionhide registry 109 | actionhide.buttons[frame] = bonus and 1 or 0 110 | 111 | -- set button scale and set position 112 | local scale = image == "" and 1 or 1.2 113 | local revscale = scale == 1 and 1.2 or 1 114 | frame:SetScale(scale) 115 | frame:ClearAllPoints() 116 | frame:SetPoint("CENTER", UIParent, pos, x*revscale, y*revscale) 117 | 118 | -- hide keybind text 119 | _G[frame:GetName().."HotKey"]:Hide() 120 | 121 | -- add keybind icon 122 | if not frame.keybind_icon then 123 | frame.keybind_icon = CreateFrame("Frame", nil, frame) 124 | frame.keybind_icon:SetFrameLevel(255) 125 | frame.keybind_icon:SetAllPoints(frame) 126 | 127 | frame.keybind_icon.tex = frame.keybind_icon:CreateTexture(nil, "OVERLAY") 128 | frame.keybind_icon.tex:SetTexture(image) 129 | frame.keybind_icon.tex:SetPoint("TOPRIGHT", frame.keybind_icon, "TOPRIGHT", 0, 0) 130 | frame.keybind_icon.tex:SetWidth(16) 131 | frame.keybind_icon.tex:SetHeight(16) 132 | 133 | -- handle out of range as desaturation of keybind and icon 134 | _G[frame:GetName().."HotKey"].SetVertexColor = function(self, r, g, b, a) 135 | if r == 1.0 and g == 0.1 and b == 0.1 then 136 | _G[frame:GetName().."Icon"]:SetDesaturated(true) 137 | frame.keybind_icon.tex:SetDesaturated(true) 138 | else 139 | _G[frame:GetName().."Icon"]:SetDesaturated(false) 140 | frame.keybind_icon.tex:SetDesaturated(false) 141 | end 142 | end 143 | end 144 | end 145 | 146 | ui.manage_jump_button = function(self, frame) 147 | local icon = _G[frame:GetName().."Icon"] 148 | local name = _G[frame:GetName().."Name"] 149 | 150 | icon:Show() 151 | icon:SetTexture("Interface\\Icons\\inv_gizmo_rocketboot_01") 152 | icon.SetTexture = function() return end 153 | icon.Hide = function() return end 154 | 155 | name:SetPoint("BOTTOM", 0, 5) 156 | name:SetText("Jump") 157 | name.SetText = function() return end 158 | 159 | frame:Show() 160 | frame.Hide = function() return end 161 | frame.GetID = function() return 0 end 162 | end 163 | 164 | local buttonmap = { 165 | -- dummy jump button 166 | { ActionButtonJmp, "BOTTOMRIGHT", -220, 45, "Interface\\AddOns\\ShaguController\\img\\a" }, 167 | 168 | -- right controls 169 | { 1, "BOTTOMRIGHT", -220, 135, "Interface\\AddOns\\ShaguController\\img\\y" }, 170 | { 2, "BOTTOMRIGHT", -265, 90, "Interface\\AddOns\\ShaguController\\img\\x" }, 171 | { 3, "BOTTOMRIGHT", -175, 90, "Interface\\AddOns\\ShaguController\\img\\b" }, 172 | { 4, "BOTTOMRIGHT", -220, 90, "" }, 173 | 174 | -- left controls 175 | { 5, "BOTTOMLEFT", 220, 135, "Interface\\AddOns\\ShaguController\\img\\up" }, 176 | { 6, "BOTTOMLEFT", 220, 90, "" }, 177 | 178 | -- This is my personal preference where the last 3 buttons of an actionbar 179 | -- are usually mapped and mandatory skills for me. If you want to continue 180 | -- the line, change this to 7,8,9 and change the disabled ones to 10,11,12. 181 | -- also make sure to update the keybinds.lua accordingly. 182 | { 10, "BOTTOMLEFT", 265, 90, "Interface\\AddOns\\ShaguController\\img\\right" }, 183 | { 11, "BOTTOMLEFT", 220, 45, "Interface\\AddOns\\ShaguController\\img\\down" }, 184 | { 12, "BOTTOMLEFT", 175, 90, "Interface\\AddOns\\ShaguController\\img\\left" }, 185 | 186 | -- disabled 187 | { 7, "DISABLED" }, 188 | { 8, "DISABLED" }, 189 | { 9, "DISABLED" }, 190 | } 191 | 192 | ui.manage_positions = function(a1, a2, a3) 193 | -- run original function first 194 | ui.manage_positions_hook(a1, a2, a3) 195 | 196 | -- move and skin all buttons 197 | for id, button in pairs(buttonmap) do 198 | ui:manage_button(unpack(button)) 199 | end 200 | 201 | -- skin jump button 202 | ui:manage_jump_button(ActionButtonJmp) 203 | 204 | -- move and resize chat 205 | ChatFrameEditBox:ClearAllPoints() 206 | ChatFrameEditBox:SetPoint("TOP", UIParent, "TOP", 0, -10) 207 | ChatFrameEditBox:SetWidth(300) 208 | ChatFrameEditBox:SetScale(2) 209 | 210 | -- on-screen keyboard helper 211 | ChatFrame1.oskHelper = ChatFrame1.oskHelper or CreateFrame("Button", nil, UIParent) 212 | ChatFrame1.oskHelper:SetFrameStrata("BACKGROUND") 213 | ChatFrame1.oskHelper:SetAllPoints(ChatFrame1) 214 | ChatFrame1.oskHelper:SetScript("OnClick", function() 215 | if not ChatFrameEditBox:IsVisible() then 216 | ChatFrameEditBox:Show() 217 | ChatFrameEditBox:Raise() 218 | else 219 | ChatFrameEditBox:Hide() 220 | end 221 | end) 222 | 223 | ChatFrame1.oskHelper:SetScript("OnUpdate", function() 224 | if ChatFrameEditBox:IsVisible() and this.state ~= 1 then 225 | ChatFrame1:SetScale(2) 226 | ChatFrame1:ClearAllPoints() 227 | ChatFrame1:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 0, 0) 228 | ChatFrame1:SetPoint("BOTTOMRIGHT", UIParent, "RIGHT", 0, -14) 229 | 230 | FCF_SetWindowColor(ChatFrame1, 0,0,0) 231 | FCF_SetWindowAlpha(ChatFrame1, .5) 232 | 233 | this.state = 1 234 | elseif not ChatFrameEditBox:IsVisible() and this.state ~= 0 then 235 | local anchor = MainMenuBarArtFrame 236 | anchor = MultiBarBottomLeft:IsVisible() and MultiBarBottomLeft or anchor 237 | anchor = MultiBarBottomRight:IsVisible() and MultiBarBottomRight or anchor 238 | anchor = ShapeshiftBarFrame:IsVisible() and ShapeshiftBarFrame or anchor 239 | anchor = PetActionBarFrame:IsVisible() and PetActionBarFrame or anchor 240 | 241 | ChatFrame1:SetScale(1) 242 | ChatFrame1:ClearAllPoints() 243 | ChatFrame1:SetPoint("LEFT", MultiBarBottomLeft, "LEFT", 17, 0) 244 | ChatFrame1:SetPoint("RIGHT", MultiBarBottomLeft, "RIGHT", -17, 0) 245 | ChatFrame1:SetPoint("BOTTOM", anchor, "TOP", 0, 13) 246 | ChatFrame1:SetPoint("TOP", UIParent, "CENTER", 0, -200) 247 | 248 | FCF_SetWindowColor(ChatFrame1, 0,0,0) 249 | FCF_SetWindowAlpha(ChatFrame1, 0) 250 | 251 | this.state = 0 252 | end 253 | end) 254 | 255 | -- move and hide some chat buttons 256 | ChatFrameMenuButton:Hide() 257 | ChatFrameMenuButton.Show = function() return end 258 | 259 | for i=1, NUM_CHAT_WINDOWS do 260 | _G["ChatFrame"..i.."DownButton"]:ClearAllPoints() 261 | _G["ChatFrame"..i.."DownButton"]:SetPoint("BOTTOMRIGHT", _G["ChatFrame"..i], "BOTTOMRIGHT", 0, -5) 262 | 263 | _G["ChatFrame"..i.."UpButton"]:ClearAllPoints() 264 | _G["ChatFrame"..i.."UpButton"]:SetPoint("RIGHT", _G["ChatFrame"..i.."DownButton"], "LEFT", 0, 0) 265 | 266 | _G["ChatFrame"..i.."BottomButton"]:Hide() 267 | _G["ChatFrame"..i.."BottomButton"].Show = function() return end 268 | end 269 | 270 | -- move pet action bar 271 | local anchor = MainMenuBarArtFrame 272 | anchor = MultiBarBottomLeft:IsVisible() and MultiBarBottomLeft or anchor 273 | anchor = MultiBarBottomRight:IsVisible() and MultiBarBottomRight or anchor 274 | anchor = ShapeshiftBarFrame:IsVisible() and ShapeshiftBarFrame or anchor 275 | PetActionBarFrame:ClearAllPoints() 276 | PetActionBarFrame:SetPoint("BOTTOM", anchor, "TOP", 0, 3) 277 | 278 | -- move shapeshift bar 279 | local anchor = MainMenuBarArtFrame 280 | anchor = MultiBarBottomLeft:IsVisible() and MultiBarBottomLeft or anchor 281 | anchor = MultiBarBottomRight:IsVisible() and MultiBarBottomRight or anchor 282 | ShapeshiftBarFrame:ClearAllPoints() 283 | ShapeshiftBarFrame:SetPoint("BOTTOMLEFT", anchor, "TOPLEFT", 15, -5) 284 | 285 | -- move normal action bars 286 | MultiBarBottomLeft:ClearAllPoints() 287 | MultiBarBottomLeft:SetPoint("BOTTOM", MainMenuBar, "TOP", 0, 20) 288 | 289 | MultiBarBottomRight:ClearAllPoints() 290 | MultiBarBottomRight:SetPoint("BOTTOM", MultiBarBottomLeft, "TOP", 0, 5) 291 | 292 | -- experience bar 293 | MainMenuXPBarTexture0:SetPoint("LEFT", MainMenuExpBar, "LEFT") 294 | MainMenuXPBarTexture1:SetPoint("RIGHT", MainMenuExpBar, "RIGHT") 295 | 296 | -- reputation bar 297 | ReputationWatchBar:SetPoint("BOTTOM", MainMenuExpBar, "TOP", 0, 0) 298 | ReputationWatchBarTexture0:SetPoint("LEFT", ReputationWatchBar, "LEFT") 299 | ReputationWatchBarTexture1:SetPoint("RIGHT", ReputationWatchBar, "RIGHT") 300 | 301 | -- move elements for reduced actionbar size 302 | MainMenuMaxLevelBar0:SetPoint("LEFT", MainMenuBarArtFrame, "LEFT") 303 | MainMenuBarTexture2:SetPoint("LEFT", MainMenuBarArtFrame, "LEFT") 304 | MainMenuBarTexture3:SetPoint("RIGHT", MainMenuBarArtFrame, "RIGHT") 305 | 306 | ActionBarDownButton:SetPoint("BOTTOMLEFT", MainMenuBarArtFrame, "BOTTOMLEFT", -5, -5) 307 | ActionBarUpButton:SetPoint("TOPLEFT", MainMenuBarArtFrame, "TOPLEFT", -5, -5) 308 | MainMenuBarPageNumber:SetPoint("LEFT", MainMenuBarArtFrame, "LEFT", 25, -5) 309 | CharacterMicroButton:SetPoint("LEFT", MainMenuBarArtFrame, "LEFT", 38, 0) 310 | 311 | MainMenuBarLeftEndCap:SetPoint("RIGHT", MainMenuBarArtFrame, "LEFT", 30, 0) 312 | MainMenuBarRightEndCap:SetPoint("LEFT", MainMenuBarArtFrame, "RIGHT", -30, 0) 313 | 314 | -- move pfQuest arrow if existing 315 | if pfQuest and pfQuest.route and pfQuest.route.arrow then 316 | pfQuest.route.arrow:SetPoint("CENTER", 0, -120) 317 | end 318 | end 319 | 320 | -- save to main frame 321 | ShaguController.ui = ui 322 | --------------------------------------------------------------------------------