Page 1 of 1

Widget shortcuts

Posted: Sun Aug 08, 2021 12:38 am
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

Re: Widget shortcuts

Posted: Fri Aug 13, 2021 9:38 pm
by airsoftsoftwair
Ok, will see what I can do.

Re: Widget shortcuts

Posted: Fri Oct 22, 2021 9:34 pm
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