Quest Tracker Info Panel
Quote:
|
Quote:
|
Well, doing my usual infopanel set up and I have successfully got the watch frame linked to the infopanel. However, it doesn't seem to want to go in the panel. And once the infopanel is set up the watch frame is no longer moveable by nUI.
I'm reparenting WatchFrame which is the main frame for the Objectives window but it just refuses to keep the anchors I give it. I can't see where but perhaps nUI is re-anchoring after I have reparented it. So, for now at least, it isn't possible to move the watchframe into an infopanel. |
You probably need to call nUI_Movers:lockFrame( WatchFrame, false, OBJECTIVES_TRACKER_LABEL ); to unlock the frame so you can move and/or size it. Also have a look in the [ nUI > Integration > nUI_Minimap.lua ] file at the bottom to see the handstands you have to do to move/resize the frame.
|
Hmm, thanks Scott.
I'm doing this at present for resizing so I guess I need to use the title instead of nil. Code:
plugin.sizeChanged = function( scale, height, width ) Code:
plugin.setEnabled = function( enabled ) Will try it out again tomorrow though. |
I think the thing that may be an issue here is that you need a "StartMoving" and a "StartSizing" call after you unlock the frame and before you start trying to change the size. Then you need a "StopMovingOrSizing" when you're done.
Also, you should probably use the label to unlock the frame, but you are correct to not use the label when you lock it back. Otherwise it will appear in the movable frame list when you use '/nui movers' |
One other thing... I suspect that resizing the tracking window to fit the info panel is going to cause issues with "not enough room to track more quests" etc.... not sure how that's going to play out.
|
Quote:
|
Yeah - you would have to make it a child of a scroll frame, but that should be doable.
|
That will be a challenge. I've only managed to do a simple scroll list before.
|
It's actuall fairly straight forward... you just need the scroll pane as a parent to the quest tracker frame and the vertical scroll bar. I have code I've written for nUI6 to do scroll frames for the configuration box. I'll dig it up and when I get home this evening and send it to you.
|
1 Attachment(s)
Hmm, WatchFrame is not movable. Adjusted the mover locking code and added the ismoving etc code thats in combatlog but no dice. And setting the frame as movable just breaks it even more with the mouse not responding to anything else.
Well, with the moving code taken out and just the addition of the frame name on the movers code and a ClearAllPoints call it is now in the right place but too big. As this screenshot shows. Ah, with the FrameName in the movers code it keeps the tracker in the movers list but in the wrong place. Using the nil reference as usual it removes the tracker from the movers list which is what we want. |
You should be able to change the size of the watch frame after you unlock it and after you do the "StartSizing" call on it. Again, look at the "ResetWatchFrame()" method in [ nUI > Integration > nUI_Minimap ] and see how nUI is doing it. All you should have to do is basically copy and paste that method, then change where you are moving it to, what size you're making it and to "lose" the label when you lock it back down.
|
*blush* was looking at the wrong file rofl.
Trying again :D |
Scratch that, sigh, WatchFrame_Expand errors out due to WatchFrame:GetTop() and WatchFrame:GetBottom() both being nil and thus unable to be calculated on.
Although, I may be doing something wrong using it. The Minimap file isn't a great example, not being an infopanel file. Anyways. Here's what I have so far in the 3 main functions. Anything out of place in these functions ? Oh, and this is the version of nUI that fixes the no unit frames error when you login, which I can confirm works as I changed back and started getting the error again, so went back to your fixed version :D Code:
function ResetObjectivesFrame(parent, width, height) Code:
plugin.sizeChanged = function( scale, height, width ) Code:
plugin.setEnabled = function( enabled ) Code:
[2009/12/23 16:50:10-231-x1]: Interface\FrameXML\WatchFrame.lua:341: attempt to perform arithmetic on a nil value: |
1 Attachment(s)
Xrystal --
Here's the scroll frame from nUI6's viewport configuration panel. In short, you want to create a "UIPanelScrollFrameTemplate" frame as the "parent" that you size to fit the info panel. You then would make it the parent to WatchFrame and call the SetScrollChild() method to make WatchFrame the scroll child. Size the Watch frame the way you want it -- not the size of the info panel, but the size of the watch frame "inside" the scroll frame. If you look at the attached code, the master frame you create is the same as the "ViewportConfig" frame in my code. The WatchFrame is the same as the "ViewportConfig.scroller" frame in my code. You should be able to work out what you need from there. . |
Thanks Scott, will work on that attempt next :D see if that helps :D
|
1 Attachment(s)
Well, so thought I'd start over kinda and start with tying the WatchFrame to this new ScrollFrame thingy :D
For some reason it isn't parenting the WatchFrame properly, which could be why it didn't work with the infopanel as I expected. Apart from some slight positioning offsets it is positioning itself correctly but the moment I move the scroll frame the WatchFrame doesn't move with it despite me setting its new parent to it. Here's the code portion that creates the ScrollFrame and Scroller: Code:
-- Create Main Scroll Frame Code:
local function ResetWatchFrame() Code:
local plugin = CreateFrame( "Frame", "Mini_ObjectiveFrame", UIParent ); |
3 Attachment(s)
Okay, managed to get the WatchFrame to reset itself everytime the scroll frame is moved. However, despite the initial alignment being almost correct the moment the scroll frame is moved the alignment returns back to the non scrollframe way.
Edit: Woot, got it to move and stay inside the frame when it moved. Which works until the scrollframe is moved so that the height I specified to the watch frame means the watchframe has to move outside of the box to stay its height. So it looks like it is ignoring the fact it is in a scroll frame or there is something I am missing from your code Scott. Edit2: Well, thought I would test it on a character with more than 1 quest to track :D Screenshot 3 is the result. I guess there is more involved in getting the scroll frame to scroll :D But I'm not sure which of the rest of your code is relevant. |
Xrystal --
If you want, zip up the code you have so far and attach it as a message here -- I'll take a look at it and see if I can sort out what's missing and then post it back to you. |
All times are GMT -6. The time now is 07:45 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI