Max amount of buttons on a gui

Started by arj0n, Sun 08/08/2010 10:11:18

Previous topic - Next topic

arj0n

Can't find it on the forum: is there a max amount of buttons on a gui and if so, what is the amount?

GarageGothic

30 controls per GUI, I don't think the type makes any difference. There's a page in the manual titled "system limits" where you can find that kind of info.

arj0n

Quote from: GarageGothic on Sun 08/08/2010 10:17:15
There's a page in the manual titled "system limits" where you can find that kind of info.
Thanx for the info.

monkey0506

In the event that limit is ever changed, you can use the constant AGS_MAX_CONTROLS_PER_GUI directly in your script to make it forward/backward compatible:

Code: ags
Button *buttons[AGS_MAX_CONTROLS_PER_GUI];
int i = 0;
while (i < AGS_MAX_CONTROLS_PER_GUI) {
  // ...
  buttons[i] = ...;
  i++;
}


I don't know if you were asking specifically for design purposes, scripting purposes, otherwise, or any combination thereof, but it makes your code safer. ;)

SMF spam blocked by CleanTalk