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
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