The easiest way to create a "castbar"?
Hi Developers.
I'm fairly new at programming addons.. I have completed my first addon last week, which was purely chatframe-based. Now I've a new idea for an addon, which should show a kind of castbar for a few seconds, after an event is fired. I really have no idea how frames, etc works in wow and the tutorials I've found couldn't give me the information I need and the code of, for example, quartz is not that beginner-friendly. Is there a fairly simple way to create a kind of castbar quick and easy? Does anyone know a good tutorial (I don't like to use, for example, Ace, because I want to learn it for myself, how it works :))? A simple help, how to show a graphic for a few seconds ingame (best as a function) would be perfect and I would be happy if someone takes the time to help me here. Best regards, Anuki P.S.: I hope my English is good enough to understand me :confused: |
http://www.wowpedia.org/Widget_API#StatusBar
WoW offers a simple widget you can use. lua Code:
|
Just one thing, shouldn't the statusbar range from 0-100 instead of 1-100?
|
Hey you both :).
Thank you for your answers! I told you, that I'm really a beginner so I have some questions and maybe, you'll think "omg.." ;). I've tried to create a frame into my parentframe ( createframe() ) but I have no idea, how to handle it. Here are my .lua and .xml code, can you please tell me, how I can commit the local frame "SchoolLockStatusBar" into the function SchoolLock_ParseParameters (called at line 13)? :) Thanks a lot, if you can help me. PHP Code:
PHP Code:
|
CreateFrame() is a function, not a method. See the above example for how to use it properly.
|
Just want to share these links in addition to Seerah,
in case you don't know what methods are, and why it's not a method |
Hey, thank you for your answers and for the links :).
Hmm, do I understand it right, that b is a function that calls another function with name CreateFrame()? PHP Code:
PHP Code:
Is PHP Code:
At which point in the code do I have to create the statusbar and how can I use the frame in the both functions PHP Code:
If someone of you have enough time and desire, could you show me how the code have to be, that it works? :rolleyes: When I have a framework or running example, it would be still easier, to understand, how it works! :) |
All times are GMT -6. The time now is 11:31 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI