You can now configure each line or add new lines on the Text module. For each line you have a left and right half. You enter the lua code for each half. This is similar to LuaTexts seen in Pitbull.
The execution is sandboxed usually, and below's a script example showing the environment.
if self.UnitExists("mouseovertarget") then
if self.UnitIsPlayer("mouseovertarget") then
c = self.RAID_CLASS_COLORS[select(2, self.UnitClass("mouseovertarget"))]
c = StarTip.new()
c.r, c.g, c.b = self.UnitSelectionColor("mouseovertarget")
local name = self.UnitName("mouseovertarget")
return name, c
return "None", StarTip.newDict("r", 1, "g", 1, "b", 1)
There are also two functions.
self.unitHasAura(aura) -- aura is the buff's name
self.short(value) -- value is a number. Formats a large number, i.e. 1000 = 1k
I might add other internals later. I'm open to suggestions.
Try deleting your saved variables before reporting a bug, unless you can pinpoint where the problem is.
Report any bugs here or in a ticket. Send patches on this addon or any of the related libraries.
Can anyone tell me why some frames (such as StarTip's config frame) creates an overlay? Is anyone else seeing that? I have another frame that is like this.
This only happens some of the time. I think it's happening at loading time, and it's random.
I have no other addons enabled except StarTip.
Edit: Just realized it enabled/disables over and over.
StarTip provides 3 methods for recycling tables: StarTip.new(...) StarTip.newDict(...) StarTip.del(tbl). Use these in your texts when you need to create tables. Note that color parameters are recycled internally.
Memory usage is something I'm concerned about. The best way to have StarTip consume a lot of memory is to hover over a bunch of units over and over (while the Text module is active). I'm still searching for areas where I can recycle memory.
I think I have all of the memory leaks plugged. Also I provided table recycle functions for lua texts: StarTip.new(...), StarTip.newDict(...), and StarTip.del(tbl). Note that colors returned from lua scripts are recycled internally.
I wrote an expirimental module named DeadlyAnnounce. If you have DBM or BigWigs installed, the last 10 announcements will be stored back. When you mouse over a unit it'll display the announcement history on the tooltip, then the normal tooltip is shown after a short delay. This is all waiting on approval from Boss Mod: Text-to-speech's author for the DBM hooks. At least the DBM end of things. BigWigs was simpler.
I won't raid for a week so I'd love some testing in the meantime. :) Is this even a good idea? Grab the latest alpha package if you're interested in testing.
Other modules can be written to show all sorts of information for a brief period. For instance, a time line of your buff history. Or guild chatter. You can display just about anything you want. There's also the possibility of including other tooltips around the main tooltip to partition groups of information. So you could display guild chatter in one tooltip, or whispers in another. Once you get multiple modules running at once, you'll want other tooltips.
I thought you guys might get a kick out of this. I'm putting the entire lcd4linux design into a Wow unit tooltip. This is going to rock. People will be able to configure their LCD displays via the same configuration design, through a simple Lua table entered in game.
That's the equivalent of a Text widget. There are other widgets as well, such as an icon widget, which LibQtip's cell features are going to come in handy. :) They're 7x8 cell icons, except that they're not drawn per LCD character. You'll just use an allocated portion of the tooltip. :) The icons can be animated. Here's an example config.
If you're not sure what I'm talking about when I say LCD displays, here's an example.
Of course ours can't be as rich. All we can do is text and larger bars/histograms/icons than this. And of course the information shown is going to be different. :) I'm working on the marquees at the moment. Not shown are big numbers.
The main reason I'm doing this is for boss mods. I want people to be able to mouse over any unit and see stats on the fight. That's as long as it doesn't turn into a CPU killer. :) We'll see. Like I said, it's all experimental. So far it's looking fine, except that I have a small memory leak somewhere.
And I figured if other people could use the marquees and LCD displays in their own addons, all the better. Honestly I didn't feel like writing a module for everbody's wishes. :) This way I don't have to go crazy hooking into every single boss mod on the planet. Instead I offer them the ability to embed it in their code. The libraries just takes lua tables to configure.
The entire LCD is configured in parts: display, layout, and widget. There are several widgets. Examples are text, bar, histogram, key, timer, and I wish (music/combat log) visualization. I think that would be too much for WoW though. :)
Edit: Oh and you could also have an image widget. :) I'm not sure how that would work out though.
Fixed editing lines again. :/ I gave the overall text module a restructure. Now it only updates the lines every refreshRate interval, instead of every widget draw. All that does now is add the widget to a queue to be drawn.
There's still a memory issue. I'm not sure why. Maybe it's cause I'm making a lot of locals in functions?