1. #1
    I am Murloc! Terahertz's Avatar
    10+ Year Old Account
    Join Date
    Apr 2012
    Location
    Your basement
    Posts
    5,177

    Want to hide my keybind text, but show range indicator if there is one.

    I've got an addon named HotKeyHider which is basically a script that runs to hide my keybind and macro text permanently. But the problem is that it also hides the range indicator (by default a dot, but gets replaced when you set a keybind for it) and it's sometimes difficult to determine my range.

    Now mind you, I have 0 experience with lua, I'm just posting the script to see if anybody can do anything with it so that it shows the range indicator, or a new script.

    Code:
      -- function start
    
    local format = string.format;
    local match = string.match;
    local upper = strupper;
    local _G = getfenv(0);
    
    RegisterStateDriver(ShapeshiftBarFrame, "visibility", "hide") -- Hide the shapeshift bar
    local f = {"ActionButton%d", "MultiBarBottomLeftButton%d", "MultiBarBottomRightButton%d", "MultiBarRightButton%d",
    			"MultiBarLeftButton%d", "BonusActionButton%d"}
    do
    	for k, v in pairs(f) do
    		for i = 1, 12 do
    			local str = format(v, i);
    			_G[str.."HotKey"].Show = function() end;
    			_G[str.."Name"].Show = function() end;
    			_G[str.."Name"]:Hide();
    		end
    	end
    end
    Any help would be appreciated ^^

  2. #2
    Free Food!?!?! Tziva's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Cretaceous Period
    Posts
    22,833
    This doesn't exactly answer your question for fixing this addon, but if you use Bartender you can disable keybind/macro display on any or all of your bars, but the range still works (although it reds out the whole button instead of the dot).


    for moderation questions/concerns, please contact a global:

    TzivaRadux SimcaElysiaZaelsinoxskarmaVenara

    | twitch | bsky
    |

  3. #3
    Code:
    function ActionButton_UpdateHotkeys (self, actionButtonType)
    	local id;
    	if ( not actionButtonType ) then
    		actionButtonType = "ACTIONBUTTON";
    		id = self:GetID();
    	else
    		if ( actionButtonType == "MULTICASTACTIONBUTTON" ) then
    			id = self.buttonIndex;
    		else
    			id = self:GetID();
    		end
    	end 
    	local hotkey = _G[self:GetName().."HotKey"];
    		 
    	hotkey:SetText(RANGE_INDICATOR);
    	hotkey:Hide();
    end
    Overrides the ActionButton_UpdateHotkeys from Blizzard, instead of setting the binding as text it will always set it to RANGE_INDICATOR which is the dot sign.
    This only hides the bindings, you still have to hide the macro text, but make sure you remove this line
    Code:
    _G[str.."HotKey"].Show = function() end;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •