Widgety Widget's
Moderator: Moderators
-
- Posts: 250
- Joined: 22 Jul 2006, 19:58
Widgety Widget's
Idle cons widget
Control idle con with icons at bottom of screen, see DL link for more info
DL: http://spring.unknown-files.net/file/22 ... Idle_Cons/
the code for displaying the icons was nicked from trepans selection icons widget
InsertCommands widget
Allows insertion of commands to the front of the command queue see link for more info
DL: http://spring.unknown-files.net/file/22 ... tCommands/
Drag'n'DropCommands widget (still testing)
Click and drag any command (using middle mouse button) in the command queue to reposition it
DL: http://everybodylovesraymond.unknown-fi ... gNdrop.lua
Control idle con with icons at bottom of screen, see DL link for more info
DL: http://spring.unknown-files.net/file/22 ... Idle_Cons/
the code for displaying the icons was nicked from trepans selection icons widget
InsertCommands widget
Allows insertion of commands to the front of the command queue see link for more info
DL: http://spring.unknown-files.net/file/22 ... tCommands/
Drag'n'DropCommands widget (still testing)
Click and drag any command (using middle mouse button) in the command queue to reposition it
DL: http://everybodylovesraymond.unknown-fi ... gNdrop.lua
Last edited by Tim-the-maniac on 27 Jan 2007, 21:49, edited 2 times in total.
-
- Posts: 250
- Joined: 22 Jul 2006, 19:58
-
- Posts: 250
- Joined: 22 Jul 2006, 19:58
Re: Widgety Widget's
You lose the ability to make boxes of units with this command, something like ctrl+alt would be better IMO. UseTim-the-maniac wrote: InsertCommands widget (still testing)
Allows insertion of commands to the front of the command queue using alt, similar to the way it works in factories
DL: http://everybodylovesraymond.unknown-fi ... ertcmd.lua
Code: Select all
if not (options.alt and options.ctrl) then
Tim-the-maniac wrote: Drag'n'DropCommands widget (still testing)
Click and drag any command in the command queue to reposition it
DL: http://everybodylovesraymond.unknown-fi ... gNdrop.lua
It would be nice if you could get building outline boxes drawn when you were moving buildings around so you could see the placement better. Also all on screen widgets disappear when you are moving commands.
I get the error:
Code: Select all
error = 1, Call_DrawScreenItems, LuaUI\Widgets\dragNdrop.lua:99: attempt to index field `?' (a nil value)
Additionally got this error:
Code: Select all
error = 1, Call_MouseRelease, LuaUI\Widgets\dragNdrop.lua:208: attempt to index global `coOrds' (a number value)
When moving guard commands between units it worked but gave this error:
Code: Select all
error = 1, Call_DrawScreenItems, Incorrect arguments to WorldToScreenCoords(x,y,z)
-
- Posts: 250
- Joined: 22 Jul 2006, 19:58
Thanks for the input Matt!
Yeah I was gonna fix that before making the other one, probly gonna use your solutionYou lose the ability to make boxes of units with this command, something like ctrl+alt would be better IMO
Maybe its possible to draw the actual building at the new location but I dont know.It would be nice if you could get building outline boxes drawn when you were moving buildings around so you could see the placement better.
This is when you move the command onto something it shouldnt be over, I just need to do some checks on the postion of the mouse on release.Additionally got this error:
error = 1, Call_MouseRelease, LuaUI\Widgets\dragNdrop.lua:208: attempt to index global `coOrds' (a number value)
This one is fixed I think.error = 1, Call_DrawScreenItems, LuaUI\Widgets\dragNdrop.lua:99: attempt to index field `?' (a nil value)
Dunno about this one, I'll take a look later.When moving guard commands between units it worked but gave this error:
error = 1, Call_DrawScreenItems, Incorrect arguments to WorldToScreenCoords(x,y,z)
MOAR BUGZ!
Currently your drag and drop widget makes dequeuing buildings impossible, so I have had to disable it for games. It throws the Error when you try to dequeue. Also I get a lot of this
Trepan didn't like ctrl+alt much either as it has some use already for mobile units.
To make meta only be the way to activate it, but as it turned out that didn't work very well either (but he had gone to sleep already). So at the moment I've kept it at ctrl+alt.
Currently your drag and drop widget makes dequeuing buildings impossible, so I have had to disable it for games. It throws the
Code: Select all
error = 1, Call_DrawScreenItems, LuaUI\Widgets\dragNdrop.lua:99: attempt to index field `?' (a nil value)
Code: Select all
BBREAKING
He helped me write another way of doing it// ALT+CTRL: Group Locked command (maintain relative positions)
Code: Select all
local a,c,m,s = Spring.GetModKeyState()
if ((not a) and (not c) and (not s) and m) then
-
- Posts: 250
- Joined: 22 Jul 2006, 19:58
Updated (thanks to mat for his help)
Middle mouse is now used to drag commands and meta key is used for inserting commands. To set the meta key put "fakemeta <keycode>" anywhere in uikeys.txt, I have "fakemeta 0x020" which sets it to spacebar.
Also I think I killed all the bugs (mat is trying his hardest to break it now).
Middle mouse is now used to drag commands and meta key is used for inserting commands. To set the meta key put "fakemeta <keycode>" anywhere in uikeys.txt, I have "fakemeta 0x020" which sets it to spacebar.
Also I think I killed all the bugs (mat is trying his hardest to break it now).
http://xta.wolfgame.org/unit_metal_maker.lua
I improved trepan's metal maker script, it now shuts off metal makers if your metal is >90% (and turns back on at <70%), to reduce metal leakage.
My first attempt at lua so dont beat me if it sucks
I improved trepan's metal maker script, it now shuts off metal makers if your metal is >90% (and turns back on at <70%), to reduce metal leakage.
My first attempt at lua so dont beat me if it sucks

-
- Posts: 250
- Joined: 22 Jul 2006, 19:58
Well I made them wait as it solves the nasty problem of a unit completing a command while you were dragging another, I couldn't think of another solution.ZellSF wrote:Drag'n'DropCommands would be great for modifying patrols, if it didn't break them.
And is the wait command while dragging really needed?
By breaking the patrols do you mean they dont work at all or that they just do wierd stuff?
No, I have the latest version, my LuaUI install works, and I'm dragging them just like I'm dragging any other order.LordMatt wrote:No. You must not have the latest version, have something wrong with your luaUI install, not be doing it right, etc...ZellSF wrote: Yes it does.
You must've accidentally set repeat on if you think it doesn't.
Tim-the-maniac: if I drag the current target (which is shown with an attack cursor) it keeps the patrol and adds an extra point, if I drag any of the other patrol points, the current target disappears after the unit has gotten to it,