so, here i am, making my Window class, so that i can one line make a Window HUD system! however, i have a problem. i don’t want text and buttons using the same space, neither option boxes and whatever other component i might want to add!
the idea i have is simple, but needs some complex stuff that i want make sure that still don’t exist in jME before doing it myself, i want to:
store all components, such as texts, images, buttons into a array or map or whatever, then everytime i will add something, it will automatically place it somewhere based on a pattern (easy part), but for that, it must NOT place where there is something already! it must calculate the area that the new component will use, and place where it fits, simple “hasColision” method won’t work i guess, since to decide what appear in the front or in the back is decided by “Z” coordinate in orthogonal view, and two planes won’t collide even if they have the same X and Y, if they have different Z. i would guess that something like i want will be found in Math or whatever, but i might search and not find, implement and later discover that there is a better code that was available long ago! i want to avoid that.
good example:
_________________________
| texttexttexttexttexttexttext |
| |IMAGE| texttexttexttexttex |
| |IMAGE| texttexttexttexttex |
| |IMAGE| texttexttexttexttex |
| texttexttexttexttexttexttext |
i plan to make a window class that will manage that behavior if i had only made: “.addImage(XIMAGE);” and “.addText(“THE WHOLE TEXT IN THE WINDOW”);”
as i will only “.addText” one time, i will not specify the position of each Text object and stuff!
hope it was understandable, and thx in advance ;D