A couple of Listbox questions (FIXED)

Started by RickJ, Mon 03/04/2006 19:19:30

Previous topic - Next topic

RickJ

I have a couple of quick listbox questions.  It seems like I must have know the answers to these at one time or another but am drawing a blank at the moment. 

  • Listbox Limits - What is currently the max number of items or characters that can be contained in a list box?  Is this documented somewhere?  I've looked in the manual under "System Limits", "Constants", and "AddItem".  Does AddItem() returnan error or null when the listbox is full? 

  • FillSaveGameList - The manual says "The save game list can only hold 20 save games. ".  Does this refer to the list that FillSaveGameList creates or something else?   I believe that this number has been increased to 50 now (Btw, manual still says 20).    I know that it's easily scriptable but perhaps FileSaveGameList should have a couple of optional parameters,  to specify the first save game slot where the list should begin and the number of save slots to include in the list?

    That's it!  Thanks..




Pumaman

#1
The ListBox has a limit of 200 items, and you raise a good point that this is not documented anywhere. If you try and add 201, the game will exit with an error, which is probably not very friendly behaviour, so I'll look into changing that.

As for FillSaveGameList, is there really a need for parameters to specify which save games to list? The vast majority of the time a save game window contains all the saves...

Edit by strazer:

AGS v2.72 Beta 7:
* ListBox.AddItem and ListBox.InsertItemAt now return false rather than quitting the game, if you try to add too many items to the list.

monkey0506

I can think of a couple games where you can store a user profile where each user has his/her own savegames.  Although that does seem a bit specific to me and not particularlly oriented toward adventure games.

RickJ

In the case where a main game hase several mini-games then the save game space is shared.  It's necessary to show the proper list of games for restore functionality depending upon which game is running.  It's not really necessary to add the optional parameters as I believe the list can be built otherwise but I thought it would be worth mentioning.   I think it would be of more benefit to novice and beginner scripters than to those of us who have a bit more experience.   I surmise this is the reason the fill function was created in the first place.

So then does FillSaveGameList list all of the save games or only the first 20 or 50.  If not then to what does the 20 save game limit refer exactly?   


Pumaman

Quote from: RickJ on Tue 04/04/2006 04:12:59
So then does FillSaveGameList list all of the save games or only the first 20 or 50. If not then to what does the 20 save game limit refer exactly?

It gives 50. The "20" was just something I forgot to update in the manual.

RickJ


SMF spam blocked by CleanTalk