Thread Tools Display Modes
01-31-10, 08:42 PM   #121
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
I deliberately designed it that way to store the minimized window in a different location to the expanded window. The idea is have the ability to hide it away where it isn't in your way when not questing but then be ready to pop out to the left, right etc.

I can add a flag though to not do that but may take a bit longer to figure out how to get positioning so that the TOPLEFT of the expanded is the same as the TOPLEFT of the minimized. At present it just remembers where you move it and grabs the GetPoint values which it then stores and uses whenever the state of the window changes. The GetPoint values won't work for what you want so will involve some more code working out there. I'm sure I'll get it soon.

Thanks for that idea though. The initial anchor settings are based on where I would want them and then I make it flexible based on what is asked

Theoretically though if you move the spots so that they are in the same place when expanded/minimized it should work the way you want. But I haven't tested that part of it out as I was testing the different places it could be and not the same
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
 
01-31-10, 09:28 PM   #122
whereswaldo
A Chromatic Dragonspawn
 
whereswaldo's Avatar
Join Date: May 2008
Posts: 167
Yeah, that's what I ended up doing. I'm just used to things opening/closing or expanding/collapsing where I put them. Its easy enough to move both containers to the same location. That was just the programmer in me slipping out. Now that I know how, I will be storing it in the infopanel anyway. It was merely an observation. Great job, BTW. I've been waiting for something like this for a while. I hate the quest list taking up space on my screen.
 
01-31-10, 09:30 PM   #123
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
It's cool. Go break .. erm I mean play with it and see if anything else springs to mind.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
 
02-01-10, 01:55 AM   #124
Seer
A Molten Giant
Join Date: Dec 2007
Posts: 649
Weee Thanks X

But, darn as well, have to work so no time to look at it now...
__________________
Take it as you want or leave it as it is.
 
02-01-10, 02:45 AM   #125
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
Originally Posted by Seer View Post
Weee Thanks X

But, darn as well, have to work so no time to look at it now...
Rofl, well I'm still working on it now, before I fall asleep that is rofl. So may get some more goodies to play with in there before its fully ready to upload
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
 
02-01-10, 06:51 PM   #126
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
Well, managed to learn something new while working on this rofl.

local addonName, addonTable = ...; in each file is a cool thing.

addonTable is global to the addon as long as that line is in each file. Any local variables based off of the values stored in that table are still local to the file you created them in and can be changed without affecting the tables copy of it.

eg.
Code:
local addonName, addonTable = ...;
addonTable["Defaults"] = {};   -- Store in Defaults.lua to keep your default data separate
addonTable["Defaults"].Value = 7;

local addonName, addonTable = ...;
addonTable["Generic"] = {};   -- Store in Generic.lua to keep your generic functions and data separate

local addonName, addonTable = ...;
local Defaults = addonTable["Defaults"]
addonTable["Special"] = Defaults;    -- Store in Specials.lua to add special functionality to your addon whilst nice and separate and initially holding all the default values you already set up
addonTable["Special"].Value = 5;
Then in your main lua file all you need to do is this:
Code:
local addonName, addonTable = ...;
local Defaults = addonTable["Defaults"]
local Generic = addonTable["Generic"]
local Special = addonTable["Special"]
Special.Value = 3
print(Special.Value) shows 3
print(addonTable["Special"].Value) shows 5
print(Defaults.Value) shows 7
Want to reset the saved variables back to the defaults cos something went wrong ? In the SavedVars.lua file you could do the following.

Code:
local addonName, addonTable = ...;
local Defaults = addonTable["Defaults"]
SavedVars = Defaults;
addonTable["SavedVars"].Reset = function()
   SavedVars = Defaults;
end
That aside I realise now why some of my changes haven't been happening. I didn't realise that localizing the addonTable values weren't linking them so I was overriding a local variable and not the addonTable version and thus in the external file that was looking at addonTable it didn't know it had been overridden by the main program since it was initially set.

