So i am to lazy to find it out myself, without any documentation. But i know there are panels and lables we can add on the GUI. Now my question, if i want to make a little layout with buttons is it possible? Some time ago i read about a HTML parser, for me that would be an awesome feature to build rich user interfaces.
A question to user interface
- Nova
- Closed
The next update will be available on Wednesday, December 18, in the early evening (GMT+1).
This update will not yet replace the Java version, instead it is the actual content update. We'll provide more information about the transition together with the update.
-
-
Afaik you can only add a label where you can put text on. Buttons are not implemented. I wonder how you could possible use buttons within the HUD. I guess keybindings would be more usable.
-
Maybe i want to make an additional menu for a plugin, so you can open it via keybinding yeah. Like said you can also display a panel on the screen. Maybe red itself knows more.
-
More GUI elements, of course also buttons are planned The same goes for keybindings.
Not sure about a HTML parser, at the moment we have no support for that, eventually we will add it in the future, but can't promise that^^ -
Creating buttons your self won't be too hard if there is a callback function which gets fired if the user pressed on the screen with the cursor. All you have to do is calculate the real location where the player clicked and see if there is any saved GUI element there. Which would require to have at least window based arrays saved. Wouldn't be too hard to create if the callback is there, but I don't have the knowledge about the callbacks yet haha.
-
Creating buttons your self won't be too hard if there is a callback function which gets fired if the user pressed on the screen with the cursor. All you have to do is calculate the real location where the player clicked and see if there is any saved GUI element there. Which would require to have at least window based arrays saved. Wouldn't be too hard to create if the callback is there, but I don't have the knowledge about the callbacks yet haha.
Hehe yeah, you can do alot with work arounds, but in software development you never do work twice (like red said its coming). For me the point of interest is located in the general system, for instance a simple html/css parser would allow us to build rich "Plugins", without writing thousands of code lines.
-
That's true, you never have to do things twice. But maybe if I get some free time and I got the money to purchase the game, I'll see if I can write some custom GUI elements and contribute it to the community.
@red51 mind adding opacity in the buttons too? Would be lovely! Also, two small functions would be very useful for things like this;
drawRectangle ( int startX, int startY, int sizeX, int sizeY, string color, int opacity );
drawText ( string text, int startX, int startY, int sizeX, int sizeY, string color, int opacity, int fontSize ); -
XD i would recommend a parser lib which can display html. Much less complicate, much easier to implement.
Participate now!
Don’t have an account yet? Create a new account now and be part of our community!