Textured combo points w/borders
Hi all. Trying to make some headway on textured combo points. I have the following so far to call the combo points, which results in rectangles for combo points.
Code:
self.CPoints = {} Code:
local TopLeft = self.CPoints[i]:CreateTexture(nil, "OVERLAY") Code:
layout.lua:931: attempt to call method 'CreateTexture' (a nil value) |
Only Frames (and derivatives) have the :CreateTexture() method. You are trying to call :CreateTexture() on a texture, so the method does not exist.
|
Quote:
|
Ahh ok. So I guess this would have to be built into oUF by Haste like he did for the runebar?
Anyone know of a similar implementation of this that I can refer to? I'm a novice at lua and oUF. |
No.
Combo points are just shown/hidden. They can be whatever type of frame objects you want them to be. |
Thanks. Since I already have textures spawned in the above code, how can I put a border around them? Again, they appear as rectangles above the target frame. All I need to do is put the border around them to match the rest of the unitframes.
|
I think what various people are trying to say is you should be doing something like this psudocode:
Code:
cpoints = CreateFrame(blah blah) |
Code:
local CreateBorder = function(self) Code:
for i = 1, 5 do Totaly untested though :o PS : Thanks Neal :p EDIT : Wurmfood is just too fast. |
But, can't you achieve your border effect with a simple backdrop?
|
@Bruners Dunno but can't seem to get anything to work now.
If someone finds a solution to this please post. It will take me a while to figure this out I think. Thanks for the help so far! (has no one implemented textured combo points w/borders yet?) @Rostok No dice, but thanks for the try! |
Quote:
colors and alpha gradients, yes, but not a texture. i looked at Button as well... but from the API i have the impression that consists basically of a FontString laid over a background texture (all of which can be configured to fiddle as the user clicks on the button, etc). is there any "generic" way to do masking overlays (i.e. have the user choose a fill texture, then overlay with custom/hand-crafted masks in the shape of numbers, to form the on-screen graphics, analogous to changing the shape of the minimap)? this wouldn't actually be "text" any more, at the API level, and borders/shadows might be hard to automate (that would take more custom art), but it would look like text on the screen. heh, seems like lots of work for a single digit of text. |
From oUF_Caellian
Code:
self.CPoints = {} |
@tyeni yup, that's exactly what i'm doing. Tried creating a new .tga for the texture, call it as
local cptexture = "Interface\\AddOns\\oUF_Lyn\\textures\\combotex" However it doesn't appear. Not sure why. I replaced "bartex" (or "bubbletex" as you show above) with "cptexture" - no go. I'm modifying Lyn's old layout as a base to update it a bit. Added some borders to the unitframes with some help from Rufio UI and others. Thought having the same for the CPs would be cool. Here's how I have it now, code borrowed from Caellian. Actually, it's nice and simple. Just spawns a background color, as shown in the code below, and in the screenshot below. Code:
|
|
You know, I think I figured out what I may have been doing wrong. Will try this again later. Thanks everybody.
Edit: I keep getting this error: Code:
layout.lua:1006: attempt to index field 'CPoints' (a nil value) Code:
self.CPoints[i] = CreateFrame("Frame", nil, self) Code:
local TopLeft = self:CreateTexture(nil, "OVERLAY") |
Code:
self.CPoints = {} |
|
Thanks Zork. I used portions of your code and came up with the following, which does the trick...
For anyone else wondering, this part goes in the beginning, pre-layout: Code:
local function kiss_set_me_a_backdrop(f) Code:
self.CPoints = {} |
All times are GMT -6. The time now is 10:29 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI