-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Custom UI Library for menus and buttons #983
Comments
I thought we already had something like this, we have a general button template and we use coding to code the text onto the button instead of creating a whole bunch of new buttons. Unless your talking about something else entirely. |
Maybe we should look into reskinning Swing, because that is a tried and true system that would save us a lot of development time. The only problem I can see is the pause menu. Ready? Set. Discuss! |
By the time i wrote this i have to say that I hadn't looked into the code that deep to see that we actually have some kind of library already in the game. What I am missing though are things like textboxes and scroll menus. For the reskinning idea i think we pretty much already handled the most of the most common and needed component pretty good - i think recoding the whole thing would be a lot of work, so this would be a 'no' for me then. |
well we do have the sprite work for scroll bars and text boxes if we look into the gui art work. So the artwork is already done, but the code just needs to be implemented for it. A possible short code for scroll bars so you can call on that scroll bar code with just a single line would be nice. |
Thats what I meant with 'Library' - like an API that can be easily used. I already started working on a text box (single line input) for the join game screen, but I trashed it because of some issues - I could try it again. |
actually they would be great, we could really clean up some code with that. As I understand it as I tilt my head and stare at it funny for a bit. Our code seems a bit messy in spots and could be simplified with short code handlers for some of the coding. If I knew how to do it properly I could probably do it XD |
I really wish that the whole MojamComponent.java mess would be cleaned up... |
holy crap I'm looking at it right now 0.0 did notch write this when he was drunk? lol |
nope its just the result of several people working on the same file - and they were all adding stuff without reorganizing it xD |
LOL, I figured that was a contributing factor to it, XD. God where to even start on this code, lol. Definitely needs to be organized. I wonder if I shuffle some code around here and just organize according to code block functions if that will screw anything up at all. |
I hope we do get it all sorted in the near future :) FYI: here is the latest shot I took from my text input test: http://imgur.com/Epmaa |
hey that text input looks pretty nice right there and in the mean time I gave myself a 1st - 2nd degree burn on my left hand from ramen noodle because I was to preoccupied with my Tekkit nuclear reactor in creative mode. Testing out some various ways to try and contain blasts, look nice and functional. unfortunately I blew up my last nuclear reactor in survival mode on Maescools server, lol. The damn thing left a huge ass crater XD. |
Text input done :) I have to say that there is a small bug when entering more text than the input is capable of displaying - it shifts the text correctly but it is displayed weird. |
Nice find on that bug Space. I don't think any of us thought about even checking for it XD. I'm starting to get antsy for the first test drive of the multiplayer system LOL |
With the upcoming online features (read more here: #975) there will be a lot of new menus that need to be coded into the game.
Instead of coding every single button into the screen and checking stuff in the rendering functions I thought about creating some kind of UIMenuManager - which Handles all the Buttons, Panels and Boxes that are displayed as a menu.
A MenuManager code would maybe look like this then (just an example, more like pseudo-code):
The text was updated successfully, but these errors were encountered: