Any problem to make a button outside of the area?

Discuss any general programming issues here
Post Reply
Bugala
Posts: 1181
Joined: Sun Feb 14, 2010 7:11 pm

Any problem to make a button outside of the area?

Post 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?
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post 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.
Post Reply