Skip to content

Commit

Permalink
Add grabinput back in
Browse files Browse the repository at this point in the history
Disable cover gadget in lieu of new engine version
  • Loading branch information
ForbodingAngel committed Sep 18, 2018
1 parent cbd1d94 commit 7620083
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion LuaRules/Gadgets/unit_takeCover.lua
Expand Up @@ -10,7 +10,7 @@ function gadget:GetInfo()
date = "2016",
license = "CC0",
layer = -3,
enabled = true-- loaded by default?
enabled = false -- loaded by default?
}
end

Expand Down
22 changes: 22 additions & 0 deletions LuaUI/Widgets_Evo/grabinput_local.lua
@@ -0,0 +1,22 @@
function widget:GetInfo()
return {
name = "Grabinput Local",
desc = "Enables GrabInput in Windowed mode",
author = "abma",
date = "2012-08-11",
license = "GPL v2 or later",
layer = 5,
enabled = false
}
end

function widget:Initialize()
Spring.SendCommands("grabinput 1")
end

function widget:GameFrame(n)
-- send grabinput every 30 seconds
if n%960 == 1 then
Spring.SendCommands("grabinput 1")
end
end

0 comments on commit 7620083

Please sign in to comment.