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,264
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 11-16-16, 06:32 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
The actionbutton config has the following texture elements (for the default ActionBar):
Code:
actionButtonConfig.icon
actionButtonConfig.flash
actionButtonConfig.flyoutBorder
actionButtonConfig.flyoutBorderShadow
actionButtonConfig.border
actionButtonConfig.normalTexture
actionButtonConfig.pushedTexture
actionButtonConfig.highlightTexture
actionButtonConfig.checkedTexture
  • icon is the spell texture
  • flash is when the icon flashes when ready
  • border is shown when you put an item from your inventory in your bar, is shown on ontop of the normalTexture
  • normalTexture is the default border around the icon
  • pushedTexture is the border when pushing a button
  • highlightTexture is the texture when hovering a button
  • checkedTexture is a border that is shown when a button is clicked and the icon is active and will be used shortly after

The aurabutton has the following texture elements (for the BuffFrame):
Code:
auraButtonConfig.icon
auraButtonConfig.border
auraButtonConfig.normalTexture
  • icon is the spell texture
  • border is shown on ontop of the normalTexture for debuff highlight
  • normalTexture is the default border around the icon

Any texture can apply any of the following attributes:

Code:
|-texCoord, type: TABLE, description: http://wowprogramming.com/docs/widgets/Texture/SetTexCoord
|-points, type: TABLE, descriptions: table containing one or more points
  |-type:TABLE, description: point http://wowprogramming.com/docs/widgets/Region/SetPoint
|-color, type: TABLE, description: http://wowprogramming.com/docs/widgets/LayeredRegion/SetVertexColor
|-alpha, type:NUMBER, description: http://wowprogramming.com/docs/widgets/VisibleRegion/SetAlpha
|-file, type: STRING, description: path to texture you want to display, for no texture use ""
Example for actionbutton texture element icon:
Lua Code:
  1. --icon
  2. actionButtonConfig.icon = {
  3.   texCoord = {0.1,0.9,0.1,0.9},
  4.   points = {
  5.     {"TOPLEFT", 1, -1 },
  6.     {"BOTTOMRIGHT", -1, 1 },
  7.   },
  8. }

Example for actionbutton texture element normalTexture:
Lua Code:
  1. --normalTexture
  2. actionButtonConfig.normalTexture = {
  3.   file = mediapath.."normal",
  4.   color = {0.5,0.5,0.5,0.7},
  5.   points = {
  6.     {"TOPLEFT", 0, 0 },
  7.     {"BOTTOMRIGHT", 0, 0 },
  8.   },
  9. }
__________________
| 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 : 11-16-16 at 06:39 AM.
Report comment to moderator  
Reply With Quote
Unread 11-16-16, 05:33 AM  
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 362
File comments: 335
Uploads: 46
Hi Zork,

I am trying to understand better how the textures will be applied to the UI, but I think something is missing me.

So to begin understand I have read:
https://github.com/zorker/rothui/blo...late/README.me

and

Highlight = hover. Equipped = border. Normal, flash, pushed and checked are the same.
and having usually:

Code:
backdrop.tga
backdropBorder.tga
border.tga
flash.tga
highlight.tga
normal.tga
pushed.tga = checked.tga

But how they interact with the UI ?

I am experiencing a step by step process to enable only a texture at time to see what it does ... but it is not easy to understand because sometime I don't see the textures I made and a lot of times I see textures I don't made like the light azure on mouse hover, the checked button of a flyout or the yellow texture on button pressed

After a little bit of testing I think that the "normal" button should be a mix of normal.tga and pushed.tga. Is it true ?

backdropBorder.tga seems to be related to the background of the buttons (if missing the background is transparent).

But the others where and when are applied ?
Can you Zork please make a small usage summary (which condition make the texture show for examples) and giving some advices on this ?

Thanks so much.

P.s.
If you have to deal with tga files please remember (!) that the file should be a power of 2 (64x64 is fine) and 32bit, and it can be TGA compressed.

