Thread Tools Display Modes
04/10/14, 11:15 AM   #1
maggo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 3
Drawing an arc?

Hey, I'm looking to develop an addon like IceHud of WoW, but I'm already stuck with the most important point of the addon: Arcs for Health/Magica/Stamina etc.

A look through the API Wiki didn't get me anywhere... is there really no way or am I just blind?

If it's absolutely not possible I'll most likely use a texture with an arc and draw that (partially), hoping for Zenimax to release a proper drawing API
  Reply With Quote
04/10/14, 12:01 PM   #2
Dio
 
Dio's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 29
Originally Posted by maggo View Post
Hey, I'm looking to develop an addon like IceHud of WoW, but I'm already stuck with the most important point of the addon: Arcs for Health/Magica/Stamina etc.

A look through the API Wiki didn't get me anywhere... is there really no way or am I just blind?

If it's absolutely not possible I'll most likely use a texture with an arc and draw that (partially), hoping for Zenimax to release a proper drawing API
I don't believe WoW has drawing either. It would be cool if the API had something like HTML's SVG implementation, but alas.

I'm pretty sure IceHud is just using arc textures, and using alpha/blendmode to get the desired effect.

Last edited by Dio : 04/10/14 at 12:06 PM.
  Reply With Quote
04/10/14, 01:42 PM   #3
maggo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 3
iirc you could set the curve, size, thickness and other values of the bars, as well as their texture so I guess it really was some kind of shape that's drawn on the screen.
  Reply With Quote
04/15/14, 09:56 AM   #4
wilson0x4d
Premium Member
 
wilson0x4d's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 6
"Math"

You could easily employ a series of graphical assets and basic mathematics to plot graphics along a curve.

Worst case you would just brute force your way through it.

Just as well, it's usually inefficient to draw everything you need, using pre-rendered assets is generally more efficient and preferred. Even in systems which provide drawing primitives/APIs the API calls are little more than instructions that are interpreted by a graphics engine (be it hardware or software.)

Regardless, here are some interesting things to note:
  • IceHud weighs in at 1 MB, that's tell-tale that it ships with a fair amount of graphical assets.
  • IceHud unpacked contains 50 different BLPs.
  • Of the 50 BLPs present, a quarter of them appear to represent the Bars you see in IceHud screenshots.

My suggestion is that the next time you see an AddOn that does something you wish you could do you should first download it then inspect the contents.. not only should it be a learning experience, you may actually save yourself some time and trouble.
  Reply With Quote
04/15/14, 10:15 AM   #5
Saenic
 
Saenic's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
If you take a closer look at IceHud you will see the bars are not filled circular but vertically. The curve is just a texture blended over the filled bars cutting out a shape.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Drawing an arc?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off