Recent Games Played Menu

I would like to implement a Recent Games Played list when starting a module.

Does any functionality exists within VASSAL (as opposed to underlying java tools) to support this?

Has anybody tried this for other modules?

TIA.

Doug

1 Like

Hi

I have been looking at existing VASSAL classes and it appears that WizardSupport is the one that might the most useful. I would want to extend it and add a list of recent played games in the same way that lists of Predefined Setups are shown.

Am I on the right track here?

Do you mean some kind of list of “recently loaded”.VSAV and .VLOG files?

In which case you might look at the “loadGame” method in GameState.java, which would then lead you into FileChooser which is the thing that puts of the file-choosing dialog.

WizardSupport does handle some stuff in the startup sequence for players who have the “wizard” turned on.

Some of this depends on where you want your recent files list to appear during the process, etc. (IN the file chooser? or in a separate window INSTEAD of the file chooser? etc)

Yes, exactly this.

Thanks for this reply.

If I had my druthers, I would put it on the wizard page that shows the 3 options: (1) Open New Game, (2) Look for a Game Online, (3) Open Saved Game.

Below the Open Saved Game option I would have a fourth option (4) Choose recently saved/viewed file which would show a list (on this Wizard page) of the 5 most recently saved files. Double-clicking on the list or single click then clickng the Next button would open the file.

Doable?

Thanks

I previously wrote:

Blockquote
If I had my druthers, I would put it on the wizard page that shows the 3 options: (1) Open New Game, (2) Look for a Game Online, (3) Open Saved Game.

Blockquote
Below the Open Saved Game option I would have a fourth option (4) Choose recently saved/viewed file which would show a list (on this Wizard page) of the 5 most recently saved files. Double-clicking on the list or single click then clickng the Next button would open the file.

I no longer want to add the fourth option. Instead I want to display a list of 5 items on this wizard page, below the 3 existing options.

I assume that I would do this by adding a new class to VASL that would extend WizardSupport and would contain code to add the list box to this panel.

Would I do this by overriding a method in WizardSupport or would it be better to create a reference to the particular WizardSupport element being used (a panel I think) and then write a new method to add a listbox to the panel?

And, most importantly, which panel do I want to be adding stuff to? I have been rummaging around in WizardSupport and best I can tell, InitialWelcomeSteps looks like the place to be?

TIA.

Doug