Works!!!
I got the problem concerning the ImageButtons. Finally the solution was easier than I expected.
What was it ?
Ah, sorry. I thought, you could see it in the source code. A connection between the Image and a container (the HUD) had to be esteblished. See the init method of the ImageButton.
Amos, please don't put this constructor with the hardcoded image names to the TextButton. I don't think, we should put hardcoded filenames to any class in the tk.
This was temporary, of course. We should provide some basic geometry (rectangle) as default.
Yes. We should save three images in a subpackage of the hud package. then we should be able to load them from the TextureLoader without knowing the exact full path.
What do you say about merging ImageButton and TextButton to one class? We would put all constructors of both classes together and had one class being able to render a button with or without text and with or without images.
That may be great iff it doesn't impact on performance when you just want an ImageButton.
It doesn't if no text is wanted, the Text2D thing won't be generated and vise versa.