EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   On content change (https://www.eq2interface.com/forums/showthread.php?t=15167)

Draven_Caine 12-06-2010 05:25 PM

On content change
 
Greetings,
I looked through the forum and didn't find anything about this so here I am again.

Is there a way to reset list to bottom (or top) on content change?

Example: My target window icons show only 2 rows, now if a 3rd row is present it moved the icon list up so that the last row is visible. I was able to do this in VG so wasn't sure if I could here.

Thanks,
Draven

Drumstix42 12-06-2010 05:45 PM

If you mean move it up so that you would now see row 2 and 3, but row 1 would be hidden, it might be possible, but I'm not sure if you can put the target effects inside another page or not.

You could try putting it inside a page, and using the ScrollExtent property. The scrollextent is used to return the actual width/height of the elements in a page, rather than just the visible area (normal height/width).

It'd probably take a lot of fooling though, since there's no way to trigger something when a random element's property changes.

Draven_Caine 12-06-2010 06:00 PM

Ahh, i see. VG had a variable for it so eq2 doesn't so its "break it and see" time hehe

With the scroll extent, will it refocus the visible area on the bottom or top? I can mess with it and see what i can come up with. In a raid or big debuff group it almost breaks my target window and ... I ... Have ... Put ... Too ... Work ... Into ... IT!!

Thanks,
Draven

Landiin 12-07-2010 10:56 AM

There really isn't much you can do with the Iconbank object other then how it sorts the icon objects. It'ed be nice if it had a index property but it don't so all you can do is ask Rothgar and maybe he can find the time although I doubt it.

Draven_Caine 02-11-2011 08:59 PM

OK, i am trying to do this to a diffrent window since i couldnt really do it to the window i was after now here is the plan boys and girls

Its the maintained windows:
  • I have 10 buffs in my window
  • Only 8 of these 10 buffs are visible due to the size of the window. (user resiable)
  • how do i get it to show the last 8 buffs in the list instead of the first 8?

Thanks,
Draven

Zonx 02-11-2011 11:59 PM

The ScrollLocation property controls the x,y offset of the viewable area.

To do what I think you're after (scroll the last visible icon into view) I'd do the following...

Note: Pseudo code... and you'll probably have to fiddle with the math to get the desired results, but this should give you a place to start. This assumes your volume page always flows left to right, top to bottom. If instead you are using the edge detection variable flow feature used in the default Maintained window, you'll need to add code to determine the flow and adjust accordingly.

Give each icon page an OnShow script that does the following...

Cols = window.width / iconPage.width
Cols = int(Cols + 0.5)
Rows = window.height / iconPage.height
Rows = int(Rows + 0.5)
LastRow = ceil(iconNumber / Cols)
RowDiff = LastRow - Rows
yOffset = RowDiff * iconPage.height
window.ScrollLocation = "0," ## yOffset

Also give each iconPage an OnHide script that does almost the same thing but subtracts the hidden icon...

LastIconNum = iconNumber -1
Cols = window.width / iconPage.width
Cols = int(Cols + 0.5)
Rows = window.height / iconPage.height
Rows = int(Rows + 0.5)
LastRow = ceil(LastIconNum / Cols)
RowDiff = LastRow - Rows
yOffset = RowDiff * iconPage.height
window.ScrollLocation = "0," ## yOffset

So in short you have scripts on all icons that adjust the scroll location to bring an icon into view if it was previously hidden. Likewise you have scripts on all icons to adjust the scroll location when a previously visible icon is hidden, to remove the now empty space by scrolling the prior visible icon into view.

gm9 02-12-2011 12:27 AM

If you want to scroll why not just set MinimumScrollExtent?

Draven_Caine 02-12-2011 02:57 AM

OK to clarify basically i want this

Now:
------
|buff|
|buff|
|buff|
------
hidden
hidden

I want:
hidden
hidden
------
|buff|
|buff|
|buff|
------

SO basically right now if you have more buffs than the window hold its shows the first x number of buffs, what i want it to do is to show the bottom x number of buffs. This is exactly opposite of what the window does now.

This is helpful for temp buffs that I use on my main (defiler) if i have 10 buffs visible and I cast a ward as my 11th buff, i cant see it which is bad.

I hope this helps explain it a bit better.

Thanks,
Draven

Drumstix42 02-12-2011 04:25 AM

You just need to turn the Scrollable option on for the VolumePage: UserScrollable="true"

Draven_Caine 02-12-2011 04:28 AM

Yes i can make it scrollable but in battle scrollable isn't a good option ... for me anyways lol.

That is why i was looking for a automatic way to show the lasts buffs like my bad illustration lol,

Thanks,
Draven

gm9 02-12-2011 12:20 PM

Quote:

Originally Posted by Draven_Caine (Post 95617)
Yes i can make it scrollable but in battle scrollable isn't a good option ... for me anyways lol.

why? just scroll the static buffs out of the way before you start battle and all you will see for the rest of the battle are your temporary buffs. that's how I always used to play anyway.

Draven_Caine 02-12-2011 02:14 PM

Greetings,
Yes scrolling them out of the way before hand is an option but i was more looking for an automatic solution.

If the buffs automatically scroll than I wouldn't have to worry about remembering to scroll them out of the way to begin with. I personally think we shouldn't have to scroll them out of the way or alter Sony's code to make this happen seems a bit bad to not have your latest buff visible .. but that is just me i guess :(

Thanks,
Draven

Drumstix42 02-12-2011 02:36 PM

You can only have 30 display at once no matter what you do. So if they're filled there's nothing you can do about it.

If you play with them expanded with all the info showing, then yeah 30 is a bit to show at once without scrolling.

gm9 02-12-2011 03:09 PM

Quote:

Originally Posted by Draven_Caine (Post 95620)
Greetings,
Yes scrolling them out of the way before hand is an option but i was more looking for an automatic solution.

Zonx posted how to do that above in case you missed it.

Draven_Caine 02-12-2011 03:15 PM

Greetings,
Ok ill see what I can do with the code ... i might be back :D

Thanks,
Draven

Draven_Caine 02-13-2011 10:49 AM

Quote:

Originally Posted by Zonx (Post 95613)
The ScrollLocation property controls the x,y offset of the viewable area.

To do what I think you're after (scroll the last visible icon into view) I'd do the following...

Note: Pseudo code... and you'll probably have to fiddle with the math to get the desired results, but this should give you a place to start. This assumes your volume page always flows left to right, top to bottom. If instead you are using the edge detection variable flow feature used in the default Maintained window, you'll need to add code to determine the flow and adjust accordingly.

Give each icon page an OnShow script that does the following...

Cols = window.width / iconPage.width
Cols = int(Cols + 0.5)
Rows = window.height / iconPage.height
Rows = int(Rows + 0.5)
LastRow = ceil(iconNumber / Cols)
RowDiff = LastRow - Rows
yOffset = RowDiff * iconPage.height
window.ScrollLocation = "0," ## yOffset

Also give each iconPage an OnHide script that does almost the same thing but subtracts the hidden icon...

LastIconNum = iconNumber -1
Cols = window.width / iconPage.width
Cols = int(Cols + 0.5)
Rows = window.height / iconPage.height
Rows = int(Rows + 0.5)
LastRow = ceil(LastIconNum / Cols)
RowDiff = LastRow - Rows
yOffset = RowDiff * iconPage.height
window.ScrollLocation = "0," ## yOffset

So in short you have scripts on all icons that adjust the scroll location to bring an icon into view if it was previously hidden. Likewise you have scripts on all icons to adjust the scroll location when a previously visible icon is hidden, to remove the now empty space by scrolling the prior visible icon into view.

I am working off the default maintained window code, I had a question to what is meant by the IconPage.
The hierarchy is as follows:

Maintained (page)
- Volume (VolumePage)
-- Frame1 (Page)
--- CancelEffectButton (Button)
--- Icon (Image)
--- Target (text)
--- Subtitle (Text)
--- Name (Text)
-- Frame2
--- CancelEffectButton (Button)
--- Icon (Image)
--- Target (text)
--- Subtitle (Text)
--- Name (Text)
-- Frame3
--- CancelEffectButton (Button)
--- Icon (Image)
--- Target (text)
--- Subtitle (Text)
--- Name (Text)
- WindowFrame
-- Frame
-- Background

I add the element names next to the elements.

Now i had a thought, might be way off, but say the maintained window is 100 px tall and the volume page is 200px tall cant we tell the volume page to have a top location of -100?

Your code might do that just a amateur UI coder's thoughts lol

Thanks,
Draven


All times are GMT -5. The time now is 02:05 AM.

vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI