How to get rid of the shift-speedup of zoom?

How to get rid of the shift-speedup of zoom?

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
Sprang
Posts: 37
Joined: 10 Oct 2008, 15:05

How to get rid of the shift-speedup of zoom?

Post by Sprang »

Hello!

I have a problem with the speed increase that shift causes in the camera movement (default TA camera). I have unbound "movefast" from shift, and I no longer get the speedup in normal scrolling, but I still get it while holding shift and zooming with mousewheel. Especially when zooming in, shift adds a ginormous modifier to the zoom speed, which causes the slightest nudge of the scrollwheel to plunge my camera straight to dirt.

Anyone know of a way to remove this speedup? All help greatly appreciated.
User avatar
Silentwings
Moderator
Posts: 3686
Joined: 25 Oct 2008, 00:23

Re: How to get rid of the shift-speedup of zoom?

Post by Silentwings »

Did you try binding shift to something else in uikeys? Might have a tonne of unwanted extra effects though.
User avatar
Beherith
Moderator
Posts: 5010
Joined: 26 Oct 2007, 16:21

Re: How to get rid of the shift-speedup of zoom?

Post by Beherith »

All thanks to zwzsg

Add it as scroll_lock.lua to /luaui/widgets

Code: Select all

function widget:GetInfo()
	return {
		name = "No Alt Mouse Wheel",
		desc = "Eats all your mousewheeling when alt or shift is down",
		author = "zwzsg",
		date = "16 may 2010",
		license = "Free",
		version = 1,
		layer = 2000, -- so that any widget with a lower number has a chance to catch mousewheel first
		enabled = true
	}
end

function widget:MouseWheel(up,value)
	local alt,ctrl,meta,shift=Spring.GetModKeyState()
	if alt or shift then
		return true
	else
		return false
	end
end
Sprang
Posts: 37
Joined: 10 Oct 2008, 15:05

Re: How to get rid of the shift-speedup of zoom?

Post by Sprang »

This looks like an adequate fix. Thanks zwzsg! Thanks Beherith!
Post Reply

Return to “Help & Bugs”