A question to user interface

  • 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.

  • 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.

  • 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.

    When you feel like quitting, think about why you started.

  • 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 );

    When you feel like quitting, think about why you started.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!