CommandInsert widget

CommandInsert widget

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

Moderator: Moderators

Post Reply
dizekat
Posts: 438
Joined: 07 Dec 2007, 12:10

CommandInsert widget

Post by dizekat »

http://dmytry.pandromeda.com/tmp/lua_fo ... insert.lua
What it does: allows to nicely insert commands into queue when pressing spacebar and shift.
Example: try queuing mexes on comet catcher, then queue llt near every mex when pressing shift and spacebar. The llts will be inserted into queue between mexes.

Queue operations with widget:
  • Orders with shift are added at the end of queue. (spring's usual behavior)
  • Orders with spacebar are added at the beginning of queue. (same as with FrontInsert by jK)
  • Orders with both shift and spacebar are inserted at the place in queue so that extra walk is minimal. (new)
After testing we may go for including it into next spring release, what do you think about it?

Installation: save the lua file into your widgets folder.

edit:
Screenshots:
Queued mexes
Added LLTs to queue (pressing spacebar+shift)

edit: update. now spacebar+shift can append to end of queue when that makes sense.

edit: clearer explanations.
Last edited by dizekat on 04 Aug 2008, 12:32, edited 3 times in total.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: CommandInsert widget

Post by imbaczek »

/me likes
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: CommandInsert widget

Post by aegis »

<3
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: CommandInsert widget

Post by Forboding Angel »

lub u!
BaNa
Posts: 1562
Joined: 09 Sep 2007, 21:05

Re: CommandInsert widget

Post by BaNa »

:-) Good stuffs!
dizekat
Posts: 438
Joined: 07 Dec 2007, 12:10

Re: CommandInsert widget

Post by dizekat »

I have some improvement idea, allow user to separately pick a point for which the insert place (in queue) is chosen. I.e. allow to insert at arbitrary place, like make 2 mexes, then walk back make 2 llts, then make more mexes. (adding mexes first then llts)
Though I'm not sure what would be easiest / clearest way for user interface, i.e. what kind of key combination it should be.
Would it be possible to do that by pressing left button when placing order, then pressing right button (while holding left) to "drag" the order away while not changing its pos in queue?
(i dont have time right now to test that idea)

Also, when I have more time I'll maybe make it display lines for new order so you see where in queue your order is added.
User avatar
FrOzEnTaCo
Posts: 81
Joined: 02 Jul 2008, 05:52

Re: CommandInsert widget

Post by FrOzEnTaCo »

im used to this being a file, how do i put the internet thing inside my wiget folder? srry if u rly mad i dident read some guide or something :roll:
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: CommandInsert widget

Post by Beherith »

Taco, use Save Page As from your browser.
dizekat
Posts: 438
Joined: 07 Dec 2007, 12:10

Re: CommandInsert widget

Post by dizekat »

Just save page as, or rightclick link and save as, into your widgets folder (spring config folder/LuaUI/Widgets)
dizekat
Posts: 438
Joined: 07 Dec 2007, 12:10

Re: CommandInsert widget

Post by dizekat »

By the way, it has been added to BA so separately installing it is no longer needed.

What's up with the spacebar locking mouse cursor, though? This makes the widget hard to use.

edit: ahh, that's the easyfacing widget interfering, as it also uses spacebar/meta...
Post Reply

Return to “Lua Scripts”