Re: [hatari-devel] Startup help message |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Startup help message
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Sat, 6 Jul 2019 09:24:06 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1562397849; bh=L/mA9iEceI1b3fG9L+ocqPpeZ3QrnqLT2naP7jW1x0U=; h=Date:From:To:Subject:From; b=DiqAWv9UQvGRS6KU2jQKJ1xccI9+MnbjGwt4FH5QA/xWii108i3OdfMsozVMbxsq8 k26lD6+zsax1jurHGgyLH3ELrMu5RiO4CUqMPcHAZxQ+rIl9r+RofSFBmEd6VwLXTJ L+W51115ppjh1zB7kSib5O2E4uUq/FwO8ZZcCxWHeoBdd3XNB267uP2QHEMWPv1qwl Yhw70llu6eRBLwgGUFkSKK9qr38c6G/8zw+49f1VVoiy9AJc9nVwLJB1dl0UQfihbt 5W0f6GhQmQ/uOu0dpKU9iKknsTkNigbgQ4NyfJyg39hnt9FFB5DkOvcm+FgK8BErrm EiAcNymabepNw==
Am Sat, 6 Jul 2019 01:07:55 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
> Hi,
>
> Roger asked for some reminder in Hatari UI for mouse grab shortcut.
>
> In Aranym such information is available always in the titlebar.
>
> In Hatari, only help text is a message in statusbar (if that is
> enabled) about options key, which is visible for few seconds at
> Hatari start.
>
> What do you think of the attached patch that adds info about mouse
> grab shortcut to the same statusbar message?
Good idea.
> At the same time it fixes the issue that the message didn't tell
> whether modifier key was needed (in case user changed F11 fullscreen
> key to something else).
Even better!
+ for (i = 0; i < ARRAY_SIZE(keys); i++)
{
- char message[24], *keyname;
+ key = ConfigureParams.Shortcut.withoutModifier[keys[i].id];
+ if (!key)
+ {
+ keys[i].mod = true;
+ key = ConfigureParams.Shortcut.withModifier[keys[i].id];
+ if (!key)
+ continue;
+ }
I think you need to reset keys[i].mod to false in case the "continue"
branch is taken.
+ snprintf(message, sizeof(message), "%s%s: options, %s%s: mouse grab toggle",
+ keys[0].mod ? "AltGr+": "", keys[0].name,
+ keys[1].mod ? "AltGr+": "", keys[1].name);
I think we should keep a verb in here. Can you change so that the text
still says "Press xxx for options, yyy for mouse grab toggle" ?
Thomas