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

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
720-2017032801
4kB
03-28-17 04:48 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-17-16, 01:41 AM  
gmarco
A Cobalt Mageweaver
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 232
File comments: 165
Uploads: 37
Hi Zork,

I see you have updated also the github with this changes
Later in the morning I check this out Thanks

Just a thing I am thinking about...

Actionbars and de/buffs happily work without have to make them depends on a specific addon for the button layout.

Example:


Could you extend such behaviour also to rFilter ? In this way we don't need the statically depend condition in the toc file ? If there is a rButtonTemplate_layout ... use it otherwhise use the standard blizzard textures and icons.



If this will not be possible or too complex I was thinking to another thing (crazy ?) .

Is it so crazy I have ALL the rButtonTemplate layouts deploys using all the same folder structure and names, i.e. rButtonTemplate_Layout. In this way I can try all layouts (once at a time and the rfilter always get the skin, because I put in his toc file:

Code:
## Dependencies: rLib, rButtonTemplate_Layout
So to explain better: the "project" name on curse/wowinterface have different titles (rButtonTemplate_layout1, rButtonTemplate_layout2 and so on) but all of them install as rButtonTemplate_Layout.

Or better make the every different rButtonTemplate_Layouts export the same global configuration named rButtonTemplate_Layout and rFilter use that if present and not the different addons name.

In this way we to prevent the mandatory "Dependencies" condition that have to be changed to modify the button template.

Btw as usually Zork thanks so much for your time and attention.

P.s
This is only to discuss and chat, nothing mandatory
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
Report comment to moderator  
Reply With Quote
Unread 11-17-16, 12:08 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1685
File comments: 3656
Uploads: 120
Sure you can make your button template actionbutton config global and make your button template theme a required addon.

To do that you add it to the required addons of rFilterConfig: https://github.com/zorker/rothui/blo...lterConfig.toc
Code:
## Dependencies: rLib, rButtonTemplate_Gm
In rButtonTemplate_Gm/theme.lua https://github.com/zorker/rothui/blo.../theme.lua#L42 you do sth like this:

Lua Code:
  1. local actionButtonConfig = {}
  2. rButtonTemplate_Gm_ActionbuttonConfig = actionButtonConfig

That way rButtonTemplate_Gm_ActionbuttonConfig becomes global and you can access it in rFilterConfig.

That being said...since it is bound by reference if you want changes on a specific part you need to copy it first. Otherwise you change the reference and all buttons will change. That is why the button theme is using copyTable so often.

rLib has the function avaiable: https://github.com/zorker/rothui/blo...b/core.lua#L23

In rFilterConfig.actionbutton.lua you can do sth like this:
Lua Code:
  1. --copy the default button theme
  2. L.C.actionButtonConfig = rLib:CopyTable(rButtonTemplate_Gm_ActionbuttonConfig)
  3. --add specific changes here to L.C.actionButtonConfig
  4. L.C.actionButtonConfig.name.alpha = 1

Btw...thanks for bringing that up. I am not sure why I have not done that myself.

*edit* That is the theory. I found some bugs. Need to fix them first.
*edit2* Ok fixed all the issued. Damn I found an error in rLib. :/

https://github.com/zorker/rothui/com...47abe1dccf2864
https://github.com/zorker/rothui/com...71102ec2afd847
__________________
| 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-17-16 at 12:46 AM.
Report comment to moderator  
Reply With Quote
Unread 11-16-16, 08:01 PM  
gmarco
A Cobalt Mageweaver
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 232
File comments: 165
Uploads: 37
Hi Zork and others,

Make a rounded square is easy ... but it is not so easy to if the texture is a circle ... I can't even imagine how to code it

I have finished a different template (rounded square).



A couple of things I'd like to share:

The Blizzard cooldown swinger is squared so I have to disable it while mantaining the numeric cooldown.

I added this code in the top of the template:

Lua Code:
  1. for i,v in ipairs{"Action","MultiBarBottomLeft","MultiBarBottomRight","MultiBarRight","MultiBarLeft"} do
  2.  
  3.     for i = 1, 12 do
  4.         local cooldown = _G[v .. 'Button' .. i .. 'Cooldown']
  5.         cooldown:SetDrawBling(false)
  6.         cooldown:SetDrawSwipe(false)
  7.         cooldown:SetDrawEdge(false)
  8.     end
  9. end

It works fine but is it the right way to do it ?

Another thing.

Is possible to skin rFilter with rButtonTemplate automagically without have to copy the textures in the rFilter media folder ? So if I changed the rButtonTemplate layout it changes accordingly

I mean this:


Thanks for reading
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
Report comment to moderator  
Reply With Quote
Unread 11-16-16, 02:55 PM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1685
File comments: 3656
Uploads: 120
Yes you can do that. You can supply one or more points that will repoint the textures based on the button. That way you can repoint any texture. Check the points in my example and play around with the x and y values.
__________________
| 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 11-16-16, 12:03 PM  
gmarco
A Cobalt Mageweaver
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 232
File comments: 165
Uploads: 37
Zork, Another question if possible.

May I forced an icon inside the texture ?
For example to let you understand better ... if I make circle texture may I force the icon inside without to see the angles of it outside ?

Thanks

P.s


Es. removing the angles here
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
Last edited by gmarco : 11-16-16 at 12:11 PM.
Report comment to moderator  
Reply With Quote
Unread 11-16-16, 11:10 AM  
gmarco
A Cobalt Mageweaver
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 232
File comments: 165
Uploads: 37
Hi Zork,

thanks very much for yoyr precious tutorial

I have made a set of buttons:



and they looks grey but my normal texture is in this way:



and it is white not grey.

But I have forgotten to check this:

Lua Code:
  1. --normalTexture
  2. actionButtonConfig.normalTexture = {
  3.   file = mediapath.."normal",
  4.   color = {0.5,0.5,0.5,1},
  5.   points = {
  6.     {"TOPLEFT", 0, 0 },
  7.     {"BOTTOMRIGHT", 0, 0 },
  8.   },
  9. }

the color is a grey with alpha 1 ? So, if I realize only now that I am putting a grey color on the top of my tga file. So it works like expected )

