Re: [hatari-devel] Startup help message

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 7/6/19 10:24 AM, Thomas Huth wrote:
Am Sat, 6 Jul 2019 01:07:55 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
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.

Thanks, fixed.


+		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" ?

It's bit longish, but I guess it still fits statusbar in all video
modes...

I changed that and pushed the change.


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/