I’m not sure if this is a Vassal bug or if it’s a module-specific bug. I’m using a tweaked version of the not-yet-released 4.0.0 version of the Space Empires 4X module, but I’m pretty sure the bug should be reproducible using the current release (3.0.8). The module has a “Game Options” button that pops up two small windows with some…game options (a series of numerical boxes and some text boxes). If a game had been saved with the Game Options window(s) nicely positioned near the top of the map, and the map itself scrolled to its top, if you later launch the module with that saved game and scroll the map down before asking for the Game Options, they’ll end up off the top of the monitor and irrecoverable. You have to be careful to open these windows before scrolling the map.
What’s the earliest version of Vassal where you can reproduce the problem?
Yup, happens with 3.0.8 also.
Open module
Start new game offline
Join as observer
Select board: mainboard
Finish
Click Game Options. Make sure the windows are nicely positioned at the top of the map.
Save Game as (vsav)
Quit
Open module
Load saved game
Select the vsav you created earlier
Next
Join as observer
Finish
Scroll three rows of hexes down (so the D row is at the top).
Invoke Game Options
The windows will have partially scrolled off the top.
I’ve never run across it before. I won’t downgrade my Vassal installation; I’ll let someone else do it on a testing workstation.
Following the instructions (assuming the Game Options button is the button with gears in it, and with the tool tip Game Options Menu)
I see
Then
I see
The Options Checklist windows have moved, but they are not gone or inaccessible.
Also, if I simply start a new game (do not load the save), then the result is the same. If I scroll more than three rows down, the result is also the same.
Looking a bit closer at the module, I see that the two Options Checklist are implemented as Property Sheet on the hidden Options Checklist counter placed in the upper left corner (pixel (0,0)). When those property sheets are to be display, then Vassal will try to place the window as close as possible to that counter.
If the hidden counter has been scrolled out of view, then the property sheet window could follow it, and thus be out of view too.
However, that depends on the desktop you are using. I’m using Gnome, and that probably doesn’t allow an application (Vassal) to place windows so that they are out of view - thus, they are put as far up as possible.
Perhaps you could state which desktop you are using? (Windows, MacOS, KDE, XFCE, …)
In a sense, using Property Sheet for this purpose - making a check list of optional rules as far as I can tell - is deprecated. A better approach would be to use Scenario Options. That has the benefit that the choices are made available to the module as Global Properties, and thus the module can use the information. Also, Scenario Options can be locked so that they cannot be changed at a later stage.
Yours,
Christian
Please remember to mark the solution to your problem. It helps others find the solution to their problem. Only you, as the OP, can do that.
Yours,
Christian
If someone wanted to fix this, the relevant code is in vassal-app/src/main/java/VASSAL/counters/PropertySheet.java starting at line 581:
// move window
Point p = GameModule.getGameModule().getPlayerWindow().getLocation();
if (map != null && view.isShowing()) {
p = view.getLocationOnScreen();
final Point p2 = map.mapToComponent(getPosition());
p.translate(p2.x, p2.y);
}
frame.setLocation(p.x, p.y);
What would need to be done is adjusting p so that each corner of the frame is within the bounds of the screen.
Noted. I’ll mark it solved when the module’s been modified and Vassal integrates the fix uckelman outlined.
I’ve opened an issue for this in the tracker.
The fix is probably to do in the last line
frame.setLocation(Math.max(p.x, 0), Math.max(p.y, 0));
so that window is never placed above the screen. Someone with a Windows development machine could try this out.
Yours,
Christian
The lower right corner should also be checked that it’s within screen bounds.
I’m not so sure that is really needed. As long as you get the desktop handles via a title bar or similar, a user can fairly easily resize the window. Also, I’m not sure if at the time of the code in vassal-app/src/main/java/VASSAL/counters/PropertySheet.java line 581 that you actually know the size of the property sheet window. Typically, the window size won’t be known until it is packed (line 597 in the same file).
In any case, the property sheet window is unlikely to as big as the entire screen. Therefore, I don’t think one really needs to check the lower right corner is within screen bounds.
Yours,
Christian
On the other hand, the code should make sure the window’s top left is not off to the right or the bottom of the screen.


