PDA

View Full Version : Option to hide key-bind modifiers from skill bars.


Shakti
09-29-2004, 06:15 PM
Basically, I got tired of looking at ALT, CTR and SHI on all of the additional skill bars in Cosmos, and while it is nice to be able to hide all of the key-binds, a la PopBar, I would prefer to be able to see what key is used in conjunction with the modifiers for that particular skill bar.

At least, this makes sense the way I have my skills set up. If someone uses multiple modifiers on the same bar (God knows why), then this is not helpful.

I would like to see this added as an option in Cosmos. It could be taken a step further, with the full modifier displayed for each skill bar ONCE, and then the key for each button displayed on the button itself.

For now, I just changed the UpdateHotKeys event in each of the three skill bar add-ons.

PopBarButton.lua [L583]
function PopBarButton_UpdateHotkeys(actionButtonType,button )
if ( not actionButtonType ) then
actionButtonType = "POPBARBUTTON";
end
if (not button) then
button = this;
end
local hotkey = getglobal(button:GetName().."HotKey");
local action = PopBarButton_GetBindID(button); --actionButtonType..button:GetID();
if (hotkey) then
if (PopBar_Config.HideKeys==1) then
hotkey:SetText("");
else
if (action) then
-- KHAOS // Don't display modifier keys.
local hotkeytext = KeyBindingFrame_GetLocalizedName(GetBindingKey(act ion), "KEY_");
local plusindex = string.find(hotkeytext, "-", -2);

if ( (string.len(hotkeytext) > 1) and plusindex ) then
hotkeytext = string.sub(hotkeytext, plusindex + 1);
end

hotkey:SetText(hotkeytext);
-- KHAOS::END // Don't display modifier keys.
else
hotkey:SetText("");
end
end
end
end

SecondActionButton.lua [L71]
function SecondActionButton_UpdateHotkeys(actionButtonType)
if ( not actionButtonType ) then
actionButtonType = "SECONDACTIONBUTTON";
end
local hotkey = getglobal(this:GetName().."HotKey");
local action = actionButtonType..this:GetID();

-- KHAOS // Don't display modifier keys.
local hotkeytext = KeyBindingFrame_GetLocalizedName(GetBindingKey(act ion), "KEY_");
local plusindex = string.find(hotkeytext, "-", -2);

if ( (string.len(hotkeytext) > 1) and plusindex ) then
hotkeytext = string.sub(hotkeytext, plusindex + 1);
end

hotkey:SetText(hotkeytext);
-- KHAOS::END // Don't display modifier keys.
end

SideBarButton.lua [L111]
function SideBarButton_UpdateHotkeys(actionButtonType)
if ( not actionButtonType ) then
actionButtonType = string.upper(this:GetParent():GetName()).."ACTIONBUTTON";
end
local hotkey = getglobal(this:GetName().."HotKey");
local curID = this:GetID();
local checkedID = curID - 108;
if ((checkedID < 1) or (checkedID > 6)) then
checkedID = curID - 114;
end

if ((checkedID >= 1) and (checkedID <= 6)) then
local action = actionButtonType..checkedID;

-- KHAOS // Don't display modifier keys.
local hotkeytext = KeyBindingFrame_GetLocalizedName(GetBindingKey(act ion), "KEY_");
local plusindex = string.find(hotkeytext, "-", -2);

if ( (string.len(hotkeytext) > 1) and plusindex ) then
hotkeytext = string.sub(hotkeytext, plusindex + 1);
end

hotkey:SetText(hotkeytext);
-- KHAOS::END // Don't display modifier keys.
end
end

If anyone is inclined to implement this feature in their own install, simply replace the functions in the three files listed. I included line numbers based on the unedited beta distribution.

P.S. My first post here, and really my first time messing with the WoW UI, but expect to see more of me. :)

sarf
09-29-2004, 07:37 PM
Nice!

I'll point Mugendai to this post - he might want to implement this (as an option).

Sarf
---
Just as Schopenhauer predicted, absolutely nothing is happening.

Shakti
09-29-2004, 08:29 PM
I just noticed that the code tags here have messed up some of the longer lines. Just a heads up for anybody who tries copying and pasting from the forums.

mugendai
09-29-2004, 10:20 PM
ehh. I dunno.. it'de be one thing if an entire bar was bound to a particular modifier key.. but not everyone does that, I sure know I don't.

I mean I guess I could add an option to hide modifier keys to each of the bars.. But I'm not going to make it show a modifier once and then not on any other buttons in the bar.

But I'm feeling more and more inclined to abstract popbar and throw out the other bars so I don't have to deal with changing things in so many places no mo..

Shakti
10-03-2004, 08:31 PM
I can see what you're saying... But when the choices for displaying key-binds are all or none, neither is really helpful. /shrug

P.S. If you do use PopBar as the basis for all of the other bars, please modify it so that it uses unique bars from the original six. Otherwise, I'd run out of room for sure. ;) The thing I like most about the sidebars is that they don't take up slots in the original six bars. It'd be nice if they had the functionality and options of PopBar, but at the cost of a skillbar... eh.

sarf
10-03-2004, 09:06 PM
Shakti, the issue is that the sidebars use the only bar that is not used by the normal action bars + the stance/shapeshifting bars.

This is the main reasons big, 12 button sidebars have been somewhat on a backburner for a while.

Sarf
---
There are trivial truths and there are great truths. The opposite of a trivial truth is plainly false. The opposite of a great truth is also true.

Shakti
10-05-2004, 07:45 AM
I see, Sarf. Thanks for the clarification there.

I'm surprised that Blizzard would give us such a versatile scripting and XML implementation and then limit us to such a paltry number of skill bars.

Time to start /suggesting like crazy... :D

sarf
10-05-2004, 10:09 AM
So am I... but they didn't count on people wanting 36+ buttons visible at the same time, I guess.

You can use the normal action buttons (those available in action bar pages 1-6), they'll just be shared.

Sarf
---
From the halls of Montezuma to the shores of Tripoli, we are all tools of the Conspiracy...