The others textures that I see wrongly were because I miss this piece of code that you commented in your template causing me to happily deleted in mine

Lua Code:
  1. --[[
  2. --pushedTexture
  3. actionButtonConfig.pushedTexture = {
  4.   file = mediapath.."pushed",
  5.   points = {
  6.     {"TOPLEFT", 0, 0 },
  7.     {"BOTTOMRIGHT", 0, 0 },
  8.   },
  9. }
  10. --highlightTexture
  11. actionButtonConfig.highlightTexture = {
  12.   file = mediapath.."highlight",
  13.   points = {
  14.     {"TOPLEFT", 0, 0 },
  15.     {"BOTTOMRIGHT", 0, 0 },
  16.   },
  17. }
  18. --checkedTexture
  19. actionButtonConfig.checkedTexture = {
  20.   file = mediapath.."checked",
  21.   points = {
  22.     {"TOPLEFT", 0, 0 },
  23.     {"BOTTOMRIGHT", 0, 0 },
  24.   },
  25. }
  26. ]]--

Enable it everything is fine

Thanks again for your help Zork... Now everything is (almost) clear
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
Report comment to moderator  
Reply With Quote
Unread 11-16-16, 06:32 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1685
File comments: 3656
Uploads: 120
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 Cobalt Mageweaver
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 232
File comments: 165
Uploads: 37
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 Wyrmkin Dreamwalker

Forum posts: 54
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: 1685
File comments: 3656
Uploads: 120
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 Wyrmkin Dreamwalker

Forum posts: 54
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 Wyrmkin Dreamwalker

Forum posts: 54
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: 1685
File comments: 3656
Uploads: 120
@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 Wyrmkin Dreamwalker

Forum posts: 54
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
Post A Reply



Category Jump: