Re: [hatari-devel] Startup help message

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


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



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