Intro
- Small mod to edit the positions of the default ActionBars.
- It does moving and scaling only.
- Button textures, range/mana-coloring and fonts (hotkey, macroname) can be changed with "rActionButtonStyler"
- Cooldowns can be done with "OmniCC" from Tuller
- EXP/REP bar can be done with "jExp" from Mertex.
- Mod can only be edited by lua editing!
- You can move/scale the bars to your liking just check the lua file.
Moving
To move the bars move your mouse to the side of a bar and then hold down the ALT+SHIFT-key and click your mousebutton and hold it. Now move your mouse and drag the bar whereever you want. Its easier if you activate the testmode first. A frame is movable if it is set to movable in the config, otherwise it is not movable.
Locking
You can lock every bar. If a bar is locked it cannot be moved anymore but keeps the position you have set up, unless you set the movable variable to 0. This will delete the layout-cache entry and the default value is used.
Bar layout
Bar1 and bar2 can be of the format 2x6 buttons or 1x12 buttons. You can set this in the config.
On mouseover
Bars can be set to be visible on mouseover in the config. If you set the on mouseover variable to 0 the bar will be always visible (if it is active obiously).
Add / Disable bars
You can add / remove bars in the Blizzard interface options. (Escape -> interface options -> actionbars). You can show/hide the micro menu and the bags in the config.
Layout-cache.txt
You position data is saved in a file called layout-cache.txt. It is saved per character and can be found in the WTF folder under your character. If you want to use the setting of one character for all just copy the file from that character to all your other characters.
Important: If you upgrade rActionBarStyler to a new version with different config settings (the bar layout for example) the SetPoint from the layout-cache.txt will be used and not the default one. Thus your bars may look wierd. Its no bug, just adjust the config and/or move the bars.
Config
You can set this mod up by opening the rActionBarStyler.lua with Notepad or some editor of your liking. All the major settings can be made at the config area. Its as userfriendly as I could. To activate something write a 1 behind it (1 = on), otherwise use a 0 (0 = off).
Don't forget to reloadui after you changed and saved a setting. (/console reloadui)
Code:
---------------------------------------------------
-- CONFIG START
---------------------------------------------------
--this will activate ALL the backdrops. makes it easier to see the dragable bar areas
testmode = 0
-- bar1 and bar2 in 2x6 instead of 1x12
-- 0 = 1x12
-- 1 = 2x6
button_system = 1
-- bar settings
-- you can make a bar visible on mouseover, make it movable or lock it from moving
-- if you make it not movable it will use the default position values of the holder frames
-- bar1
bar1_on_mouseover = 0
move_bar1 = 0
lock_bar1 = 1
-- bar2
bar2_on_mouseover = 0
move_bar2 = 0
lock_bar2 = 1
-- bar3
if myname == "Loral" then
bar3_on_mouseover = 0
else
bar3_on_mouseover = 0
end
move_bar3 = 0
lock_bar3 = 1
-- rightbars (bar45)
rightbars_on_mouseover = 1
move_rightbars = 0
lock_rightbars = 1
-- shapeshift
if myname == "Loral" then
shapeshift_on_mouseover = 0
elseif myname == "Rothar" then
shapeshift_on_mouseover = 1
else
shapeshift_on_mouseover = 0
end
move_shapeshift = 1
lock_shapeshift = 0
hide_shapeshift = 1
-- petbar
petbar_on_mouseover = 1
move_pet = 1
lock_pet = 0
hide_pet = 0
-- micromenu
micromenu_on_mouseover = 1
move_micro = 1
lock_micro = 1
hide_micro = 0
-- bags
bags_on_mouseover = 1
move_bags = 1
lock_bags = 1
hide_bags = 0
-- vehicle exit button
move_veb = 1
lock_veb = 0
-- scale values
bar1scale = 0.82*0.75
bar2scale = 0.82*0.75
bar3scale = 0.82*0.75
bar45scale = 0.82*0.75
petscale = 0.65
shapeshiftscale = 0.65
micromenuscale = 0.8
bagscale = 0.9
-- position table for the default frame holder positions
-- those are use if the bar is set to not movable or if there is no value in the layout-cache.txt for that frame yet
local frame_positions = {
[1] = { a = "BOTTOM", x = -127, y = 19 }, --fbar1_button_system_1
[2] = { a = "BOTTOM", x = 0, y = 19 }, --fbar1_button_system_0
[3] = { a = "BOTTOM", x = 125, y = 19 }, --fbar2_button_system_1
[4] = { a = "BOTTOM", x = 0, y = 60 }, --fbar2_button_system_0
[5] = { a = "BOTTOM", x = 0, y = 112 }, --fbar3
[6] = { a = "RIGHT", x = -5, y = 0 }, --fbar45
[7] = { a = "BOTTOMRIGHT", x = 5, y = -5 }, --bags
[8] = { a = "TOP", x = 0, y = 5 }, --micromenu
[9] = { a = "BOTTOM", x = 0, y = 170 }, --petbar
[10] = { a = "BOTTOM", x = 0, y = 240 }, --shapeshift
[11] = { a = "BOTTOM", x = 120, y = 120 }, --my own vehicle exit button
}
---------------------------------------------------
-- CONFIG END
---------------------------------------------------
005-2
- you can now hide the shapeshift or the petbar if you want
- readded my transparent textures to overwrite the Blizzard Pet and Shapeshiftbar background textures
005
- updated for 3.1
- some changes to the default values
004-6
- button layout 1x12 is default
- bar moving changed, now you need to hold down SHIFT+right click mouse
004-5
- added arg1 = "player" to the vehicle exit button events
004-3
- option to hide bags and micro menu
- possessbar now anchors the fshift frame
- created a own vehicle exit button
- fix for shapeshiftbutton1 position with only one shape (hooksecure)
004-2
- one function for all the movable stuff
- frame position table for all the default holder positons
- bars can now be locked
004
- complete rewrite
- bars can now be moved INGAME (omg?!), the position is written to the layout_cache.txt
- all bars can now be made on mouseover
- there is a testmode for more easy configuration
- 3 new texture to make the petbar and the shapeshift stuff invisible
003
- added micro menu
- added bag buttons and keyring
002
- mainmenubar and vehiclebar not hidden anymore. scaling to 0.001 and setting alpha to 0 does the trick
- fixed memory overflow bug
001
- initial release
Optional Files - rActionBarStyler
Sorry, there are currently no optional files available.
Just found this. Beautiful! Been waiting for an 'update' to rBars2 and have been using rActionButtonStyler + Dominos in the meantime. I am way too happy now to get away from Dominos now!
-- on/off
local petbar_on_mouseover = 1
-- range 0 - 1
local petbar_off_alpha = 0
-- on/off
local rightbars_on_mouseover = 1
-- range 0 - 1
local rightbars_off_alpha = 0
local alphahigh = 1
local function myshowhidepet(alpha)
for i=1, NUM_PET_ACTION_SLOTS do
local pb = _G["PetActionButton"..i]
pb:SetAlpha(alpha)
end;
end
local function myshowhiderightbar(alpha)
if MultiBarLeft:IsShown() then
for i=1, 12 do
local pb = _G["MultiBarLeftButton"..i]
pb:SetAlpha(alpha)
end
end
if MultiBarRight:IsShown() then
for i=1, 12 do
local pb = _G["MultiBarRightButton"..i]
pb:SetAlpha(alpha)
end
end
end
if petbar_on_mouseover == 1 then
local f2 = CreateFrame("Frame","myPetBarHolderFrame",UIParent)
--comment this in to see the frame
--f2:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "Interface/Tooltips/UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 4, right = 4, top = 4, bottom = 4 }});
f2:SetWidth(355) -- size the width here
f2:SetHeight(50) -- size the height here
f2:SetPoint("BOTTOM",-78,160) --move it under your petbuttons here
f2:SetScale(myscale)
f2:EnableMouse(true)
f2:SetScript("OnEnter", function(self) myshowhidepet(alphahigh) end)
f2:SetScript("OnLeave", function(self) myshowhidepet(petbar_off_alpha) end)
for i=1, NUM_PET_ACTION_SLOTS do
local pb = _G["PetActionButton"..i]
pb:SetAlpha(petbar_off_alpha)
pb:HookScript("OnEnter", function(self) myshowhidepet(alphahigh) end)
pb:HookScript("OnLeave", function(self) myshowhidepet(petbar_off_alpha) end)
end;
end
if rightbars_on_mouseover == 1 then
local f3 = CreateFrame("Frame","myRightBarHolderFrame",UIParent)
--comment this in to see the frame
--f3:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "Interface/Tooltips/UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 4, right = 4, top = 4, bottom = 4 }});
f3:SetWidth(130) -- size the width here
f3:SetHeight(500) -- size the height here
f3:SetPoint("RIGHT",5,-20) --move it under your petbuttons here
f3:SetScale(myscale)
f3:EnableMouse(true)
f3:SetScript("OnEnter", function(self) myshowhiderightbar(alphahigh) end)
f3:SetScript("OnLeave", function(self) myshowhiderightbar(rightbars_off_alpha) end)
for i=1, 12 do
local pb = _G["MultiBarLeftButton"..i]
pb:SetAlpha(rightbars_off_alpha)
pb:HookScript("OnEnter", function(self) myshowhiderightbar(alphahigh) end)
pb:HookScript("OnLeave", function(self) myshowhiderightbar(rightbars_off_alpha) end)
local pb = _G["MultiBarRightButton"..i]
pb:SetAlpha(rightbars_off_alpha)
pb:HookScript("OnEnter", function(self) myshowhiderightbar(alphahigh) end)
pb:HookScript("OnLeave", function(self) myshowhiderightbar(rightbars_off_alpha) end)
end;
end
This will hide the right bars and the pet bar and makes them appear on mouseover. Need to test this before I will release it finally.
Originally posted by Caellian Aight well it's perfect now, the only thing i could be missing is to have my pet bar hidden unless i mouseover it.
The problem is: you are not allowed to touch the petbarframe itself. This will cause tainting. So I am not able to position the petbarframe under your buttons because I am not allowed to re-point the petframe.
This code is untested but could be some kind of possibility:
Code:
local alphahigh = 1
local alphalow = 0.2
local function myshowhidepet(alpha)
for i=1, NUM_PET_ACTION_SLOTS do
local pb = _G["PetActionButton"..i]
pb:SetAlpha(alpha)
end;
end
local f2 = CreateFrame("Frame","myPetBarHolderFrame",UIParent)
f2:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "Interface/Tooltips/UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 4, right = 4, top = 4, bottom = 4 }});
f2:SetWidth(200) -- size the width here
f2:SetHeight(100) -- size the height here
f2:SetPoint("BOTTOM",0,300) --move it under your petbuttons here
--f2:SetFrameLevel(0) -- may be needed
f2:SetAlpha(alphalow) --onload alpha (could be 0 when finished with positioning)
f2:EnableMouse(true)
f2:SetScript("OnEnter", function(self) myshowhidepet(alphahigh) end)
f2:SetScript("OnLeave", function(self) myshowhidepet(alphalow) end)
--onload setup
for i=1, NUM_PET_ACTION_SLOTS do
local pb = _G["PetActionButton"..i]
pb:SetAlpha(alphalow)
pb:HookScript("OnEnter", function(self) myshowhidepet(alphahigh) end)
pb:HookScript("OnLeave", function(self) myshowhidepet(alphalow) end)
end;
What could be done is the following:
- Create a helper frame and move it under the pet buttons.
- Create OnEnter and OnLeave-Sripts for every PetButton
You need to do this for the petbuttons aswell with a HookScript since when moving the mousing on a button you will leave the helper frame.
The helper frame is needed to fill the gap between the buttons, since when you leave the button they would turn off.
I cannot guarantee that this will not cause tainting or that it does work. Cannot test it right now.
Originally posted by Caellian Giving this a quick try for the first time.
Say i want my MultiBarLeft and MultiBarRight to have the same shape as the main bar, 2 horizontal rows of 6 buttons, do i have to reanchor every button one by one or is there an easier way ?
This is how it works. Every button on screen needs some anchor. Currently the anchor and anchor positions of the both right bars are set to be vertical. So if you want them the other way round you need to re-point them button by button.
A "for"-loop will do much of the job here.
But be careful, the grade between tainting and not tainting is small.
Say i want my MultiBarLeft and MultiBarRight to have the same shape as the main bar, 2 horizontal rows of 6 buttons, do i have to reanchor every button one by one or is there an easier way ?
__________________
Quote:
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Originally posted by sush
but one question how can i change the spacing of the petbar?
You need to readjust the setpoints of every petbarbutton to do that, its not that hard. But I would advise you to do that inside the rActionButtonStyler since you want to adjust the setpoints of the buttons in this case.
Something like this could do it:
Code:
for i=1, NUM_PET_ACTION_SLOTS do
if i > 1 then
local name = "PetActionButton"..i;
local name2 = "PetActionButton"..(i-1);
local bu = _G[name]
local bu2 = _G[name2]
bu:ClearAllPoints()
bu:SetPoint("LEFT", bu2, "RIGHT", 20, 0)
end
end