Posted December 1, 201311 yr Hey everyone, I have been trying to add a scroll bar to my GUI for a while now but with no luck, and I was curious if someone would take the time to write a detailed tutorial for it. I and many other would appreciate it, and it would be a great contribution to the community. As for what it's scrolling through, you could have it scroll through anything from a list of GUI slots to a list of GuiButtons, or even a list of pictures. Thank you so much. Follow me on twitter! @keepablock Read up on whats new! www.catacombs.co http://electronic-chronic.com/assets/keep-a-block/wikilink/wikilink_logo.png[/img]
December 1, 201311 yr Author Thanks for the example. I've gotten the mouse wheel to work but I'm a little bit confused with the actually clicking and dragging of the scroll bar. Can you explain how it works? Follow me on twitter! @keepablock Read up on whats new! www.catacombs.co http://electronic-chronic.com/assets/keep-a-block/wikilink/wikilink_logo.png[/img]
December 1, 201311 yr Author I've seen yours ben. You inspired me to make mine into a widget, however mine isn't as fancy as yours, because you clip the buttons >.>; <3 Here is my git. I managed to get the click/drag working with the built in methods of GuiContainer. Now I just have to write the algorithm to scroll through my buttons. https://github.com/DrEinsteinium/WikiLink/blob/master/com/dreinsteinium/wikilink/gui/GuiContainerMenu.java https://github.com/DrEinsteinium/WikiLink/blob/master/com/dreinsteinium/wikilink/gui/widget/WidgetScrollPane.java Follow me on twitter! @keepablock Read up on whats new! www.catacombs.co http://electronic-chronic.com/assets/keep-a-block/wikilink/wikilink_logo.png[/img]
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.