Widget shortcuts

Discuss GUI programming with the RapaGUI plugin here
Post Reply
User avatar
mrupp
Posts: 147
Joined: Sun Jan 31, 2021 7:44 pm
Location: Switzerland
Contact:

Widget shortcuts

Post by mrupp »

I was playing around with widget shortcuts and noticed a few things. Here's my test script:

Code: Select all

@REQUIRE "RapaGUI", {Link = True}
@APPTITLE "Shortcuts-Test"

moai.CreateApp([[<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
	<window id="mainWindow" title="Shortcuts-Test" width="300">
		<vgroup spacing="8">
			<colgroup columns="2" spacing="8">
				<label>_Label</label>
				<textentry />
				<text>_Text</text>
				<textentry />
				<label>L_abel</label>
				<slider />
				<text>T_ext</text>
				<slider />
				<label>La_bel</label>
				<choice>
					<item>1 one</item>
					<item>2 two</item>
					<item>3 three</item>
				</choice>
				<text>Te_xt</text>
				<choice>
					<item>1 one</item>
					<item>2 two</item>
					<item>3 three</item>
				</choice>
				<rectangle />
				<button>B_utton</button>
			</colgroup>
		</vgroup>
	</window>
</application>
]])

Repeat
	 WaitEvent
Forever
And it looks like this:
Image

First of all, shortcuts don't seem to work when using <text> instead of <label> on MUI. I know, according to the docs, <text> widgets are not meant to feature shortcuts, but then, this DOES WORK on Windows but not on MUI. I'm actually not such a fan of <label> because they tend to block the sizeability of the GUI and are not properly resized when their text is changed by code. So I use <text> whenever possible.
So: could the shortcut feature be implemented with <text> widgets on MUI as well? Please consider this a feature request.

Second, shortcuts don't work with sliders, currently. The behaviour should be similar to the one of the <choice> widget: Pressing "a" should increase the slider by 1 (actually by its step size, but this is not supported by MUI), pressing "shift+a" should decrease it. This is something MUI features and can easily be tested out in the MUI preferences itself (f.e. in the "Buttons" section).
Would be great if this could be implemented in the next version of RapaGUI as well.

Cheers, Michael
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Widget shortcuts

Post by airsoftsoftwair »

Ok, will see what I can do.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Widget shortcuts

Post by airsoftsoftwair »

Code: Select all

- Change [Amiga]: For consistency with the other platforms, underline shortcuts are also supported for Text class on Amiga systems now
- Fix [Amiga]: Sliders couldn't be controlled via label shortcuts
Post Reply