Jump to content

[1.7.10] List-boxes - scrolling


Recommended Posts

I am looking for some tools that would allow me do something like this:





What we have here are 3 scroll-lists that I want to pull elements from some List in my gui.

Important thing - those elements are NOT buttons, whole thig is supposed to be a choosing (you click one, it highlights and if you would click another one, previous one turns off and new one highlights, ofc separately in each list - there are 3).


Any help would be cool, I am currently "scanning" vanilla server list and had look at creative inventory.

Also: anyone knows some example codes?

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

You're almost certainly going to have to code it yourself.  List boxes aren't commonly used in Minecraft.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.


Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.


DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Well yeah, it's not hard to just make any kind of list, what I have problem with is scrolling - anyone knows where I could find some implementation of scrolling that supports/uses GuiScreen so I could use it myself?


I guess I could use:

protected void mouseClickMove(int p_146273_1_, int p_146273_2_, int p_146273_3_, long p_146273_4_) {}

to make whole thing on my own, but... "don't reinvent the wheel"

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

GuiContainerCreative has an implementation of scrolling.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Link to comment
Share on other sites

Anyway, to sum up everything - as always, it just needed few hours of researches, testing and deciphering a lot of obfuscated fields.



In my GuiCustom ex GuiScreen inside initGui() I am creating List which i then transfer to new GuiElementList ex GuiListExtended. Additionally there is need to make element implementing GuiListExtended.IGuiListEntry which will display objects inside your list inside GuiElementList that is being drawn by GuiCustom.


All that will give nice effect showed in 1st post.


Note: There is A LOT of unobfuscated stuff there, mostly positioning and sizes, takes a while to decode it all (partially possible by looking into GuiResourcePackList and it's child classes/displayers.

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.