Right-justify context menu commands (v3.6.8 ?)

The Flying Colors example is interesting because the module developer has entered spaces as padding to attempt to right-align the keyboard shortcuts (it is pretty close tbh). The C&C ancients example illustrates pretty well how messy it looks when the shortcuts are not right-aligned.

Using accelerator-keys

1 Like

Looking great, to me at least! Working on decks too, I notice.

Not working for Toolbar Button tool-tips, guessing this is some other area of the code. If it can be got working, then the extraneous square brackets could be dispensed with, which would be nice, I think.

image

If it’s not possible, then there is a workaround for the determined module developer; you can use HTML in the tooltip and if you do this and terminate with </html>, you need to specify the shortcut yourself. In which case, you can use any unicode symbols such as those that some else kindly collated here. Right-justification seems less important for a tooltip.

Incidentally, the Escape key is already given its symbolic representation ⎋ in a tooltip, so perhaps it’s not so tricky to extend this to other keys.

More info: Global Option components provide a Vassal-defined tooltip with shortcut, so the above module dev option isn’t available for those.

Also, there’s a question about the representation of some keys, like page down, for which PgDn (the current substitute) seems more useful than ⇟ which isn’t even the same symbol as on the actual key (on my Mac keyboard at least). Perhaps PgDn is not very international friendly though.

@felix-seattle - thought you might want to know about a issue i came across whilst playing with the build you did for this change:

In the accelerators keys in context menus build:
image

In Vassal 3.6.7:
image

The key commands shown are in a sub-menu trait and use long-form key commands, so not visible to the end user.

I had edited the commands, though not the key commands, in the test build.

Hi @marktb1961,

Thanks for the report!

Sorry for my ignorance, but I’m not sure what the “long-form key commands” are.

Is there an easy way for me to reproduce this? I wasn’t able to using the latest version (4.1.0) of your C&C Napoleonics module.

As shown below, the left hand column of the Key Command settings; as opposed to single keystrokes which go in the right hand column. The problem emerged when I edited the module to replace single keystrokes with the 1hit, 2hits etc key commands.

Changing back to keystrokes gives the expected menu content:

The “unknown keycode” display seems to relate to some internal encoding of the long form, when for the purposes of the menu display such key commands should be blank/ignored.

Here is a simple module to demonstrate the issue. To start, create a new game and follow the instruction in the chat log.

1 Like

I think the phrase you want is “Named Command” rather than “long form” (as opposed to a “Keystroke Command”, which would be the keystroke form).

2 Likes

As an “older” gamer with bad eyesight, who struggles with small font sizes, it would be really helpful if the context menus were a user preference.

That way, people like me could set the font size to something large so we can actually play Vassal modules, while the 20-somethings with 20/10 eyesight can opt for tiny fonts.

The user (not Vassal default and not the module developer) needs control of this…

1 Like

Thanks. That was helpful.

I updated the PR with a fix.

1 Like

I agree. Font-size should be a user setting.

Thanks for the fix - tried the build and it works for me.

Having looked at this a bit now, I favor that we don’t modify the font from the default—setting the font to DIALOG at 10pt doesn’t respect the user’s system settings.

As there are several other places in the code affected by this, I’m going to make a separate PR for the font change only.

Here’s that PR.

This is what I see on my Mac. Maybe the font is slightly larger / clearer than before…

Order Unit Ctrl+0

Current version of Vassal (with an earlier version of the module, for comparison):

I do like the larger size, since I use 4k monitors and text often gets too small for comfort. Obviously still needs the right justification for the key equivalents. Those look even more obtrusive to me at the larger size.

MM

1 Like

This is merged now. Builds from master will have correctly justified hotkey labels and the normal UI font on their context menus.

2 Likes

I am interested in the font size aspect of this discussion; not so much the right-justified part.

I am working on a new version of VASL, using VASSAL 3.6.9. I notice that context menus in the system now appear in a larger font than previously with the keystroke in a smaller, coloured font. This is great and I think our users will really like it.

Am I right in thinking that this was introduced in VASSAL3.6.8 (which I skipped) or VASSAL3.6.9? I don’t believe that I made any changes to VASL that would have resulted in this. I did not see anything in the VASSAL release notes about this but I could have missed it.

I notice in this thread a fair bit of discussion about allowing users to set the font size for the popup text. I agree whole-heartedly with this. However, I cannot find any way to do so in VASSAL3.6.9. Has this been implemented? If so, how? If not, will it be in future versions?

You are correct that the context menus were changed starting in v3.6.8. This version had unrelated performance issues and was quickly replaced with v3.6.9.

Re setting the popup text size, there is a field for this in Preferences/Settings, General tab: “Override default font size (0 = default; restart required)”.

Re setting the popup text size, there is a field for this in Preferences/Settings, General tab: “Override default font size (0 = default; restart required)”.

Thanks for this. Great stuff. I really like it and have posted info on VASL sites in FB, GS, and Discord.

It wasn’t entirely clear to me that “Override default font size” was what I was looking for nor that I needed to enter a non-zero value to change it. Maybe I was just having a brain fog day.