So, I have finally managed to get both multiple anchor memory and single anchor memory working. The code was so simple it was sickening but hey it works despite the time it took to work out why it didn't want to work.

Now that I know how the new addonTable feature works I am gonna go through the code and make sure that I am not trying to set values that need to be globalised and not localised changes before continuing to the next phase which is separating the infopanel code from the main addon code so that it will be able to be plugged into another infopanel able addon without a single change ( hopefully ). Then there are the saved variables to decide on and store as well as the ability to change them by choice and reset them back to defaults.

Current Copy of the addon at this stage as follows:

Just change the two flags at the top of the SWF_Main.lua file and reload to make the switch. Hopefully by the end of the week I'll have an almost complete if not complete version ready for upload.
Attached Files
File Type: zip ScrollingWatchFrame_v0.7.1.zip (6.7 KB, 577 views)
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
 
02-01-10, 06:56 PM   #127
Marthisdil
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 363
Xrystal:

You rule!
__________________

Marth



 
02-02-10, 04:23 AM   #128
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
Oooh

Managed to separate the infopanel system from the addon along with its own customizable data and a couple of extra custom functions.

Added InfoPanel.setMovable(isMovable) to handle the ability to move the frame out of the panel if you so choose ( such as for big healbots and grids etc ).
Added InfoPanel.setBackGround() to handle setting up the background with a customizable background or our normal nil and alpha'd dependant on user or programmers choice.

And in the main addon file all I had to do was the following ( well, as well as the functionality behind the frame itself - rofl ):

Code:
if ( addonTable["nUI"].IsLoaded() and addonTable["nUI"].UseInfoPanel() ) then 

	-- We don't want nUI to play with the WatchFrame, no offense, honest
	nUI_ResetWatchFrame = function() end;

	-- Create the Frame that the InfoPanel will be parenting
	SWF_WatchFrame = CreateScrollFrame();
	
	-- If this was successful ( and it darn well should be ) then Create the InfoPanel
	if ( SWF_WatchFrame ) then 
		SWF_InfoPanel = addonTable["nUI"].CreateInfoPanel(SWF_WatchFrame, 23, "SWF_InfoPanel");
	end
	
end

local function onEvent()
	if event == "PLAYER_ENTERING_WORLD" then		
	
		-- Just in case we aren't building an InfoPanel version 
		-- We don't want nUI to play with the WatchFrame, no offense, honest
		if ( addonTable["nUI"].IsLoaded() ) then
			nUI_ResetWatchFrame = function() end;
		end
		
		-- Same again here, as there is no need to repeat the code 
		-- if we are using the info panel system, well it might error out if you do
		-- Create the Frame that the InfoPanel will be parenting
		if ( not SWF_InfoPanel ) then
			SWF_WatchFrame = CreateScrollFrame();
		end
		
		SWF_EventFrame:UnregisterEvent( "PLAYER_ENTERING_WORLD" );
	end	
end

SWF_EventFrame    = CreateFrame( "Frame", "SWF_EventFrame", UIParent );
SWF_EventFrame:SetScript( "OnEvent", onEvent );
SWF_EventFrame:RegisterEvent( "PLAYER_ENTERING_WORLD" );
Anyways, another step completed and with the server down I probably won't get down to doing any more today.

Next tasks....
1. Refine the addon wide data storage system
2. Introduce the use of the saved variables system
3. Allow the overriding of some or all of the saved variables and others
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
 
02-02-10, 05:34 PM   #129
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
Getting there. No real functionality changes as such but alot of code structuring done.

nUI_InfoPanel.lua - Contains data for and the create function to make any infopanel you want. Just pass it the child frame its id and its name and whether you want it movable outside of the frame. Everything else is done for you. Just return the frame id when finished for the main file to use as needed.

ScrollFrame.lua - Contains data and the functions needed to handle using a scroll frame. Send it the child frame to scroll and it will do the rest. Again, return the frame id for the main file to use. ( At some point I will have to test this to make sure it works for other scrollable stuff )

WatchFrame.lua - Contains data and functions to handle overriding of the blizzard watch frame. Needs to be used in conjunction with a container frame for full benefit though ( not managed to get a non scrollframe version to work with this quite yet rofl ).

SWF_Main.lua - Holds the meat of the addon and talks to all 3 other files and tells them how to play together. For example the scroll frame has a main anchor but if we want to anchor differently if the watchframe is collapsed or expanded this will tell it to do that. It also determines whether to use the InfoPanel system or not.

And of course the localisation files but then so far I only have 2 lines of localised text rofl.

Whilst some of the code in ScrollFrame and InfoPanel are repeated it is a necessary evil unless we add a Generic.lua ( which I probably will soon rofl ) to handle the generic functionality they can hook into.

Next Step.... SavedVariables Now that will be a fun one. If it can remember all 3 possible anchors and the 2 different backgrounds possible. Then I'll be happy.

I won't post a file up this time though due to no extra functionality. After I have the SavedVariables and slash commands working then I will. If the slash commands become too cumbersome I will probably make an UI version of it but initial thoughts are it won't be necessary.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
 
02-04-10, 10:07 AM   #130
Seer
A Molten Giant
Join Date: Dec 2007
Posts: 649
Love you tender,
Love you sweet,
Never let us go.
You have made our lifes complete,
And we love you so.

Love you tender,
Love you true,
All our dreams fulfilled.
For our darlin we love you,
And we always will.

Love you tender,
Love you long,
Take us to your heart.
For it's there that we belong,
And well never part.

Love you tender,
Love you dear,
Tell us you are ours.
We'll be yours through all the years,
Till the end of time.



(Ok, so the lyrics are bit off this way, it's the thought that counts)
__________________
Take it as you want or leave it as it is.
 
02-04-10, 10:19 AM   #131
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
rofl, now how did you know I loved Elvis

Well, have some saved variables working but not as well as I'd liked. Probably due to how I have the variables system working so trying to figure out how to fix it without re-writing the whole variable system

Woot, think I have my little buglet sorted. At the moment testing that it remembers to reanchor and recollapse as needed. But for some strange reason it doesn't always write the collapsed status to the wtf file. But apart from that it reanchors and recollapses based on the wtf file's values. And changing the wtfs version of the infopanel flag will set it up in the infopanel or not based on that value so double woot. Now to set up the slash commands and get them to interract properly and re-set the values under the right conditions.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 02-04-10 at 10:54 AM.
 
02-04-10, 01:21 PM   #132
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
Okay almost there. A slight bug that cropped up. I found out why the collapse/expand button wasn't showing in the infopanel. It was because the scroll child frame wasn't being resized to reflect the new width of the scroll frame itself. I found that out when I tried to resize the frame outside of the infopanel to find it not moving to reflect the new width rofl. So working on fixing that element and then I should be able to post a new version for all you budding quest watchers out there that want to see it break rofl
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
 
02-04-10, 06:33 PM   #133
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
Okay, finally got it all but finished. *touches wood*

I'll add some screenshots and the latest set of files.

I haven't done all the localizing yet but there should be plenty of messages showing up in the chat frame, specifically when playing with the slash command.

Resetting the saved variables doesn't seem to reset the anchors not being used but I am sure I'll figure that out without altering the existing code functionality

Also, it looks like I may need to delve some more into how the watchframe works as it seems to be keeping the text inside a defined width ignoring my width adjustments.

Also, it seems I may be able to expand on those watched items that are long and blizzard cuts off after a few lines. Understandable when you are limited to 80 lines or so but with our almost unlimited number of lines it could become a useful enhancement.

At present it is coded to do a ReloadUI whenever the docking option is toggled as the InfoPanel framework can only be set up from a fresh loadup and not be toggled in game, mores the pity

And finally, despite trying to get the collapse/expand to work when it was a movable infopanel plugin, after some time decided to turn off the movability while in an infopanel and ignore the extra changes in regards to collapse/expand of the watchframe bar the main blizzard code. So clicking the expand/collapse will make the watchframe collapse as per normal but no extra functionality a non infopanel version will have under those circumstances.

Slash command is /swf and it will list the options available.

Enjoy and tear it apart. Rofl. Delete the WTF file to your hearts content as it will create a new one on log in or create one based on the settings when you reload and use the new refreshed data instead. I think I managed to test every conceivable option but I may have missed something. Let me know if you spot something you expected or didn't expect or would like added or removed and I'll see what I can do.
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_020410_222448.jpg
Views:	582
Size:	254.4 KB
ID:	3949  Click image for larger version

Name:	WoWScrnShot_020410_222255.jpg
Views:	603
Size:	262.2 KB
ID:	3950  Click image for larger version

Name:	WoWScrnShot_020510_002653.jpg
Views:	605
Size:	246.1 KB
ID:	3951  
Attached Files
File Type: zip ScrollingWatchFrame_v0.9.1.zip (11.0 KB, 581 views)
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
 
02-04-10, 06:59 PM   #134
Marthisdil
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 363
Where can I send you those cookies again?
__________________

Marth



 
02-04-10, 07:02 PM   #135
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
Rofl. Just let me know once you've had a play with it and can see that its ready to be uploaded as is. Barring localization that is. The other little buglets won't break it *I hope* so should be fine until they're worked out. The frame can't move out of the game screen so shouldn't get the I've lost where the frame has gone question.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
 
02-04-10, 09:59 PM   #136
whereswaldo
A Chromatic Dragonspawn
 
whereswaldo's Avatar
Join Date: May 2008
Posts: 167
Just wanted to let you know you had a typo in your ScrollingWatchFrame.toc file.

Code:
SFW_SavedVars.lua
SWF_SlashCommands.lua
SWF_Main.lua
Should the first one be SWF instead of SFW?

 
02-04-10, 11:53 PM   #137
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
yeppers I keep doing that .. rofl how it has been passing the tests I don't know rofl

Ah, thats why. The filename is wrong too At least I was consistent for that file. So, for now you can leave it alone rofl. But thanks for letting me know so I can change it before I upload it.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 02-05-10 at 12:10 AM.
 
02-05-10, 05:32 AM   #138
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
If I may make a suggestion...

The "Watch Frame" info panel button label being wider than the button itself makes my CDO itch. ~lol~ You might try using "Objectives" (which may not fit either) or "Quests" as the label instead.

Also... would you object to me brashly stealing your work to integrate it directly into nUI6? You've really done a nice job on this and I honestly think this should be a built in feature of nUI.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
 
02-05-10, 06:24 AM   #139
whereswaldo
A Chromatic Dragonspawn
 
whereswaldo's Avatar
Join Date: May 2008
Posts: 167
Originally Posted by Xrystal View Post
Ah, thats why. The filename is wrong too At least I was consistent for that file. So, for now you can leave it alone rofl. But thanks for letting me know so I can change it before I upload it.
That would probably take care of my next issue. I didn't notice that the file was name wrong also so I changed the name in the .toc. When I tried to dock the frame by typing /swf dock, it just sat there and wouldn't accept the command (chat edit window remained open).
 
02-05-10, 11:03 AM   #140
Marthisdil
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 363
Originally Posted by spiel2001 View Post
If I may make a suggestion...

The "Watch Frame" info panel button label being wider than the button itself makes my CDO itch. ~lol~ You might try using "Objectives" (which may not fit either) or "Quests" as the label instead.

Also... would you object to me brashly stealing your work to integrate it directly into nUI6? You've really done a nice job on this and I honestly think this should be a built in feature of nUI.
God I love you guys!
__________________

Marth



 
 

WoWInterface » Featured Projects » nUI, MozzFullWorldMap and PartySpotter » Customization » nUI: Developer Chat » Quest Tracker Info Panel


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