Intro
This is my RingMod. It is capable of displaying rings on screen that fill radial. It does not use the massive texture spam approach, instead the ring gets divided into segments and is calculated. I used the approach Iriel posted some time ago when he wrote down his thoughts about the StatRings mod.
Derivated mods
- oUF_RingThing
- oUF_RingThing2
Documentation
https://github.com/zorker/rothui/blo...umentation.txt
How?
https://github.com/zorker/rothui/tre...chive/rRingMod
What is it for?
This is mainly a developers only addon. It includes two test functions for health/mana display for the player and all the other functions that are needed to calculate the values. This mod should show developers how they can do it and provides functions that can be used to achieve it.
Layers
The ring consists of 3 layers: background, ring-segments, foreground. Background and foreground can be hidden.
Dynamic
The background texture can be set to rotate. Thus it will constantly rotate. Update timer and speed can be set in the config.
Alpha blending
Currently the ring segments are set to SetAlphaBlending("ADD") thus the color gets multiplied with the background. Setting can be changed in the config.
Can we do half-rings?
Yes we can. You can define what segments should be used, where to start and in which direction it should be filled.
Half-ring config: http://zorktdmog.zo.funpic.de/ringmo...ringconfig.txt
Can we do orb-like stuff?
Yes we can. Just make yourself textures that can handle it and set the inner_radius to 1. Avoid the 0 it bugs out the SetTexCoord.
Unitframe ideas?
WingUnits anyone?
Or just think about two halrings for health and mana around the portrait in the middle with another ring outside for the castbar.
Or having a health orb in the middle while mana and castbar outside. I tried to do this some time ago with my oUF_Orbs layout but as you can see the bars did not fill radial, they just tried to fake it. This has an end now.
Stuff like that is possible. Is this awesome? Yes it is!
Config
The mod is LUA only for now, my hope is that maybe someone write a GUI for the config. Currently the mod is controlled by a config table in the LUA. Many settings are included and can be adjusted.
Code:
-- ring layout
-- ____ ____
-- / | \
-- | 4 | 1 |
-- ----+----
-- | 3 | 2 |
-- \____|____/
--
-- direction 1 = right (clockwise), 0 = left (counter-clockwise)
-----------------------
-- CONFIG
-----------------------
local ring_table = {
[1] = {
global = {
unit = "player",
active = 1,
ringname = "rM_PlayerHealth",
size = 256,
anchorframe = UIParent,
anchorpoint = "CENTER",
anchorposx = 0,
anchorposy = 0,
scale = 0.82,
alpha = 1,
framelevel = 1,
gfx_folder = "256_1",
segments_used = 4,
start_segment = 4,
fill_direction = 0,
ringtype = "health",
},
background = {
color = {r = 255/255, g = 255/255, b = 255/255, a = 1},
alpha = 0.7,
framelevel = 1,
blendmode = "blend",
use_texture = 1,
do_rotation = 1,
rotation = {
update_timer = 1/30,
step_size = 0.3,
direction = 0,
},
},
foreground = {
color = {r = 255/255, g = 255/255, b = 255/255, a = 1},
alpha = 1,
blendmode = "blend",
framelevel = 3,
use_texture = 1,
},
segment = {
color = {r = 180/255, g = 10/255, b = 10/255, a = 1},
alpha = 1,
blendmode = "add",
framelevel = 2,
segmentsize = 128,
outer_radius = 110,
inner_radius = 90,
},
},
[2] = {
global = {
unit = "player",
active = 1,
ringname = "rM_PlayerMana",
size = 256,
anchorframe = UIParent,
anchorpoint = "CENTER",
anchorposx = 0,
anchorposy = 0,
scale = 0.65,
alpha = 1,
framelevel = 1,
gfx_folder = "256_1",
segments_used = 4,
start_segment = 1,
fill_direction = 1,
ringtype = "mana",
},
background = {
color = {r = 255/255, g = 255/255, b = 255/255, a = 1},
alpha = 0.7,
framelevel = 1,
blendmode = "blend",
use_texture = 1,
do_rotation = 1,
rotation = {
update_timer = 1/30,
step_size = 0.2,
direction = 1,
},
},
foreground = {
color = {r = 255/255, g = 255/255, b = 255/255, a = 1},
alpha = 1,
blendmode = "blend",
framelevel = 3,
use_texture = 1,
},
segment = {
color = {r = 10/255, g = 100/255, b = 150/255, a = 1},
alpha = 1,
blendmode = "add",
framelevel = 2,
segmentsize = 128,
outer_radius = 110,
inner_radius = 90,
},
},
}
Links
Mod
http://www.wowinterface.com/download...o.php?id=14174
TDMOG blog
http://dm.next-gen.org/index.php?sei...rum&forumid=11
eJerks blog
http://elitistjerks.com/blogs/zork/
Dev Shots
http://zorktdmog.zo.funpic.de/ringmod/
Google Code
http://code.google.com/p/rothui/sour...trunk/rRingMod
If there are any questions, just ask me.
Feel free to use this mod for whatever you want.