There's very few info on this out there. All I know is, there's no built-in way to do this. Rotating a slider doesn't work.
Thing is, I've seen this working in other maps (not for text items via list box, but for scrolling images down or up).
Does anyone have new info on how this may have been achieved or can be achieved? In my special case I want players to use the scroll bar to move (via offset changes or whatever) entire groups of dialog items like labels, images and buttons at the same time.
For example, in the EU version of Star Battle you can open the achievement dialog and scroll down the list with the achievement items. You click on the scroll bar, drag it down and the achievement items move up.. likewise they move down when dragging it up. It's the exact same thing I need and this proves that it's possible, but nobody knows how apparently.
I don't really get the workaround described in your thread. What's mouse tracking and how do I enable it and use it for such a purpose?
You can code it yourself by having an image for your scroll bar (must be non clickable), then when the player presses mouse down, you get the coords, and calculate if it was on the image. If so, you enable the scroll trigger which listens for mouse move events, and moves the scroll bar accordingly (move scroll bar image down, and everything else up, or vice verca). Put "everything else" into a transparent dialog to get cut offs with stuff out of the window.
Disable the scroll trigger if the scrolling players release the mouse button.
It takes a bit of coding, but I'm sure it can be done.
In theory this works, however there is a difference between mouse coords and dialog coords (mouse doesnt fit dialog coords) so it will be slightly off depending on in which area of the screen the mouse currently is (i believe at the bottom right there is the biggest mismatch, all depending on your resolution and screen format).
There might be a work around for this by using the resolution library that can be found somewhere on this site, however it woulnd be easy to do and i havend messed around with that yet.
Id recommend using simple buttons for scrolling (scroll up and down) since its better for performance and takes less work. Additionally the scroll bar will be very laggy on bnet because of your ping, so it will always feel kinda sloppy.
I did encounter some problems on the right side of the screen.. There seems to be an area there where all points get same x coordinate.
Yeah, it would be waaay easier to not have a scroll bar.. But if you really want a scroll bar, that is the way I would do it.
Performance wise, the latency on bnet will cause the scroll bar to be a bit slow to respond. I did something similar, where I made it possible to move dialogs around with the mouse - like windows applications. I don't remember it to be too bad on bnet. Still - even when not on bnet, don't expect it to be fully responsive.
There's very few info on this out there. All I know is, there's no built-in way to do this. Rotating a slider doesn't work.
Thing is, I've seen this working in other maps (not for text items via list box, but for scrolling images down or up).
Does anyone have new info on how this may have been achieved or can be achieved? In my special case I want players to use the scroll bar to move (via offset changes or whatever) entire groups of dialog items like labels, images and buttons at the same time.
@Ranuglin: Go
I'd like to know what map you seen this in... This would be very difficult/tedious to achieve without workarounds.
EDIT: Here is a link to a thread I also made questioning this. With no real answer. http://www.sc2mapster.com/forums/development/triggers/25808-rotating-slider/
@Enexy: Go
For example, in the EU version of Star Battle you can open the achievement dialog and scroll down the list with the achievement items. You click on the scroll bar, drag it down and the achievement items move up.. likewise they move down when dragging it up. It's the exact same thing I need and this proves that it's possible, but nobody knows how apparently.
I don't really get the workaround described in your thread. What's mouse tracking and how do I enable it and use it for such a purpose?
@Ranuglin: Go
What's used in Star Battle is not dialogs. That is the actual GameUI menubar menus customized. (Which comes with a vertical scrollbar)
EDIT: As far as mouse tracking, it's simply getting where mouse was clicked event and mouse X/Y pos.
well list have also scroll bar :p
@Nerfpl: Go
But a list consists of text items and that's totally useless.
You can code it yourself by having an image for your scroll bar (must be non clickable), then when the player presses mouse down, you get the coords, and calculate if it was on the image. If so, you enable the scroll trigger which listens for mouse move events, and moves the scroll bar accordingly (move scroll bar image down, and everything else up, or vice verca). Put "everything else" into a transparent dialog to get cut offs with stuff out of the window.
Disable the scroll trigger if the scrolling players release the mouse button.
It takes a bit of coding, but I'm sure it can be done.
@SBeier: Go
In theory this works, however there is a difference between mouse coords and dialog coords (mouse doesnt fit dialog coords) so it will be slightly off depending on in which area of the screen the mouse currently is (i believe at the bottom right there is the biggest mismatch, all depending on your resolution and screen format).
There might be a work around for this by using the resolution library that can be found somewhere on this site, however it woulnd be easy to do and i havend messed around with that yet.
Id recommend using simple buttons for scrolling (scroll up and down) since its better for performance and takes less work. Additionally the scroll bar will be very laggy on bnet because of your ping, so it will always feel kinda sloppy.
I used the resolution library to calculate click positions before. its quite simple..
I did encounter some problems on the right side of the screen.. There seems to be an area there where all points get same x coordinate.
Yeah, it would be waaay easier to not have a scroll bar.. But if you really want a scroll bar, that is the way I would do it.
Performance wise, the latency on bnet will cause the scroll bar to be a bit slow to respond. I did something similar, where I made it possible to move dialogs around with the mouse - like windows applications. I don't remember it to be too bad on bnet. Still - even when not on bnet, don't expect it to be fully responsive.
@SBeier: Go
Thanks. Good to see that there is at least one possible way to actually create a vertical scroll bar.