Reply
Thread Tools Display Modes
Unread 06-10-05, 08:17 AM   #21
diiverr
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 67
Originally Posted by Beladona
just an example, as I dont know the real texture coordinates you are wanting to use...
I had that handled, thank you, and did add the extra config variable. That's all roses. I managed to squeeze an extra bar in the original texture, allowing me to use the full 1-12 range. The coords we're posting here are all jacked up actually, even my last set, I need to go back in and replot the new texture with the extra bar.

Originally Posted by Beladona
* changed DiivSkins_TextureUpdate(); to DS_TextureUpdate();
check.

Originally Posted by Beladona
* removed the first few lines as it will mess up your config settings
* changed the load detection a little pending inclusion of your other bars
* added DiivSkinTextures[1] since you now support settings 1 through 12 on the slider
I'm at work now, but I will make the suggested changes when I get home. The crud I added was mid stream of my gutting out the original code as well as rebuilding that console and my "first use" stuff (I really need to focus). I probably put the additional lines in there to cover for something else that I hadn't pulled out yet (to correct existing errors that Gello had pointed out with the old code).

Sorry about that.

Thanks again for all your help Beladona. I'm quite certain I could not do this with out you.
diiverr is offline   Reply With Quote
Unread 06-10-05, 10:13 AM   #22
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
no problem. just trying to balance "direction / help" with "do it this way".

Just know everything I tell you is the way I would do it, but doesn't mean it HAS to be done that way. In some case that may be true, due to the way lua wants it, but in many cases I show you the way I would do it if I was doing your mod.

On taht note however, I am not doing your mod, and don't really want to, or else it wouldn't be your mod - so I will stick to helping, giving input, and correcting, as long as you want it, and are willing to take the criticism. After all, criticism makes us better in the long run, and hopefully will make your addon one of the better, more well written ones out there!
Beladona is offline   Reply With Quote
Unread 06-10-05, 01:13 PM   #23
diiverr
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 67
Originally Posted by Beladona
no problem. just trying to balance "direction / help" with "do it this way".

Just know everything I tell you is the way I would do it, but doesn't mean it HAS to be done that way. In some case that may be true, due to the way lua wants it, but in many cases I show you the way I would do it if I was doing your mod.

On taht note however, I am not doing your mod, and don't really want to, or else it wouldn't be your mod - so I will stick to helping, giving input, and correcting, as long as you want it, and are willing to take the criticism. After all, criticism makes us better in the long run, and hopefully will make your addon one of the better, more well written ones out there!
I think it's confessional time. Last night, while dismantling what was left of the old AddOn, I noticed a slight oversight. I have the AddOn currently organized with seperate files for the basic frames displayed on screen, and the control elements. I had apparently forgotten to include<Script file="DiivSkinsControl.lua"/> in the DiivSkins.xml. So I believe any script calls to a function from the bar xml weren't being executed. BIG <blush> I would wager that previous suggestions would have likely had me up and running quite a while back in this thread.

So, thank you so much, particularly Gello, for the assistance thus far. I'm sorry it couldn't have been more productively applied.

That little embarassing tidbit off my chest, I must say I am quite impressed with "your way" Beladona, and happily embrace it, and your guidance, as we move forward.

Now, next up would be "plugging in" additional elements to the existing code. So we're all on the same page, this is the lua as of current, including the replotted textures. (I snuck home for lunch).

Code:
-- Global Functions ---------------------------------------
function DS_FirstLoad()
	DS_ControlConsole:Show();
	DS_startup:Show();
	DiivSkinSettings.setup = true;
end
function DS_TextureOnEvent()
	if (event == "VARIABLES_LOADED") then 
		if (not DiivSkinSettings) then DiivSkinSettings = {}; end
		if (not DiivSkinSettings.hbar1) then DiivSkinSettings.hbar1 = 1; end
		if (not DiivSkinSettings.setup) then DS_FirstLoad(); end
		DS_TextureUpdate();
	end
end
function DS_TextureUpdate()
	local key = DiivSkinSettings.hbar1;
	local var = DiivSkinTextures[key];
	DiivSkins_hbar1Texture:SetTexCoord(var.a, var.b, var.c, var.d);
end

-- Configuration Variables ---------------------------------
DiivSkinTextures = {};
DiivSkinTextures[1] = {a = 0.0, b = 1.0, c = 0.9023437, d = 0.984375};
DiivSkinTextures[2] = {a = 0.0, b = 1.0, c = 0.8203125, d = 0.9023437};
DiivSkinTextures[3] = {a = 0.0, b = 1.0, c = 0.7382812, d = 0.8203125};
DiivSkinTextures[4] = {a = 0.0, b = 1.0, c = 0.65625, d = 0.7382812};
DiivSkinTextures[5] = {a = 0.0, b = 1.0, c = 0.5742187, d = 0.65625};
DiivSkinTextures[6] = {a = 0.0, b = 1.0, c = 0.4921875, d = 0.5742187};
DiivSkinTextures[7] = {a = 0.0, b = 1.0, c = 0.4101562, d = 0.4921875};
DiivSkinTextures[8] = {a = 0.0, b = 1.0, c = 0.328125, d = 0.4101562};
DiivSkinTextures[9] = {a = 0.0, b = 1.0, c = 0.2460937, d = 0.328125};
DiivSkinTextures[10] = {a = 0.0, b = 1.0, c = 0.1640625, d = 0.2460937};
DiivSkinTextures[11] = {a = 0.0, b = 1.0, c = 0.0820312, d = 0.1640625};
DiivSkinTextures[12] = {a = 0.0, b = 1.0, c = 0.0, d = 0.0820312};
Looking at that, logic tells me that I will need to add additional lines to the DS_TextureOnEvent function and the DS_TextureUpdate function to reflect a DiivSkinSettings.hbar2. Obviously, corresponding changes would then be made in the new slider frame as well, but a new bar frame would reference the universal Texture_Update. (?)

Where you really lost me, is where I would redirect attention to a new set of plots for the configuration variables once I move beyond horizontal bars and on to a new texture, say, for vertical bars.

I don't have time to fiddle with this in-game right now, but I'm guessing I will define a new set of Variables, a new [key], DiivSkinTextures_02 for example, for the new element. Or would I stay in DiivSkinTextures, and progress to something more to the tune of:
Code:
DiivSkins_vbar1Texture:SetTexCoord(var.e, var.f, var.g, var.h);
?

Am I close?
diiverr is offline   Reply With Quote
Unread 06-10-05, 02:36 PM   #24
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
try this:

Code:
-- Global Functions ---------------------------------------
function DS_FirstLoad()
	DS_ControlConsole:Show();
	DS_startup:Show();
	DiivSkinSettings.setup = true;
end
function DS_TextureOnEvent()
	local barid = "hbar"..this:GetID();
	if (event == "VARIABLES_LOADED") then 
		if (not DiivSkinSettings) then DiivSkinSettings = {}; end
		if (not DiivSkinSettings[barid]) then DiivSkinSettings[barid] = 1; end
		if (not DiivSkinSettings.setup) then DS_FirstLoad(); end
		DS_TextureUpdate(barid);
	end
end
function DS_TextureUpdate(barid)
	local key = DiivSkinSettings[barid];
	local var = DiivSkinTextures[key];
	local texture = getglobal("DiivSkins_"..barid.."Texture");
	texture:SetTexCoord(var.a, var.b, var.c, var.d);
end

-- Configuration Variables ---------------------------------
DiivSkinTextures = {};
DiivSkinTextures[1] = {a = 0.0, b = 1.0, c = 0.9023437, d = 0.984375};
DiivSkinTextures[2] = {a = 0.0, b = 1.0, c = 0.8203125, d = 0.9023437};
DiivSkinTextures[3] = {a = 0.0, b = 1.0, c = 0.7382812, d = 0.8203125};
DiivSkinTextures[4] = {a = 0.0, b = 1.0, c = 0.65625, d = 0.7382812};
DiivSkinTextures[5] = {a = 0.0, b = 1.0, c = 0.5742187, d = 0.65625};
DiivSkinTextures[6] = {a = 0.0, b = 1.0, c = 0.4921875, d = 0.5742187};
DiivSkinTextures[7] = {a = 0.0, b = 1.0, c = 0.4101562, d = 0.4921875};
DiivSkinTextures[8] = {a = 0.0, b = 1.0, c = 0.328125, d = 0.4101562};
DiivSkinTextures[9] = {a = 0.0, b = 1.0, c = 0.2460937, d = 0.328125};
DiivSkinTextures[10] = {a = 0.0, b = 1.0, c = 0.1640625, d = 0.2460937};
DiivSkinTextures[11] = {a = 0.0, b = 1.0, c = 0.0820312, d = 0.1640625};
DiivSkinTextures[12] = {a = 0.0, b = 1.0, c = 0.0, d = 0.0820312};
Only thing left to do after that is to give each of your bar frames an id. For instance:
Code:
<Frame name="DiivSkins_hbar1" id="1" frameStrata="BACKGROUND" inherits="DiivSkins_hbarTemplate" parent="UIParent">
	<Size><AbsDimension x="512" y="46"/></Size>
	<Layers><Layer level="ARTWORK"><Texture name="DiivSkins_hbar1Texture" file="Interface\AddOns\DiivSkins\Skins\diivskins_01"><TexCoords left="0.0019531" right="1.0" top="0.0" bottom="0.0820312"/></Texture></Layer></Layers>
	<Anchors><Anchor point="BOTTOM"><Offset><AbsDimension x="215" y="550"/></Offset></Anchor></Anchors>
<Scripts><OnLoad>this:RegisterEvent("VARIABLES_LOADED");</OnLoad><OnEvent>DS_TextureOnEvent();</OnEvent></Scripts>
</Frame>
Beladona is offline   Reply With Quote
Unread 06-10-05, 02:39 PM   #25
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
getting your bars to use vertical or horizontal textures is a another function to deal with entirely. I would get multiple bars working with this before you start throwing in re-orientation. It can be done easily enough, but might take some time to understand. That and I am leaving work in 20 minutes so don't have time to type anything up about it
Beladona is offline   Reply With Quote
Unread 06-10-05, 04:27 PM   #26
diiverr
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 67
Originally Posted by Beladona
getting your bars to use vertical or horizontal textures is a another function to deal with entirely. I would get multiple bars working with this before you start throwing in re-orientation. It can be done easily enough, but might take some time to understand. That and I am leaving work in 20 minutes so don't have time to type anything up about it
Hehe, no problem. I'm one of those lucky few that has times, like now, where I can pseudo dork with this stuff while I am at work.

Nice touch with the frame ID. Somehow I knew about them, but I didn't even think about that.

When you say, "re-orientation" you really pique my interest. I hadn't considered the possiblity of selecting whether a bar could be displayed horizontally or vertically, but the functionality is certainly intuitive, and would reduce the "meat" of the AddOn considerably. It also opens up worlds of possibilities on how to handle other textures, such as the end-caps. It also might shed some light for me on how I could incorporate "hide" and "lock" features. I'll stop speculating at this point, and also stop getting too spooled up with how I'm going to layout my options screen(s) just yet.

I actually had another thought about the vertical bars. I'm not sure if it would work, but I think one could actually pull them off the same texture as the horizontal ones if the textcoords were re-directed to draw the image differently. I'll have to look at how textures are inverted again to be sure. If I'm tracking you, I don't think its really germane, but I'll try dorking around with it out of curiosity.




Another thing I want to try to do is incorporate bars that populate the opposite direction. This I don't think I can pull off with just textcoords, as a result of the "dead space" that is needed to keep the image from distorting as the bars get "shorter", so I think I would need to create a new texture for them. I guess I'm not really sure, but I'll play around with it when I'm horsing with replotting the bars for a vertical display.

Why does he want reverse populating bars?

Well, that actually brings up another question. With the current release of DiivSkins, I have been toying around with flexbar scripting and pseudo animation of textures. Think a pop-up flexbar menu, where you show/hide a button group on MouseEnter (or whatever Flexbar Event). Using simple /flexbar runscript :Show() and :Hide() commands I was able to mirror the action of my flexbutton pop-ups with their textural backgrounds. I was even able to selectively display two endcap images such that I had an expanding MainBar recreation that would dynamically update for me in-game. ( clicky for a visual )

Obviously, having a bar that populates right to left is handy when you are trying to create a flyout menu on the right side of the screen, and vice versa.

This isn't a sort of functionality I think is practical for direct integration into the DiivSkin mod per-se, but it does raise a question as to how I would execute this sort of behavior with this new system. I had originally thought I could call the variable data in a script to facilitate changes triggered by FlexEvents, but I don't know that this could be done with how the variables are now constructed?

In any event, it should still be feasible with conventional :SetTextCoord() type scripting, I was just looking for a slick way to keep it less verbose (oh the irony, I know ), as textcoord strings can get pretty long for a single script line in the flexbar application. The saved variable state isn't actually important, in so much as the action it executes in game.

Regardless, the managability of external manipulation is last on the list of wants for what we're doing here. Just a passing thought, please don't let it occupy any of your time. I'm just thinking aloud.

Criminy, sorry for the essay, LOL.
diiverr is offline   Reply With Quote
Unread 06-11-05, 08:21 AM   #27
diiverr
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 67
okies. plugged the new code in.

on display of the slider, I initially got this:
[string "Interface/AddOns/DiivSkins/DiivSkinsControl...]:26:attempt to concatenate local `barid' (a nil value)
That prompted me to change the slider code to emulate what we had done in the lua, like so:
Code:
		<OnShow>
			this:SetValue(DiivSkinSettings[barid]);
		</OnShow>
		<OnValueChanged>
			if DiivSkinSettings then
				DiivSkinSettings[barid] = this:GetValue();
				DS_TextureUpdate();
			end
		</OnValueChanged>
aftermaking the slider change, and logging in and out, I then get this:
[string "DiivSkins_hbar1Slider:OnShow"]:2: Useage:SetValue(value)
at this point, I observed that the bar displayed on screen only has 11 slots, so I logged out again, and opened up the SavedVariables.lua, which still reflects:
Code:
DiivSkinSettings = {
	["hbar1"] = 11,
	["setup"] = true,
}
Curious, I then deleted this portion of the SavedVariables.lua, and logged back into game. Now, my bar had set itself to 1 slot, but I still got the same OnShow errror relating to the slider. I logged back out, and the SavedVariables had updated to my default:
Code:
DiivSkinSettings = {
	["hbar1"] = 1,
	["setup"] = true,
}
Just to be sure, I then reverted back to the older slider code and logged back in. this took me back to the concatenate error.

The saved variables tossed me for a loop at first, as once the barid is constructed, it appears the same as the last system. Now I see that It is at least recognizing and constructing a default value for us, but I have to assume the 11 slot bar was from a prior config, as the slider has not been functional with these most recent changes. (?)

I even looked up concatenate.
1. To connect or link in a series or chain.
2. Computer Science. To arrange (strings of characters) into a chained list.
But I'm afraid I'm still at a loss.

Any ideas?
diiverr is offline   Reply With Quote
Unread 06-11-05, 08:26 AM   #28
diiverr
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 67
Correction. The slider is adjusting vairables and saving them, but its no longer dynamically updating the texture in game. (this is with the original slder code)

edit: trying to plug in [barid] to the slider just breaks it all together.

Last edited by diiverr : 06-11-05 at 08:28 AM.
diiverr is offline   Reply With Quote
Unread 06-11-05, 09:16 AM   #29
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
the problem is that the slider doesn't know what to pass to the texture update, sorry I missed that part..

try this:

Code:
<OnShow>
	this:SetValue(DiivSkinSettings["hbar1"]);
</OnShow>
<OnValueChanged>
	if DiivSkinSettings then
		DiivSkinSettings["hbar1"] = this:GetValue();
		DS_TextureUpdate("hbar1");
	end
</OnValueChanged>
You will have different sliders for each bar I assume, so for each slider you simply need to change the hbar1 to hbar2, hbar3, etc...
Beladona is offline   Reply With Quote
Unread 06-11-05, 09:19 AM   #30
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
yeah the reorientation is kind of interesting. It would actually be easier for me to give you the source code to my upcoming mod. It takes the DEFAULT buttons and makes them draggable and allows you to re-orient them vertical, horizontal, or in different row configs similar to the way BiBmod did it.

The neat thing is, I did it all with the default buttons, including the main ActionButtons, so the default settings in the Interface Options still affect them, not to mention mods that add things like Cooldown numbers to your buttons, will affect them too, despite them being "modded". In other words, they are completely backwards compatible with other mods or changes that affect the default ActionButtons and MultiActionBars

Last edited by Beladona : 06-11-05 at 09:40 AM.
Beladona is offline   Reply With Quote
Unread 06-11-05, 09:27 AM   #31
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 6,928
*steps out of the shadows for a sec*
*points out that she's still reading avidly, even though she isn't posting and desperately hoping that things will calm down enough for her to try to work her way through all of this stuff as well*
*still really wants to understand all this stuff so she can get various graphical skins from EQ ported over*
*fades back into the shadows*
Cairenn is offline   Reply With Quote
Unread 06-11-05, 09:59 AM   #32
diiverr
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 67
That did the trick on the slider. I tried to document my troubleshooting as I went along in the post above, looks like my first intuition was correct, I just (as usual) had the syntax all borked.

I assume now all I need to do to add more bars is duplicate the core texture frame and corresponding sliders, changing my "hbar1's" to "hbar2's" and so on. The lua functions they call will adjust accordingly? Very slick, and thank you very much!




What you are doing sounds really interesting. Utililizing the default action buttons is a nice feature. It should allow the user a nice variety of configuration options without actually reinventing the wheel, thus, avoiding all kinds of related problems. KISS principal at work.

In regards to re-orienting, I have played around with :SetPoint() to re-arrange the way elements are grouped. Somehow I don't think this is the method you employed.

In any event, I don't think :SetPoint() would work effectively with DiivSkins, as its images are technically just one entity re-rendered to reflect several.(?) I could now reconstruct new functions for the TextureOnEvent and TextureUpdate to construct different elements, vertically oriented bars, or some of the other "bits", like endcaps. I think I could even constuct a toggle to flip between which elements are actually displayed and manipulated in the GUI, say, using a checkbox and a bunch of layered :Show() and :Hide() functions.

That said, I have a feeling you have a cooler way to do it.

If you think it would be of any assistance to me, I would be very happy to peek at the code for your AddOn. Not sure if my addy is in my sight profile, but you can get me at: diiverr818 [at] yahoo [dot] com. If you're not "passing it out" just yet, I totally understand.

Thanks again.


EDIT:

Hiya Cairenn, I had a feeling you were lurking. <wink>

Last edited by diiverr : 06-11-05 at 10:02 AM.
diiverr is offline   Reply With Quote
Unread 06-11-05, 10:17 AM   #33
diiverr
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 67
Originally Posted by diiverr
I assume now all I need to do to add more bars is duplicate the core texture frame and corresponding sliders, changing my "hbar1's" to "hbar2's" and so on. The lua functions they call will adjust accordingly? Very slick, and thank you very much!
LOL. I stand corrected. I did that adding the following XML:
-- bar -----
Code:
<Frame name="DiivSkins_hbar2" id="2" frameStrata="BACKGROUND" parent="UIParent" >
	<Size>
		<AbsDimension x="512" y="46"/>
	</Size>
	<Layers>
		<Layer level="ARTWORK">
			<Texture name="DiivSkins_hbar1Texture" file="Interface\AddOns\DiivSkins\Skins\diivskins_01">
				<TexCoords left="0.0019531" right="1.0" top="0.0" bottom="0.0820312"/>
			</Texture>
		</Layer>
	</Layers>
	<Anchors>
		<Anchor point="BOTTOM">
			<Offset>
				<AbsDimension x="215" y="500"/>
			</Offset>
		</Anchor>
	</Anchors>
	<Scripts>
		<OnLoad>
			this:RegisterEvent("VARIABLES_LOADED");
		</OnLoad>
		<OnEvent>
			DS_TextureOnEvent();
		</OnEvent>
	</Scripts>
</Frame>
-- slider -----
Code:
<Slider name="DiivSkins_hbar2Slider" inherits="OptionsSliderTemplate" minValue="1" maxValue="12" defaultValue="2" valueStep="1">
	<Size>
		<AbsDimension x="160" y="17"/>
	</Size>
	<Anchors>
		<Anchor point="TOPLEFT" relativeTo="DiivSkins_hbar1Slider">
			<Offset>
				<AbsDimension x="30" y="-80"/>
			</Offset>
		</Anchor>
	</Anchors>
	<Scripts>
		<OnLoad>
			getglobal(this:GetName().."Text"):SetText("Horizontal Bar 2");
			getglobal(this:GetName().."High"):SetText("12 slots");
			getglobal(this:GetName().."Low"):SetText("1 slot");
		</OnLoad>
		<OnShow>
			this:SetValue(DiivSkinSettings["hbar2"]);
		</OnShow>
		<OnValueChanged>
			if DiivSkinSettings then
				DiivSkinSettings["hbar2"] = this:GetValue();
				DS_TextureUpdate("hbar2");
			end
		</OnValueChanged>
	</Scripts>
</Slider>
This returns an error from this line of the lua:
Code:
	texture:SetTexCoord(var.a, var.b, var.c, var.d);
attempt to index local `texture' (a nil value)


So, true to topic.. I now go back to sorting out... "What am I missing"

edit:
Thinking out loud again... I am registering a variable, I now have [hbar2] in my DiivSkinSettings={}, but the update function is not performing its job, either dynamically with a slider change, or with the VARIABLES_LOADED event.

Last edited by diiverr : 06-11-05 at 10:23 AM.
diiverr is offline   Reply With Quote
Unread 06-11-05, 10:18 AM   #34
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
We should get into an instance messaging of some sort to work through this. I read through all your threads on the official blizz forums (yeah about time) and see the direction you are wanting to go with this.

You want to make your buttons and the like skinnable (maybe in the distant future, make everything skinnable, a full UI skin system)

You want to make it as easy as possible for newbie coders to make their own skin configurations and images.

You want to make it as plug and play as possible, so that people dont have to edit your existing UI to add mroe skins. THey can just add another addon (skin package) that adds onto yours with another skin choice.

I think I can help you with this. With some carefully crafted savedVariables, and option sets, you can reduce your rendered images to a single image (that gets repeated) and can be easily reoriented vertical, horizontal, 2x6, or whatever the heck you want. I have done it with my own button mod, minus the texture skinning, but it can easily be configured with the skinning system too...
Beladona is offline   Reply With Quote
Unread 06-11-05, 10:21 AM   #35
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
the Texture in "hbar2" is named "DiivSkins_hbar1Texture". Change that to "DiivSkins_hbar2Texture" and the error should go away...

Last edited by Beladona : 06-11-05 at 10:23 AM.
Beladona is offline   Reply With Quote
Unread 06-11-05, 10:25 AM   #36
diiverr
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 67
Originally Posted by Beladona
the Texture in "hbar2" is named "DiivSkins_hbar1Texture". Change that to "DiivSkins_hbar2Texture" and the error should go away...
Bingo. Thanks.


reading your other post now.
diiverr is offline   Reply With Quote
Unread 06-11-05, 10:35 AM   #37
diiverr
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 67
Originally Posted by Beladona
We should get into an instance messaging of some sort to work through this. I read through all your threads on the official blizz forums (yeah about time) and see the direction you are wanting to go with this.

You want to make your buttons and the like skinnable (maybe in the distant future, make everything skinnable, a full UI skin system)

You want to make it as easy as possible for newbie coders to make their own skin configurations and images.

You want to make it as plug and play as possible, so that people dont have to edit your existing UI to add mroe skins. THey can just add another addon (skin package) that adds onto yours with another skin choice.

I think I can help you with this. With some carefully crafted savedVariables, and option sets, you can reduce your rendered images to a single image (that gets repeated) and can be easily reoriented vertical, horizontal, 2x6, or whatever the heck you want. I have done it with my own button mod, minus the texture skinning, but it can easily be configured with the skinning system too...
By now, you probably know what you are getting into with my coding capabilities. You are a brave individual , sir (or madam).

The only instant messenger I have set up is yahoo, but I can install a different one if you're serious. Honestly, I don't mind hashing this out here, I'm in no spectacular hurry, and others might learn a trick or two (not just me ) along the way.

PM me here if you like as well.

RE: the individual skinning of buttons, the current release of DiivSkins does something very similar. I understand where you are coming from. The reason I have been dodging it is the somewhat random way in which a texture will be rendered in a given layer or strata. You never seem to know which one is going to be on top of the next. I believe there are ways to combat this with code, but I could always work a little harder on the textures to where this wouldn't need to be accounted for. It should be feasible.

Last edited by diiverr : 06-11-05 at 10:47 AM.
diiverr is offline   Reply With Quote
Unread 06-11-05, 10:51 AM   #38
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
as long as your textures exist in a strata underneath any buttons that get placed on them, you should have no problem. Heck, you might even consider just adding this to the default blizzard bars, or using something similar to my code to tie the skinning and default blizzard buttons into a single standalone addon.

That way you have everything below, or above where it should be, and fully skinnable.

I know a lot of people prefer to use things like Flexbar and the like, but done the way I currently do it, they can use yours, or Flexbar, or both, and neither should interfere with the other...

I use MSN almost exclusively. I do have yahoo, aim, and other accounts, but would need to install them as well to be able to do this. For now though, I am about to log in and do some much needed player development (levelling) so I will shoot you a PM when I am on IM and ready to develop...

Almost done with an updated version of my Dreamweaver Highlighting plugin too, so that it will include Code Hints. Has been a pain in the butt getting working, and up to date, so will be good to have it done and released. After that I can get back to work on my original AddOn so that I can get it out and ready within the month...

Last edited by Beladona : 06-11-05 at 11:02 AM.
Beladona is offline   Reply With Quote
Unread 06-12-05, 05:21 PM   #39
diiverr
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 67
Originally Posted by Beladona
... you might even consider just adding this to the default blizzard bars, or using something similar to my code to tie the skinning and default blizzard buttons into a single standalone addon.
DiivSkins skins them now with a pseudo static image. All I did was parent the frame that held the texture to blizzards frames, then viola. When you enable the bars, you have them skinned. You can disable or adjust the number of slots you display using the MoveAnything interface. Not Ideal, but it worked. Of course... It wouldn't work if you could re-arrange the way the bars were oriented...

I've kinda tabled the bars for the moment, curious what you have in mind for the button by button rendering. I played around with it, but I always ended up making a baziliion frames in the XML again, something I was trying to avoid this time around.

I couldn't do nothing though, so I spent the afternoon playin with endcap images. ( clicky for a jpeg of the targa )

Now, my first inkling is to replicate the coding for the bars to implement these. Basically, DS_CapTextureOnEvent, DS_CapTextureOnUpdate (capid), etc. I would think ultimately, I would have a whole new series up [cap1=x] type entries in my DiivSkinSettings variables.

Way I figure it, each endcap frame I put together could have up to 32 steps (16 128x128 textcoord references, plus a mirror of each) per slider if I finish off that targa. I thought that was pretty cool, I'm kinda excited to see them in game.

I'm pretty confident what I described above would work code wise, but I assume there's a better way? Can I still leech off the original functions some way with the totally new targa reference?

Also, another thing to consider here is how to work a simple SetTexture (rather than TexCoords) into the variables for the default endcaps, if they're visible. I'm guessing that would need a new function as well, and it might be able to be made more universal .. for getting names of other textures that we might want to reskin in the future... But I'm getting ahead of myself. Mostly I'm just curious the best route to work in these "auxiliary" endcaps.

Any advice before I stop copy-pasting pixels and start copy-pasting code?
diiverr is offline   Reply With Quote
Unread 06-13-05, 12:20 AM   #40
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
Hmmmm, another thing to think about is to scrap the slider idea completely. If you do this based on skin packages (allowing anyone to make a set of skins in a single package) and then let them register the package with your mod, you could then have a dropdown that automatically lists all installed skin packages. They select it from a drop down, configure where and how they want their bars displayed, and the textures can configure to match. Shouldn't be difficult to turn it into a robust skinning engine that allows people the freedom to make a package to their own graphical tastes, and release it as an addon of an addon, so to speak...

Let me get some work done with my addons, and we can talk. I will give you the source to my own addon, and let you test it in-game before I release it widely as open beta. I use my mod already in-game every day, so I know it works well. Hopefully giving it to you will let you see how it is handled, and maybe start plugging in texture code to it, to see how you can modify what I did to work with your skin system. In the end I would like to see you make a skin system that bends to YOUR will, not the other way around

Last edited by Beladona : 06-13-05 at 12:27 AM.
Beladona is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Lua/XML Help » What am I missing?

Thread Tools
Display Modes

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