08-08-2023, 06:59 PM
(08-08-2023, 12:25 PM)bplus Wrote: @justsomeguy or @mdijkensIf I'm understanding your question correctly, I see no problem with moving boxes. The hidden screen in merely a stencil of the areas that you are wanting the mouse to be sensitive to. They could be updated at runtime. I do this with the GUI demo that uploaded earlier.
As I said this is interesting but for clarification: This is all done at run time that you run the graphic in a picture editor and create colored areas then find what color the mouse is on?
It must be to handle moving boxes I would think?
I do see the advantage of being able to get the odd shapes left for rectangles being overlapped.
The "color" would have to homogeneous across the stencil of a particular button or control, that way you always get the same value when pressing the button.
Effectively this in nothing but a large look up table. Its just convenient to use the same commands to create it as you do to draw your GUI.
Quote:To me, this is way more complicated than running a couple If Then lines on boundaries. Move the x,y top right box corner, no problem!If you only have a few GUI items, then by all means 'IF' 'THEN' on boundaries are the way to go. But, if your GUI requires a ton of controls, it might get unwieldy pretty quickly. Because, I'm a bit of feature creep, I try to write my code to scale.
2D physics engine https://github.com/mechatronic3000/fzxNGN
Untitled Rouge-like https://github.com/mechatronic3000/Untitled-Rougelike
QB Pool https://github.com/mechatronic3000/QBPool
Untitled Rouge-like https://github.com/mechatronic3000/Untitled-Rougelike
QB Pool https://github.com/mechatronic3000/QBPool