Btw...when you are building your ring segments with non-transparent areas inside your ring the following texture will be enough to display all the rings you will ever need.
You do not have to care about ring-width at all. Clever overlaying and frame-stacking is all you need to create the illusion. Layer 1: (needs two scrollFrames of same color) Layer 2: Layer 3: Handling ring-width is an annoying topic. If you don't have to fiddle with it just don't. The last step is another layer ontop containing highlight/border textures. But I remommend to delay that step until the layout is finished. It is tedious to create it if you are still working on your layout and change sizes around all the time. One thing I still need to check out is the effect of the different BlendModes. |
Here's a link to a good explanation to how BlendModes work.
http://www.wowpedia.org/AlphaMode |
Just some more links on that topic:
http://en.wikipedia.org/wiki/Circular_motion http://cnx.org/content/m42177/latest...ol11406/latest http://www.wowinterface.com/forums/s...ad.php?t=45091 |
Working on it if I have time to spare. Currently doing the basic setup.
http://imgur.com/a/s1uAA#0 Currently setting everything up. The main problem atm is getting the frame stacking right. This included frames for border and highlight effects later on. Basic setup is done. Including a spark texture. Each ring can sit on 1-4 ring segments. A segement can handle rings for castbar, health and power. Each ring can have its own radius. Each ring consists of a background, ring and a spark texture. Code will be released under oUF_Donut. |
What did you decide for where to indicate the spell for a castbar ring?
|
Quote:
I made a fix like that: Code:
local ULx, ULy, LLx, LLy, URx, URy, LRx, LRy = texture:GetTexCoord(); |
SDPanthom wrote an explanation on that here aswell: http://www.wowinterface.com/forums/s...7&postcount=10
Regarding your fix. Does the function only has to be called once per texture prior to any SetRotation calls? If you have to call it after every SetRotation you will be screwed. What if you rotate the texture in a way that your math. prefixed (+-) are wrong because points have switched places. |
Quote:
But the version you said, seems intresting too, to cut the edges after every rotation, and you can change the -+ values based on the rotation degree, i might try to code it later. |
Okay i came up with something like that:
Code:
if (aura.textaura ~= true) then |
I don't really understand the hassle. Just cut out a 1px border of your texture's alpha layer. If that pixel is black the texture will be transparent thus the bug will not appear.
Blizzard uses the outmost 1 pixel for background color multiplication calculations which can be quite useful in some scenarios. |
Quote:
The fix meant to work when the user loads a cusom texture, or a texture from wow. I mostly have problems with ingame icons, i got a thread about it here: http://www.wowinterface.com/forums/s...81&postcount=5 |
I'm getting near alpha state.
Including pet and targettarget (showing a second ring layout template) I decided to add a templating engine for ring setups. Thus it is possible to setup different ring types and use them for specific units. The update and value change functions are done. A ring can use 1,2,3 or all 4 segments. A ring can rotate clockwise or counter-clockwise. Lua Code:
More shots: http://imgur.com/a/786JI#0 *edit* I released oUF_Donut: http://www.wowinterface.com/download...oUF_Donut.html |
|
The bottom image is much easier to process than the first.
|
Maybe...but it has to be tested by actually using it.
The castbar will be hidden most of the time for melee players and against melee targets. Additionally I added an optional attribute to the powerring configuration that allows hiding of the powerring if the unit does not even have power. The good: Testing out ring settings is really easy. It only requires an adjustment on the following variables to change the whole appearance: Lua Code:
http://code.google.com/p/rothui/sour...default.lua#34 Basically you can adjust the radius of a ring. Second you can adjust the texture layers. Last you set how many ring segments should be used, where the ring should start and how it should fill up. That way you can shuffle your rings around in no time and try out new setups. I really like adding class/combo and altpowerbar to the ring template idea. It just fits the the concept. The problem on that is that my 16texture layers will be no more enough to hold all the layers per scrollFrame. Easy enough though. A texture drawlayer is capable of handling a sublevel and a strata. This gives us space for up to 80 textures per scrollFrame. That should be enough >_<. So I need to add the texture strata to the ring template. New ring elements will be "classring" and "altring". As posted above changing the whole appearance can be done easily by changing some variables. Why not use the comboring as an outer ring? Etc. |
Released rCompassCastbar that is using the technique.
http://www.wowinterface.com/download...ssCastbar.html |
I wanted to post here because I came up with a technique based on the one outlined in this topic which can be applied to any source texture, rather than relying on semi-circles.
You start by arranging 4 textures in a grid, setting their texture coordinates so they look like a single copy of the original image. Now our goal is to drain (or fill) each quarter by slicing the original texture from its center to one of its edges. We can use a rotation animation to get the angle we want, but of course this also rotates our texture so it doesn't line up with the rest of the image. However, we can use SetTexCoord to rotate our texture in the opposite direction to the rotation animation to correct its orientation. Here's an animation to illustrate the basic concept: http://gfycat.com/BriefShowyElephantseal The red square is where the scrollframe would normally be used to clip the edges of our rotating texture. And this picture shows the finished design with various fill directions: http://gfycat.com/RealisticBaggyDarklingbeetle I'll leave the script I wrote here. Lua Code:
|
Quote:
But it's good to see that the idea wasn't bad at all :) |
Semlar that is fucking brilliant!
|
While it has to start or end at a 90 degree angle, you can still create arbitrary arcs using transparent textures and adjusting your value to compensate for the offsets.
Here's an example: http://gfycat.com/VioletJauntyGelding This is the source image: |
All times are GMT -6. The time now is 02:01 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI