Download
(4Kb)
Download
Updated: 08-16-18 01:34 PM
Pictures
File Info
Compatibility:
Battle for Azeroth (8.0.1)
Updated:08-16-18 01:34 PM
Created:12-27-08 08:46 PM
Downloads:85,235
Favorites:309
MD5:
Categories:Action Bar Mods, Buff, Debuff, Spell

rButtonTemplate  Popular! (More than 5000 hits)

Version: 800.20180816
by: zork [More]


Intro

rButtonTemplate is a framework to theme Blizzard action, aura and item buttons. It does nothing on its own, needs a theme like rButtonTemplate_Zork.
API documentation
rButtonTemplate API documentation
Quick-Links
rActionBar, rActionBar_Zork, rBuffFrame, rBuffFrame_Zork, rButtonTemplate, rButtonTemplate_Zork
Git
https://github.com/zorker/rothui/tre...ButtonTemplate

Optional Files (20)
File Name
Version
Size
Author
Date
Type
800.20180901
14kB
09-02-18 03:34 AM
Addon
801-2018081101
4kB
08-11-18 04:55 AM
Addon
700.20161004
23kB
10-04-16 06:24 AM
Addon
1.3
80kB
11-29-10 02:09 PM
Addon
1.0
22kB
11-14-10 06:23 PM
Addon
1.2
24kB
11-09-10 02:59 PM
Addon
1.0
3kB
11-05-10 09:22 AM
Addon
rev3
6kB
07-06-10 06:25 PM
Addon
1.0
8kB
04-25-10 01:32 PM
Patch
1.0
2kB
12-06-09 12:47 PM
Addon
1.0
3kB
08-18-09 11:37 AM
Addon
1.0
10kB
07-06-09 12:02 PM
Addon
v1
16kB
06-17-09 06:57 PM
Addon
v1.3
18kB
02-19-09 12:10 PM
Addon
001
21kB
01-23-09 03:24 AM
Addon
1.0
5kB
01-22-09 09:38 AM
Addon
003
6kB
01-20-09 08:16 PM
Patch
001
15kB
01-20-09 03:59 PM
Addon
001
10kB
01-20-09 03:58 PM
Addon
0.1
7kB
01-17-09 10:12 AM
Addon


Post A Reply Comment Options
Unread 10-20-10, 07:01 PM  
Improvver
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
OK, final solution to shortcuts and in combat problem fix too:

add this new function behind of "--initial style func" (out of this zone text)
Code:
  
-- Key-binding shortcuts
  local function updatehotkey(self, actionButtonType)
	local replace = string.gsub
	local hotkey = _G[self:GetName() .. 'HotKey']
	local key = hotkey:GetText()
	key = replace(key, '(s%-)', 'S')
	key = replace(key, '(a%-)', 'A')
	key = replace(key, '(c%-)', 'C')
	key = replace(key, '(Mouse Button )', 'M')
	key = replace(key, '(Middle Mouse)', 'M3')
	key = replace(key, '(Mouse Wheel Down)', 'MWD')
	key = replace(key, '(Mouse Wheel Up)', 'MWU')
	key = replace(key, '(Num Pad )', 'N')
	key = replace(key, '(Page Up)', 'PU')
	key = replace(key, '(Page Down)', 'PD')
	key = replace(key, '(Spacebar)', 'SpB')
	key = replace(key, '(Insert)', 'Ins')
	key = replace(key, '(Home)', 'Hm')
	key = replace(key, '(Delete)', 'Del')
	if hotkey:GetText() == _G['RANGE_INDICATOR'] then
		hotkey:SetText('')
	else
		hotkey:SetText(key)
	end
  end
and to bottom of lua file add in " -- CALLS // HOOKS"

Code:
hooksecurefunc("ActionButton_UpdateHotkeys",  updatehotkey)
Report comment to moderator  
Reply With Quote
Unread 10-20-10, 06:09 PM  
Improvver
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Originally posted by grimgaw
how about this:
Code:
local t = ho:GetText()
if(not t or t=="") then return end
t = t:gsub("Num Pad ", "n")
t = t:gsub("-", "")
ho:SetText(t)
I created this func and works but the problem when enter in combat don't resolve, keybindings returns to original names:

Code:
		
local t = ho:GetText()
if t == _G['RANGE_INDICATOR'] then
  ho:SetText("")
else
  t = t:replace("Num Pad ", "N")
  t = t:replace("Page ", "P-")
  ho:SetText(t)
end
We're close to getting a solution xD Zork u are the best!
Report comment to moderator  
Reply With Quote
Unread 10-20-10, 05:45 PM  
Dhaern
A Kobold Labourer

Forum posts: 0
File comments: 63
Uploads: 0
Originally posted by grimgaw
Something i've noticed though, when you enter combat whole Hotkey settings get reset. Even with unmodified rABS when i enter combat my hotkey text shifts few pixels down and stays like that until next reloadui. Is there any fix for that Zork?
Yep, when I enter in combat this Abbreviates returns to normal keybinds text
Report comment to moderator  
Reply With Quote
Unread 10-20-10, 05:39 PM  
grimgaw
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 12
Uploads: 1
Something i've noticed though, when you enter combat whole Hotkey settings get reset. Even with unmodified rABS when i enter combat my hotkey text shifts few pixels down and stays like that until next reloadui. Is there any fix for that Zork?
Report comment to moderator  
Reply With Quote
Unread 10-20-10, 04:37 PM  
Dhaern
A Kobold Labourer

Forum posts: 0
File comments: 63
Uploads: 0
Originally posted by grimgaw
how about this:
Code:
local t = ho:GetText()
if(not t or t=="") then return end
t = t:gsub("Num Pad ", "n")
t = t:gsub("-", "")
ho:SetText(t)
OMG this works! Thanks very much, I am a noob with lua I only know change or edit things not create functions. Thx very much again
Report comment to moderator  
Reply With Quote
Unread 10-20-10, 04:08 PM  
grimgaw
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 12
Uploads: 1
how about this:
Code:
local t = ho:GetText()
if(not t or t=="") then return end
t = t:gsub("Num Pad ", "n")
t = t:gsub("-", "")
ho:SetText(t)
Report comment to moderator  
Reply With Quote
Unread 10-20-10, 12:23 PM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
Why don't you just sit down and try/error it out yourself?

The error is pretty clear. Go to line 112 and make sure that line and maybe the ones after are only called under specific conditions. Maybe you need sth like

Code:
--call this only if "ho" (hotkey) object exists
if ho then
  -- do dat
end
or sth like this
Code:
--call this only if "text" object exists
if text then
  -- do dat
end
"Es ist nocht keine Meister vom Himmel gefallen", how we say in Germany. Just show some dedication.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Report comment to moderator  
Reply With Quote
Unread 10-20-10, 11:07 AM  
Improvver
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Originally posted by Dhaern
The Problem: currently when using the number pad for action button hotkeys WoW formats the hotkey text on the button as NUM 1, NUM 2, NUM 3, etc. Well, at least I think so. Trouble is that all it actually shows is NUM. NUM, NUM, NUM. This makes the text on the buttons absolutely useless.

The Suggestion: change the format of this button text for number pad so that things that are obvious to the person who set the hotkeys (Number Pad, Control, Alt) are abbreviated by their first letter and a dash, or the first letter only. That way the hotkey text would look something like:

N-1, N-2, N-3
C-N-1, C-N-2, C-N-3

Any plans for implement this? this option will not cpu hog and I suppose easy to do. Thx for this great mod
same problem here. I need abbreviates for modifier keys and NUM PAD. temporal fix (code to replace) in other post don't work. Please i will love u if u work this. Nice work on this mod, thanks!
Report comment to moderator  
Reply With Quote
Unread 10-19-10, 04:37 PM  
Dhaern
A Kobold Labourer

Forum posts: 0
File comments: 63
Uploads: 0
Hi again, I added this code and this error show in game:

Code:
Message: ...erface\AddOns\rActionButtonStyler\func\functions.lua:112: attempt to call method 'GetBindingText' (a nil value)
Time: 10/19/10 23:31:45
Count: 78
Stack: ...erface\AddOns\rActionButtonStyler\func\functions.lua:112: in function <...erface\AddOns\rActionButtonStyler\func\functions.lua:86>
[C]: in function `ActionButton_Update'
Interface\FrameXML\ActionButton.lua:440: in function `ActionButton_OnEvent'
[string "*:OnEvent"]:1: in function <[string "*:OnEvent"]:1>

Locals: self = VehicleMenuBarActionButton6 {
 0 = <userdata>
 feedback_action = 78
 action = 78
 isBonus = 1
 flashing = 0
 rangeTimer = -1
 eventsRegistered = true
 alwaysBonus = 1
 FlyoutBorder = VehicleMenuBarActionButton6FlyoutBorder {
 }
 FlyoutBorderShadow = VehicleMenuBarActionButton6FlyoutBorderShadow {
 }
 flashtime = 0
 FlyoutArrow = VehicleMenuBarActionButton6FlyoutArrow {
 }
 icon = VehicleMenuBarActionButton6Icon {
 }
 bg = VehicleMenuBarActionButton6BG {
 }
}
action = 78
name = "VehicleMenuBarActionButton6"
bu = VehicleMenuBarActionButton6 {
 0 = <userdata>
 feedback_action = 78
 action = 78
 isBonus = 1
 flashing = 0
 rangeTimer = -1
 eventsRegistered = true
 alwaysBonus = 1
 FlyoutBorder = VehicleMenuBarActionButton6FlyoutBorder {
 }
 FlyoutBorderShadow = VehicleMenuBarActionButton6FlyoutBorderShadow {
 }
 flashtime = 0
 FlyoutArrow = VehicleMenuBarActionButton6FlyoutArrow {
 }
 icon = VehicleMenuBarActionButton6Icon {
 }
 bg = VehicleMenuBarActionButton6BG {
 }
}
ic = VehicleMenuBarActionButton6Icon {
 0 = <userdata>
}
co = VehicleMenuBarActionButton6Count {
 0 = <userdata>
}
bo = VehicleMenuBarActionButton6Border {
 0 = <userdata>
 Show = <function> defined @Interface\AddOns\rActionButtonStyler\func\functions.lua:10
}
ho = VehicleMenuBarActionButton6HotKey {
 0 = <userdata>
 SetPoint = <function> defined @Interface\FrameXML\VehicleMenuBar.lua:808
}
cd = VehicleMenuBarActionButton6Cooldown {
 0 = <userdata>
}
na = VehicleMenuBarActionButton6Name {
 0 = <userdata>
}
fl = VehicleMenuBarActionButton6Flash {
 0 = <userdata>
}
nt = VehicleMenuBarActionButton6NormalTexture {
 0 = <userdata>
}
(*temporary) = nil
(*temporary) = VehicleMenuBarActionButton6HotKey {
 0 = <userdata>
 SetPoint = <function> defined @Interface\FrameXML\VehicleMenuBar.lua:808
}
(*temporary) = "attempt to call method 'GetBindingText' (a nil value)"
_G = <table> {
 ActionButton7FlyoutBorder = ActionButton7FlyoutBorder {
 }
 MultiCastActionButton6Cooldown = MultiCastActionButton6Cooldown {
 }
 MerchantItem9ItemButtonStock = MerchantItem9ItemButtonStock {
 }
 GetTrainerServiceTypeFilter = <function> defined =[C]:-1
 UNIT_NAMES_COMBATLOG_TOOLTIP = "Color unit names."
 KBASE_NUM_FAKE_CATEGORIES = 1
 SetTrainerServiceTypeFilter = <function> defined =[C]:-1
 TutorialFrameLeft19 = TutorialFrameLeft19 {
 }
 MultiCastActionButton2Cooldown = MultiCastActionButton2Cooldown {
 }
 ERR_TRADE_EQUIPPED_BAG = "You can't trade equipped bags."
 PVP_RANK_6_1 = "Corporal"
 BOOKTYPE_PROFESSION = "professions"
 AudioOptionsVoicePanelOutputDeviceDropDownButtonHighlightTexture = AudioOptionsVoicePanelOutputDeviceDropDownButtonHighlightTexture {
 }
 InterfaceOptionsDisplayPanelShowAggroPercentageText = InterfaceOptionsDisplayPanelShowAggroPercentageText {
 }
 VideoOptionsFrameDefaults = VideoOptionsFrameDefaults {
 }
 MerchantItem4AltCurrencyFrameItem1Text = MerchantItem4AltCurrencyFrameItem1Text {
 }
 BINDING_NAME_NAMEPLATES = "Show Enemy Name Plates"
 IsReferAFriendLinked = <function> defined =[C]:-1
 MAIL_LETTER_TOOLTIP = "Click to make a permanent
copy of this letter."
 AudioOptionsVoicePanelMicrophoneVolumeThumb = AudioOptionsVoicePanelMicrophoneVolumeThumb {
 }
 ContainerFrame1Item22Cooldown = ContainerFrame1Item22Cooldown {
 }
 CHAT_CONFIG_OTHER_COMBAT = <table> {
 }
 CONSOLIDATED_BUFFS_PER_ROW = 4
 TutorialFrameRight19 = TutorialFrameRight19 {
 }
 MoneyFrame_OnEvent = <function> defined @Interface\FrameXML\MoneyFrame.lua:199
 BN_UNABLE_TO_RESOLVE_NAME = "Unable to whisper '%s'. Battle.net may be
If I delete this

Code:
        text = replace(text, '(s%-)', 'S')
        text = replace(text, '(a%-)', 'A')
        text = replace(text, '(c%-)', 'C')
        text = replace(text, '(Mouse Button )', 'M')
        text = replace(text, '(Middle Mouse)', 'M3')
        text = replace(text, '(Num Pad )', 'N')
        text = replace(text, '(Page Up)', 'PU')
        text = replace(text, '(Page Down)', 'PD')
        text = replace(text, '(Spacebar)', 'SpB')
        text = replace(text, '(Insert)', 'Ins')
        text = replace(text, '(Home)', 'Hm')
        text = replace(text, '(Delete)', 'Del')
This addon don't return error and enable again but not abbreviate hotkeys are shown, line 112 begins in: text = replace(text, '(s%-)', 'S')

Thx for reply, I hope can add this for better game experience. I love ur mod, is very lightweight
Last edited by Dhaern : 10-19-10 at 05:17 PM.
Report comment to moderator  
Reply With Quote
Unread 10-19-10, 04:10 PM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
Mail Blizzard
It can be done via replace. Open the functions.lua. Find this
Code:
      if cfg.hotkeys.show then
        ho:SetFont(cfg.font, cfg.hotkeys.fontsize, "OUTLINE")
        ho:ClearAllPoints()
        ho:SetPoint(cfg.hotkeys.pos1.a1,bu,cfg.hotkeys.pos1.x,cfg.hotkeys.pos1.y)
        ho:SetPoint(cfg.hotkeys.pos2.a1,bu,cfg.hotkeys.pos2.x,cfg.hotkeys.pos2.y)
      else
        ho:Hide()
        ho.Show = nomoreplay
      end
Make it
Code:
      if cfg.hotkeys.show then
        ho:SetFont(cfg.font, cfg.hotkeys.fontsize, "OUTLINE")
        ho:ClearAllPoints()
        ho:SetPoint(cfg.hotkeys.pos1.a1,bu,cfg.hotkeys.pos1.x,cfg.hotkeys.pos1.y)
        ho:SetPoint(cfg.hotkeys.pos2.a1,bu,cfg.hotkeys.pos2.x,cfg.hotkeys.pos2.y)
        
        local text = ho:GetText()
        
        text = replace(text, '(s%-)', 'S')
        text = replace(text, '(a%-)', 'A')
        text = replace(text, '(c%-)', 'C')
        text = replace(text, '(Mouse Button )', 'M')
        text = replace(text, '(Middle Mouse)', 'M3')
        text = replace(text, '(Num Pad )', 'N')
        text = replace(text, '(Page Up)', 'PU')
        text = replace(text, '(Page Down)', 'PD')
        text = replace(text, '(Spacebar)', 'SpB')
        text = replace(text, '(Insert)', 'Ins')
        text = replace(text, '(Home)', 'Hm')
        text = replace(text, '(Delete)', 'Del')
        
        if ho:GetText() == _G['RANGE_INDICATOR'] then
          ho:SetText('')
        else
          ho:SetText(text)
        end
        
      else
        ho:Hide()
        ho.Show = nomoreplay
      end
I'm not going to add it though for language reasons and because I don't want to.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Last edited by zork : 10-19-10 at 04:12 PM.
Report comment to moderator  
Reply With Quote
Unread 10-19-10, 02:47 PM  
Dhaern
A Kobold Labourer

Forum posts: 0
File comments: 63
Uploads: 0
The Problem: currently when using the number pad for action button hotkeys WoW formats the hotkey text on the button as NUM 1, NUM 2, NUM 3, etc. Well, at least I think so. Trouble is that all it actually shows is NUM. NUM, NUM, NUM. This makes the text on the buttons absolutely useless.

The Suggestion: change the format of this button text for number pad so that things that are obvious to the person who set the hotkeys (Number Pad, Control, Alt) are abbreviated by their first letter and a dash, or the first letter only. That way the hotkey text would look something like:

N-1, N-2, N-3
C-N-1, C-N-2, C-N-3

Any plans for implement this? this option will not cpu hog and I suppose easy to do. Thx for this great mod
Report comment to moderator  
Reply With Quote
Unread 10-18-10, 04:31 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
This mod styles the Blizzard default button template only. If a mod makes use of that the buttons will get styled otherwise they will not. This is the case for Bartender and there are no plans to change the intention of the mod which is styling the default button template.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Last edited by zork : 10-18-10 at 07:12 AM.
Report comment to moderator  
Reply With Quote
Unread 10-18-10, 03:20 AM  
eldavido
A Kobold Labourer

Forum posts: 1
File comments: 106
Uploads: 0
Hi there,

I've recently been pointed to this addon by a friend of mine, who swears by it due to low overheads. I have to say, at first glance, I was quite keen to try it, but after many hours messing around couldn't get it working...

It was then I noticed a post saying that it wasn't compatible with Bartender, but Domino's worked ok. So, I switched to Dominos, but really didn't like it, so is there any way, or plans afoot, to make it work with BT4?

Sorry if this has already been answered / discussed before, but I'm posting from work, and access is... difficult :/

Thanks!
Report comment to moderator  
Reply With Quote
Unread 10-17-10, 03:03 PM  
wtrhzrd
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
Yes, was just about to edit that post... I just figured that by playing with it some more... sorry.

Well, I got it all tweaked up finally... using stoneh skin I pretty much was able to swap from Stellarbars/Buttonfacade/Buttonfacade_Caith to Domino's and rABS/Stoneh and get the same look with a smaller overhead and fewer addons. Very nice work and thanks for the addon. Works and looks great.

I still couldn't figure out how to insert SetTextColor into the lua to get the hotkey font color to change. Mostly, I tried alot of different combinations with the code example I had from wowwiki, but I dunno jack really about lua scripting so I'm sure it's me not knowing what I'm doing.
Last edited by wtrhzrd : 10-17-10 at 07:25 PM.
Report comment to moderator  
Reply With Quote
Unread 10-17-10, 02:57 PM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
Re: Background Textures

the alpha value you set is used for both.
Code:
    backgroundcolor   = { r = 0.3, g = 0.3, b = 0.3, a = 0.7},
"a" stays for alpha. r,g, b for RGB (red, green, blue). Make "a" = 1 and it will be solid.

Try
Code:
backgroundcolor   = { r = 0.2, g = 0.2, b = 0.2, a = 1},
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Last edited by zork : 10-17-10 at 03:03 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: