Widget:capture and escape key fix, atlastaxi

Widget:capture and escape key fix, atlastaxi

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Widget:capture and escape key fix, atlastaxi

Post by Jools »

This simple widget does the following:

* If and only if 1 unit that can capture is selected, then pressing "C" = capture. Otherwise do nothing.

*Pressing Escape key clears current selection and disables the "press Shift+escape to access the quit menu" nag.

It may be of use to someone.
Attachments
tp_keyfix.lua
Fix for C and Esc keys
(959 Bytes) Downloaded 127 times
Last edited by Jools on 25 Nov 2011, 20:51, edited 1 time in total.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Widget:capture and escape key fix

Post by Jools »

The widget does the following:

Press ESC to deselect and close all windows

Press C when commander is selected to capture (I have bound C to select commander in uikeys.txt)

Press L to order a transport to pick up selected unit, unless it's a transport itself.

You can enable/disable any of these inside the widget.
Attachments
order1.zip
Unzip to Luaui/sounds
(4.25 KiB) Downloaded 25 times
gui_keyfix.lua
(3.04 KiB) Downloaded 112 times
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Widget:capture and escape key fix

Post by smoth »

as a question because I don't know...
do the key ids change for different keyboards. I know some countries have very very different keys.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Widget:capture and escape key fix

Post by Jools »

I would assume they don't. Isn't that the reason you actually have a code in the first place?
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Widget:capture and escape key fix

Post by Jools »

Fixed to be compatible with spring 84.0
Attachments
gui_keyfix.lua
(3.81 KiB) Downloaded 124 times
Post Reply

Return to “Lua Scripts”