Quantcast
Download
(4 Kb)
Download
Updated: 10-31-16 03:32 PM
Pictures
File Info
Compatibility:
Return to Karazhan (7.1.0)
Updated:10-31-16 03:32 PM
Created:12-27-08 08:46 PM
Downloads:76,517
Favorites:319
MD5:
Categories:Action Bar Mods, Buff, Debuff, Spell
7.1.0

rButtonTemplate  Popular! (More than 5000 hits)

Version: 710.20161031
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.
API documentation
https://github.com/zorker/rothui/blo...late/README.me (Check the themes for examples)
Quick-Links
rActionBar, rActionBar_Default, rActionBar_Zork, rBuffFrame, rBuffFrame_Default, rBuffFrame_Zork, rButtonTemplate, rButtonTemplate_Default, rButtonTemplate_Zork
Git
https://github.com/zorker/rothui/tre...ButtonTemplate

Optional Files (20)
File Name
Version
Size
Author
Date
Type
1.0-2016112001
4kB
11-19-16 07:31 PM
Addon
710.20161117
14kB
11-17-16 11:42 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


Archived Files (26)
File Name
Version
Size
Author
Date
710.20161027
4kB
zork
10-27-16 12:37 PM
700.20161009
4kB
zork
10-09-16 02:21 PM
700.20161004
4kB
zork
10-04-16 06:21 AM
60000.01
24kB
zork
10-24-14 07:47 PM
50400.01
24kB
zork
09-16-13 04:44 AM
50200.01
24kB
zork
03-04-13 05:37 PM
50100.01
24kB
zork
11-28-12 01:27 PM
50001.07
24kB
zork
11-21-12 12:24 PM
50001.06
24kB
zork
09-21-12 02:19 PM
40300.06
23kB
zork
02-16-12 03:14 PM
40300.05
23kB
zork
02-15-12 04:59 PM
40300.04
23kB
zork
01-20-12 12:51 PM
40300.03
23kB
zork
12-04-11 05:16 PM
40300.02
23kB
zork
11-30-11 01:45 PM
40300.01
23kB
zork
11-30-11 12:35 PM
4.007
23kB
zork
06-29-11 03:40 PM
4.006
23kB
zork
04-28-11 11:40 AM
4.005
23kB
zork
02-09-11 01:55 PM
4.004
23kB
zork
10-17-10 07:16 AM
4.003
18kB
zork
10-16-10 06:03 AM
4.001
18kB
zork
10-15-10 03:40 PM
100812
18kB
zork
08-12-10 03:11 PM
005
18kB
zork
08-02-09 06:42 AM
004-2
17kB
zork
04-18-09 08:28 PM
003
17kB
zork
01-20-09 04:04 PM
002
12kB
zork
01-17-09 07:20 AM


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: 1632
File comments: 3612
Uploads: 118
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) | TDMOG

"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
A Chromatic Dragonspawn
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 189
File comments: 100
Uploads: 33
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 Deviate Faerie Dragon

Forum posts: 18
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: 1632
File comments: 3612
Uploads: 118
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) | TDMOG

"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 Deviate Faerie Dragon

Forum posts: 18
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 Deviate Faerie Dragon

Forum posts: 18
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: 1632
File comments: 3612
Uploads: 118
@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) | TDMOG

"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 Deviate Faerie Dragon

Forum posts: 18
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: 9
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: 1632
File comments: 3612
Uploads: 118
rButtonTemplate is updated for Legion.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Report comment to moderator  
Reply With Quote
Unread 12-18-15, 12:32 AM  
koonyboom
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Can I change the botton-text color??

I wanna cfg.hotkeys color be printed as yellow / cfg.macroname as green/ cfg.itemcount as blue.
I tried some .lua code, but It did not work at all.
Finally, I concede It's very hard to me.. Please help to clear my difficulty.
Last edited by koonyboom : 12-18-15 at 12:35 AM.
Report comment to moderator  
Reply With Quote
Unread 03-22-15, 04:03 AM  
devilArt
An Aku'mai Servant
 
devilArt's Avatar
AddOn Compiler - Click to view compilations

Forum posts: 39
File comments: 153
Uploads: 1
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
A Fallenroot Satyr
 
EKE's Avatar
AddOn Author - Click to view AddOns

Forum posts: 21
File comments: 244
Uploads: 1
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: 1632
File comments: 3612
Uploads: 118
@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) | TDMOG

"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
A Fallenroot Satyr
 
EKE's Avatar
AddOn Author - Click to view AddOns

Forum posts: 21
File comments: 244
Uploads: 1
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
Post A Reply



Category Jump: