Page 2 of 2

Posted: 12 Feb 2007, 10:55
by tinnut
The version currently on Unknown-Files shows group 0 after group 9, just like on the keyboard :-)

Here is the link:
http://spring.unknown-files.net/file/2329/UnitGroups/

Posted: 14 Feb 2007, 04:27
by LordMatt
ChangeLog wrote:- Added "group <int> [ "set" | "add" | "selectadd" | "selectclear" | "selecttoggle" ]"
action as an alternative to the group[0|9] commands (note that the key modifiers can
be setup differently from the default)
Also there's a call in for sending keystrokes to the game somewhere in api.txt, if you wanted to do it that way.

Posted: 14 Feb 2007, 04:32
by trepan
You can't send keystrokes via LuaUI, but you can send console commands.
The first group buttons implementation used a different method to draw the
buttons in LuaUI:

http://trepan.homelinux.net/spring-diff ... lpanel.lua

http://trepan.bzflag.bz/spring/groupicons.jpg

Posted: 14 Feb 2007, 15:51
by LordMatt
Oo
-- CALL-INS
--
-- Call-ins are functions that the lua code can provide that will
-- be called from the Spring executable when appropriate. All of
-- the call-ins are optional.

KeyPress()
KeyRelease()
What are these for then?

Posted: 14 Feb 2007, 16:56
by Tobi
LordMatt wrote:Oo
that will be called from the Spring executable
What are these for then?
note the "from" :roll: :P

You'd need call-outs to send keypresses to Spring..

Posted: 14 Feb 2007, 22:07
by LordMatt
Hmm I thought it was the other way around for some reason. I blame trepan. :P

Posted: 14 Feb 2007, 23:20
by 1v0ry_k1ng
this owns

Posted: 15 Feb 2007, 10:51
by tinnut
New version is up on Unknown-Files:
http://spring.unknown-files.net/file/23 ... Groups_v5/
Features:
-The widget can be placed on the right side of the screen, or the bottom (right or bottom button)
-It can be made to shrink or collapse to only show groups that have units in them, thus using less screen space (shrink button)
-It can be made to show all groups, including empty ones (always button)
-It can also be slid along the edge that it sits on via a bar at the top/end of the list.
-Click on a groups icon and it selects that group
-Double click and it selects it and then centers on the group
-Right click and it makes the selected units that group, replacing any units that may have already been in that group (as suggested by LordMatt)
-Middle click and it adds the selected units to the group along with the original members of the group (as suggested by LordMatt)

Fixes:
-The colours now match those of the IceXuicks widgets by MelTraX
-The widget remembers its position along the bottom or the screen and the right when you've slid it along
-The model of the unit no longer tries to take up the entire icon
Thanks for the help trepan and LordMatt :-)

I ended up going with putting "@+C" and "@+C+S" in my SendCommands() calls, which is how trepan's script did it.

Cheers.

Posted: 15 Feb 2007, 14:55
by LordMatt
Niice I will test this later.

Edit: The widget works great! See yourPMs. ;)

Posted: 15 Feb 2007, 20:27
by trepan
tinnut
The "group" command is preferred to the '@@' format
(which was created before the "group" command). The
'@@' string prefix control mode will probably disappear
sometime in the future.

Posted: 17 Feb 2007, 02:37
by tinnut
Thanks trepan :-)
I'll have it changed for the next version I upload.

Posted: 22 Jul 2007, 00:14
by 1v0ry_k1ng
it keeps crashing in this version, can you maek work?

Posted: 26 Jul 2007, 17:03
by ginekolog
it does not work for me anymore in 075... too bad, its a good widget

wont work

Posted: 27 Jul 2007, 11:56
by Lefty
this widget uses headers not available in 0.75 (probably spring.h.lua and opengl.h.lua)

Code: Select all

Include() could not load 'LuaUI/Headers/spring.h.lua'

Posted: 03 Aug 2007, 00:14
by [KnoX]ElementalGizmo
PLEASE SOME1 FIX THIS PLEEEEEEEASE!

Posted: 03 Aug 2007, 00:25
by very_bad_soldier
[KnoX]ElementalGizmo wrote:PLEASE SOME1 FIX THIS PLEEEEEEEASE!
AFAIK you just need those header files and place them in the Headers directory. I think they are included in the 0.74b3 spring release. Otherwise you can find them in this package: http://spring.unknown-files.net/file/33 ... A_Pack_v5/

EDIT:
If I remember right the error message will disappear but the widget doesnt work anyway.

Posted: 03 Aug 2007, 00:25
by BrainDamage
try this...

you know, that the function search & replace is present in almost very text editor in the world?

Posted: 03 Aug 2007, 23:42
by tinnut
Hi guys, sorry for not replying earlier, but I've been on holidays :)

Thanks for fixing it Brain Damage. I'd made some (very minor) changes to the current version before the update to Spring so I'll merge the two scripts.

I have to admit however, that since writing this widget I've found that I don't use it all that much myself :P