I just started looking at TWL in more detail. It seems pretty cool and powerful. I don't know OpenGL at all and just started. I have played around with TWL and Slick over the past few days. I've learned a lot but have a very long ways to go. I ran into some issues and thought of some potential features I would like to use in the future and want to see if it is possible to do them.
Here are my questions:
1. Is it possible to have a button do the following: let's say it has no text and an image that slowly animations a certain way (maybe a small "explosion" for example's sake) and when the mouse hover's over it, the animation changes to something completely different (maybe a rotating skull).
2. I noticed on the TWL demo, when a window(resizableframes/fadeframe) was closed, it animated in an interesting way down to the bottom of the screen. Is it possible to do something like this for opening a window? Let's say I have a graph with a bunch of nodes on the screen and you can click on these nodes. Maybe I want some cool animation to happen before the window is fully present. For example, maybe on clicking the node could rotate quickly and then expand to form a circular window with some information about the node. How complex can this get?
3. Can you have polygonal shaped windows/resizableframes?
4. I made a custom widget that can use Slick2D to draw in it by overriding paintWidget and then getting the graphic object. I've read a few threads on this forum and there seems to be the thinking that this is a bad idea? I should use lwjgl to do drawing in widgets and not Slick?
5. This is related to #4. I noticed when I was drawing in my widget, with Slick2D, that it behaved interesting. The first issue was that the coordinates was based on the "entire screen" and there were not "widget" coordinates. I had to do something like this:
g.drawRect(this.getX()+ 25, this.getY() + 25, 150, 150);
g.drawRect(25, 25, 150, 150);
If I used the above, it would draw a rectangle in the upper right hand corner of my screen - not the upper right hand corner of the widget.
I find this a bit cumbersome and is there anything I can do to ensure that the coordinates are from the "widget" and not the "entire screen". I understand why this is happening - because the graphics is for the entire screen and just not the widget but would like to figure out how to make it from the widget. Sort of like how Swing/Java2D passes in a Graphics object to their paint component method.
The second issue was that I drew a rectangle that was larger than the window. This rectangle was drawing outside of the bounds of the window. Is there anyway to clip this so it doesn't happen? The reason for this is the same as my first issue, I'm sure. I'm using a graphics context for the entire screen and not just the widget.
Thanks a lot for answering some of my questions.