I’m working with a module that has several [Map Window] that are opened and closed as part of the normal use of the mod. Tracking player inventory, decks of cards that sort of thing.
When the module is first loaded and I open these [Map Windows] the default size is larger than the defined play area and different for each of the windows. I can resize the window and as long as I don’t restart the mod the new re-sized window sizes are remembered. But if I restart the mod those window sizes are lost and it’s back to the default size for each one.
Also, when first started each of the [Map Windows] has it’s own default size. They aren’t all the same.
My question is how do I set the initial or default window size for [Map Windows]?
Thanx,
Kizan
P.S. I’ve looked through the forums and the documentation the best I could but couldn’t find anything.
EDIT: Screen shot now included! The issue is that I’ve specified the red area as the board size, but the window opens up much larger. Note the gray area.
You can create a ‘default’ window size by putting a blank image as the map
board set to the size you want for the window. So if you want a window set
to say 500x400 pixels, make a blank png image that size and fill it with
whatever color you’d like the background to be. Use that image as the map
board and the window will open to fit the size of the image by default. You
can also add zoom tools and have it open in zoomed out/in to fix the size as
well.
Cparrott I tried your suggestion. I made a 750x750 white PNG and put it in as the board image. I don’t think I’m being clear enough in the problem. So I’m posting a pic.
The issue I’m having is that I only need the white area, but when the app first opens the window it far larger than that (note the gray area). I can resize but I have to do it every time for each of five or so windows.
I would also note that specifying the board image or not didn’t change the default size of the window. I’ve had the problem on more than one machine so I don’t think it’s the machine.
Hmm, works for me. Here’s a quick and dirty module, mapsize.mod, I threw together that does what you want. Hopefully this will help you. It does leave a slight border along the right edge and bottom, but nothing like what you are seeing.
I tried this with both combined application window and without and it worked the same either way. Just in case that had any effect on it.
The only other thing I can think of is if you tried to set a background color and size in the map board properties prior to adding an image. I’ve seen map windows behave oddly when you try and change it later. Also make sure the default board setup is using the image.
Got the mod. Yours works and looks just like you described. I’ll have to poke at it at bit and see if i can rebuild my map windows to try and fix the problem.
What happens to you when you put in a map board that has no image, just you specifying how big it should be?
Kizan
EDIT: My test indicates that it works just fine! The window opens just lik it should 750x750 (that’s the size I specified for the no image board). Must just be my file. Grrr…
So, with a little playing I figured out that renaming the [map window] object fixes the problem. This means that VASSAL is saving default window size settings somewhere in the mod.
Those settings are NOT in the [map window] object either. I deleted original [map window] object and created a new one with the same name “Event Deck”. When I loaded the mod and opened the window it looked exactly like the pics I posted above.
I’ve been having a similar problem.
When I create simple images and set them as the default board for a map window other than the main one, they open with a white margin.
So I downloaded this module, and I still get the same thing even with this module.
Is there a setting somewhere that I’m missing? Or this just the white margin that was mentioned earlier? Any way to get rid of this? If I resize the window to get rid of the white margin, close it, and reopen it, the window opens back to the resized area and doesn’t produce the white margin again. However, if I close the module and reopen it, the white margin is present.
if I was using your mod and opened one of those smaller windows and it didn’t have that small white margin on it, I’d instinctively try and enlarge the window to see if anything had been cut-off.
That’s a tough habit to break. Perhaps such a small margin is an intentional feature?
That’s an interesting thought. Still, the window creates automatically creates scroll bars when the window is too small to show the entire board, and it takes them away when the window is larger than the board. I wish the map window would open up to the size of the board so that it didn’t show the white margin but also didn’t have to show scroll bars.
Don’t get me wrong–I can live with this. But it still seems arbitrary, since somewhere the engine is opening the window up with a certain amount of margin to the right and bottom no matter the shape of the board.
Interestingly, with a slightly larger board, only the bottom margin is present. I suppose beyond a certain dimension, the white margin is not drawn.
But also of note is that the vertical dimension of the larger map window here is larger than the horizontal dimension, yet it is still the vertical dimension that has a white margin at the bottom, but the smaller horizontal dimension does not have a white margin at the right edge anymore. Odd behavior. Anyone have any ideas?
For expand map window me set for [Map Window] “Can contain multiply boards”.
Add [Board] for map contain image
Add more [Board] for example to expand left or right without image and set any width and height = height board with map. To expand above or below set width = width of map
After that go to properties of [Map Board] - [Set Default Board Setup] and add columns and rows with your map and board for expand as you want