Custom Clickable Buttons
So I'm designing my interface with a very specific idea in mind. But I need some custom buttons to make this work. What I need is a semi-transparent clickable button that can have an image set as it (bonus points for 'hover' and 'click' states) with custom X and Y dimensions and can be set to do things like open the Friends list, open the achievements, open the menu, etc. I need it to be movable and have at least 5 different buttons at a time that each have a different image and ability.
EDIT: Simply put I want to be able to add an image to my UI of any dimension that you can click to open various panels. If all of this is possible and could be provided in a single addon, I would greatly appreciate it being linked. Else if it'd be simple enough for a competent individual (that hasn't actually designed any UI items for WoW before) to make, it'd be nice to get an idea how to do that. |
Take a look at CustomButtons, or maybe Button Forge for the "buttons".
You can make your own custom graphics to use (as long as you save them to the proper size and image format) and put them in a folder (titled ICONS) in your Interface folder and they will show up in the icons for the Macro window. Which leads me to this: I know there are scripts, or macros, you can run to open just about any default window in WoW. I don't know them, unfortunately, but I've seen them posted a few times on boards and know they're available. EDIT: Or, you might take a look at nibMicroMenu /EDIT |
None of those seem to do what I need. I need custom graphics with specifically sized rectangular buttons and no forced borders.
|
I made myself a button for vehicle exit.
Lua Code:
Adding a texture could be done like this (Only needed if you want to add a border-texture as normaltexture. Otherwise just use normaltexture for this) Lua Code:
If you want hover-states with different alpha you need to add OnEnter and OnLeave events with the behaviour you want to achieve. Like Lua Code:
Just write your own addon for this. |
Thanks for the info, but considering my experience, I could use some help. I have no idea how to make it do something simple, like show a UI panel. Could you lead me in the right direction there?
|
Example:
http://imgur.com/a/39TYH#0 There is a small button with the text "A" on it. Clicking the button will toggle the achievment frame. Button will be less visibile by default and fade in on mouseover. The red color comes from using a Blizzard button template called "UIPanelButtonTemplate" Code to do it: Lua Code:
http://wowprogramming.com/docs/api/CreateFrame http://wowprogramming.com/docs/api/SetPoint http://wowprogramming.com/docs/api/SetSize etc. How to create the addon for it. Go to your WoW AddOns folder. Create a folder "myFirstButton". In that folder create a file called "myFirstButton.toc". Put this code into the file Lua Code:
Now create another file called "core.lua" and copy the button code from above in that file. Restart WoW to load the addon. |
years aber
Quote:
thanks Zork Gruss |
Thank you for this guide zork, is very nice.
Quote:
|
Quote:
I'll be locking this thread now. Anything new can be put in a new thread. |
All times are GMT -6. The time now is 08:19 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI