It Does GUI

It Does GUI

I began getting the UI elements in place to render out, and did some hover and click detection. Currently how Horde requires you to draw overlays is by passing in the vertex information (x and y coords of each vertex) I really didn’t want to have to do that for every UI element so I created a class called Rect which includes floats for x, y, width, height. Then using that I figure out the vertex information. I then hooked up my mouse move listener and can now get the state of the mouse and check if the cursor is within my bounds, if so I’m hovering. I also detect if I clicked while in my bounds then it does an onClick event (can you tell I used to web programming?)

I’m going to get the Toolbar finished up tonight, meaning that I can add and remove elements, the individual icons will have an onClick event which will execute an Engine command and do something (probably just log at this point) and maybe hook up a keyboard key to toggle the toolbar on and off.

And if I’m feeling really ambitious I might even add in the console for logging, and have it toggle-able as well.

Comments
comments powered by Disqus