heeeyah!! ;D
dear kind sirs/and or wenches/turtles;
how can i make scrollbar for inventory that the slider change size depending on the amount of items in my inventory window? just like in expolrer, notice if a folder has many items the slider bar is smaller...but if its almost empty is huge! when i drag the scrollbar slider it also scrolls up or down the rows by row.???
is this doable ???
This is doable, yes. Just use a GUI Slider and change its size and the size of the handle accordingly.
Say the scrollbar can show 6 items and there's 10 in your inventory, then the slider handle needs to be 6/10 times the width of the inventory window.
To set it up so the slider handle will line up nicely with the edge of the inv window, the slider needs to be (inv window width - handle width) wide/high and centered.
Basically, use on_event and every time the player gains or loses inventory, update the position, width and handle image of the slider.
For starters, use a global DynamicSprite for the handle image and draw a rectangle on it.
As for the slider values I'd use 1 to 100 for smooth scrolling and change InvWindow.TopItem accordingly. Takes a bit of math, too.
This may be of some use.
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=40584.0
OOOOOOhhhhhh!! i got it to do it like i wanted with this help exept changing the handle sprite (gonna do later). a great thank-you to both kind sirs! :=
Cheers/doy las gracias/Merci :D ;D :-*