Another thing, I have tried to deal with .tga files with both photoshop or gimp but if someone need to do too I strongly suggest to use the simpler and lightweight:
paint.net (freeware) http://www.getpaint.net/index.html

Happy hacking
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
Last edited by gmarco : 11-16-16 at 05:34 AM.
Report comment to moderator  
Reply With Quote
Unread 10-29-16, 02:08 PM  
pas06
A Theradrim Guardian

Forum posts: 62
File comments: 18
Uploads: 0
Thanks for testing it out. That works
Last edited by pas06 : 10-29-16 at 02:09 PM.
Report comment to moderator  
Reply With Quote
Unread 10-29-16, 01:33 PM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
I tested it for you. It is working like I posted. But the styling is not perfect since Bartender adjusts the default Blizzard button template. Just use Masque then.

Bartender is generating the buttons not onload but later in the event chain.
You need to delay the styling until Bartender buttons are available.

Lua Code:
  1. local loader = CreateFrame("Frame")
  2. loader:SetScript("OnEvent", function()
  3.   for i = 1, 120 do
  4.     rButtonTemplate:StyleActionButton(_G["BT4Button"..i], actionButtonConfig)
  5.   end
  6. end)
  7. loader:RegisterEvent("PLAYER_LOGIN")
http://imgur.com/q80SHtJ
__________________
| 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-29-16 at 01:48 PM.
Report comment to moderator  
Reply With Quote
Unread 10-29-16, 10:40 AM  
pas06
A Theradrim Guardian

Forum posts: 62
File comments: 18
Uploads: 0
push, i guess you missed my reply
Report comment to moderator  
Reply With Quote
Unread 10-09-16, 12:10 PM  
pas06
A Theradrim Guardian

Forum posts: 62
File comments: 18
Uploads: 0
maybe i didn't get it right, but i still can't make it work. i copied
Code:
local bartender4 = IsAddOnLoaded("Bartender4")
if bartender4 then
  --print("Bartender4 found")
  for i = 1, 120 do
    rButtonTemplate:StyleActionButton(_G["BT4Button"..i], actionButtonConfig)
  end
end
into the theme.lua file, but it didn't change anything
edit: i installed rActionBar to check if there is something else wrong, using rActionBar the styling works.
I can't get it to work for Bartender4. if i uncomment the print line the print message is shown, so the function should run, there is no error message. rActionButtonStyler works tho. can't figure out whats going wrong.
Last edited by pas06 : 10-11-16 at 11:49 AM.
Report comment to moderator  
Reply With Quote
Unread 10-09-16, 12:01 PM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
@pas06
You can use the rButtonTemplate api for any action button as long as it supports the blizzard actionbutton template.
Lua Code:
  1. --dominos styling
  2. if dominos then
  3.   --print("Dominos found")
  4.   for i = 1, 60 do
  5.     rButtonTemplate:StyleActionButton(_G["DominosActionButton"..i], actionButtonConfig)
  6.   end
  7. end
  8. --bartender4 styling
  9. if bartender4 then
  10.   --print("Bartender4 found")
  11.   for i = 1, 120 do
  12.     rButtonTemplate:StyleActionButton(_G["BT4Button"..i], actionButtonConfig)
  13.   end
  14. end
@Vuo
Check the readme.
https://github.com/zorker/rothui/tre...ButtonTemplate
Highlight = hover. Equipped = border. Normal, flash, pushed and checked are the same.
__________________
| 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-09-16, 04:32 AM  
pas06
A Theradrim Guardian

Forum posts: 62
File comments: 18
Uploads: 0
Hi, so wie es aussieht unterstützt rButtonTemplate im Gegensatz zu rActionButtonStyler nicht mehr Bartender4 oder Dominos. Würde mich freuen, wenn das in einer zukünftigen Version wieder funktioniert
Report comment to moderator  
Reply With Quote
Unread 10-08-16, 07:01 PM  
Vuo
A Kobold Labourer

Forum posts: 0
File comments: 10
Uploads: 0
Thanks for the update.

I noticed the config is quite a bit different from the old rActionButtonStyler. Forgive me, but I'm having trouble navigating the new config within any theme.

Previously there were options to set the textures of:

normal
flash
hover
pushed
checked
equipped

Now I can only find the options to set the textures for:

normal
highlight
pushed
checked

Are there some lines I can add to regain all the previous options for setting textures? Also is there a line that I could change to adjust the font?

Thanks
Report comment to moderator  
Reply With Quote
Unread 10-04-16, 07:04 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
rButtonTemplate is updated for Legion.
__________________
| 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 03-22-15, 04:03 AM  
devilArt
A Wyrmkin Dreamwalker
AddOn Author - Click to view AddOns

Forum posts: 51
File comments: 203
Uploads: 2
hi zork
could you add this feature

Lua Code:
  1. local text = ho:GetText()
  2.  
  3.         if text then
  4.             text = text:gsub("(s%-)", "S")
  5.             text = text:gsub("(a%-)", "A")
  6.             text = text:gsub("(c%-)", "C")
  7.             if locale == "zhCN" then
  8.         text = text:gsub("鼠标按键", "M")
  9.         text = text:gsub("鼠标中键", "M3")
  10.         text = text:gsub("鼠标滚轮向上滚动", "MU")
  11.         text = text:gsub("鼠标滚轮向下滚动", "MD")
  12.             end
  13.             text = text:gsub("Mouse Button", "M")
  14.             text = text:gsub("Middle Mouse", "M3")
  15.             text = text:gsub("Mouse Wheel Up", "MU")
  16.             text = text:gsub("Mouse Wheel Down", "MD")
  17.             text = text:gsub("Delete", "Del")
  18.             text = text:gsub("Num Pad", "N")
  19.             text = text:gsub("Page Up", "PU")
  20.             text = text:gsub("Page Down", "PD")
  21.             text = text:gsub("Spacebar", "SpB")
  22.             text = text:gsub("Insert", "Ins")
  23.             text = text:gsub("Num Lock", "NL")
  24.             text = text:gsub("Home", "Hm")
  25.  
  26.             ho:SetText("|cffffffff"..text)
  27.         end
Report comment to moderator  
Reply With Quote
Unread 01-05-15, 12:02 PM  
EKE
An Aku'mai Servant
 
EKE's Avatar
AddOn Author - Click to view AddOns

Forum posts: 37
File comments: 549
Uploads: 13
Originally Posted by zork
@EKE
Yeah you can do that but only by hacking the specific lua files. (bar4.lua etc.)
You need to do that in rActionBarStyler.
OH sorry i post at wrong page......
Report comment to moderator  
Reply With Quote
Unread 01-05-15, 02:01 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
@EKE
Yeah you can do that but only by hacking the specific lua files. (bar4.lua etc.)
You need to do that in rActionBarStyler.
__________________
| 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 : 01-05-15 at 02:02 AM.
Report comment to moderator  
Reply With Quote
Unread 01-03-15, 01:48 PM  
EKE
An Aku'mai Servant
 
EKE's Avatar
AddOn Author - Click to view AddOns

Forum posts: 37
File comments: 549
Uploads: 13
excuse me,
can i only show 8 button for bar2 and bar3?
also, can i use 2*6 style for bar4 and bar5?
Report comment to moderator  
Reply With Quote
Unread 11-17-14, 09:14 AM  
Dhaern
A Kobold Labourer

Forum posts: 0
File comments: 63
Uploads: 0
Originally Posted by zork
After all this years. Are you sure you have not memorized those shortcuts already?
Yeah but I like to see shortcuts always for alts and abilities changes/removal as 6.0

then can't you help me with this code works when reload UI too??

My core.lua:
http://pastebin.com/dY7hvQ62
Last edited by Dhaern : 11-17-14 at 09:54 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: