Page 1 of 1

Any problem to make a button outside of the area?

Posted: Thu Feb 08, 2024 8:19 pm
by Bugala
I know that if I do

Code: Select all

Box(-1000, -1000, 100, 100, #WHITE)
It is not a problem, but Box will simply not be drawn since it is completely outside of screen.

But what if I do same with MakeButton?

Code: Select all

MakeButton(Nil, #SIMPLEBUTTON, -1000, -1000, 100, 100, {OnMouseUp=Function() debugprint("test") EndFunction} )
Is this a problem except that I cant push that button? Will it even create that button at all?


Point here being that as I am thinking of this system with lots of boxes which are also buttons, and some of them might be outside of the screen at times (being able to scroll around the area, or zoom/unzoom, making some boxes appear/disappear from screen), could I just simply go through each box, both draw them and make them as makebutton()s without having to care if they actually are on screen at that moment or not, or could this cause me some problem? Like could using makebutton 1000 times, even only 10 of them are actually on screen be a problem?

Re: Any problem to make a button outside of the area?

Posted: Sun Feb 11, 2024 9:41 pm
by airsoftsoftwair
Have you tried if it works? I'd guess it does work because layers can also be (partly) outside the screen and buttons can be mapped to layers so I see no reason why it shouldn't work with hard-coded coordinates.