Unbind crosshair from mousescrollbutton - Page 2

Unbind crosshair from mousescrollbutton

Please use this forum to set up matches and discuss played games.

Moderator: Moderators

User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Unbind crosshair from mousescrollbutton

Post by Licho »

No its not just you, its real bug. Even if you always return true from lua, sometimes it just switches crosshair.

Its extremely annoying. I dont even understand what is crosshair for, much less why its bound in such hardcoded way.
User avatar
ginekolog
Posts: 837
Joined: 27 Feb 2006, 13:49

Re: Unbind crosshair from mousescrollbutton

Post by ginekolog »

Who in the world has the power to fix this annoying old bug that impairs gameplay of my all the time favourite RTS (*A) ?

I pay 2Ôé¼ via paypal for solution to fix this problem :!: :!: :!:


Thanx.
kremmy
Posts: 26
Joined: 12 Jun 2010, 00:15

Re: Unbind crosshair from mousescrollbutton

Post by kremmy »

My frustration with unintentionally triggering the crosshair is that the thing is barely visible when you do that. I suggest making the crosshair more noticeable so a quicker recovery from unintentionally trigger it will be possible! Perhaps making it only kick in when the button is held rather than toggling when it's clicked, that should eliminate the whole issue of getting stuck in that mode unexpectedly.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Unbind crosshair from mousescrollbutton

Post by Pxtl »

Did anybody actually *like* this feature?
kremmy
Posts: 26
Joined: 12 Jun 2010, 00:15

Re: Unbind crosshair from mousescrollbutton

Post by kremmy »

Yes, I do. Though I find it most useful when spectating, it's a nice thing to have around.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Unbind crosshair from mousescrollbutton

Post by jK »

MiddleClick scrolling is THE default way of scrolling in any application.
If you got problems in Spring with it, then you got a problem in ANY application (texteditors, browsers, ...).
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Unbind crosshair from mousescrollbutton

Post by Pxtl »

jK wrote:MiddleClick scrolling is THE default way of scrolling in any application.
If you got problems in Spring with it, then you got a problem in ANY application (texteditors, browsers, ...).
I've always been more of a "hold middle mouse button" guy than a "click to toggle mousescroll" guy personally.
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: Unbind crosshair from mousescrollbutton

Post by SirMaverick »

@ kremmy
Atm you can only change the size. Either by changing "CrossSize" in your springsettings.cfg or in game with e.g. "/cross 10".
Pxtl wrote:Did anybody actually *like* this feature?
Yes.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Unbind crosshair from mousescrollbutton

Post by Pxtl »

Either way, at the very least it would be nice to see the more conventional icon for this:
scroll.PNG
scroll.PNG (1.35 KiB) Viewed 2947 times
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Unbind crosshair from mousescrollbutton

Post by Beherith »

Pxtl wrote:Did anybody actually *like* this feature?
I use press middle button for scroll most of the time. I also sometimes scroll around with zoom out - zoom in on target.

What do you use to scroll? Keys?
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Unbind crosshair from mousescrollbutton

Post by Licho »

We are talking about toggle which switches scrolling to toggle mode, not press and hold to scroll or toggle scroll itself!


Ctrl + middle mouse changes mode to toggle.
And you cannot turn this mis-feature off, nobody uses it and it makes newbies stuck, because switch it confuses lua widgets.

FFS how can anyone argue to keep this crazy thing.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Unbind crosshair from mousescrollbutton

Post by Pxtl »

Licho wrote:We are talking about toggle which switches scrolling to toggle mode, not press and hold to scroll or toggle scroll itself!


Ctrl + middle mouse changes mode to toggle.
And you cannot turn this mis-feature off, nobody uses it and it makes newbies stuck, because switch it confuses lua widgets.

FFS how can anyone argue to keep this crazy thing.
Not that I've activated the feature in a long time, but isn't it a naked middle-click to toggle the scroll-crosshairs (as well as the more popular hold-middlemouse)? Ctrl-middleclick was the "change camera modes" command before they were properly relocated to the function keys.

Either way, it would at least be less confusing with the icon I posted above - the same scroll icon all other apps use, so it would be obvious to the user "oh, this is the middle-click toggle-scroll mode".
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Unbind crosshair from mousescrollbutton

Post by Regret »

I have used nothing else but this to scroll since I started playing spring. It's essential for window mode play.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Unbind crosshair from mousescrollbutton

Post by CarRepairer »

Regret wrote:essential
Not needed if you use a camera widget like the one I made.
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: Unbind crosshair from mousescrollbutton

Post by SirMaverick »

Licho wrote:We are talking about toggle which switches scrolling to toggle mode, not press and hold to scroll or toggle scroll itself!

Ctrl + middle mouse changes mode to toggle.
And you cannot turn this mis-feature off, nobody uses it and it makes newbies stuck, because switch it confuses lua widgets.
What is this "toggle mode"? Never saw it. Only "press and hold to scroll or toggle scroll".
ctrl+middle mouse is same as middle mouse for me.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Unbind crosshair from mousescrollbutton

Post by BrainDamage »

I hate myself when mid click acts like a switch instead of a button, the guilty code is at mousehandler.cpp:313:void CMouseHandler::MouseRelease(int x, int y, int button)

Code: Select all

	// Switch camera mode on a middle click that wasn't a middle mouse drag scroll.
	// (the latter is determined by the time the mouse was held down:
	//  <= 0.3 s means a camera mode switch, > 0.3 s means a drag scroll)
	if (button == SDL_BUTTON_MIDDLE) {
		if (buttons[SDL_BUTTON_MIDDLE].time > (gu->gameTime - 0.3f))
			ToggleState();
		return;
	}

Code: Select all

void CMouseHandler::ToggleState()
{
	if (locked) {
		locked = false;
		ShowMouse();
	} else {
		locked = true;
		HideMouse();
	}
}
the code responsible for widgets fucking up on crosshair enable:

Code: Select all

	// limited receivers for MMB
	if (button == SDL_BUTTON_MIDDLE){
		if (!locked) {
			if (luaInputReceiver != NULL) {
				if (luaInputReceiver->MousePress(x, y, button)) {
					activeReceiver = luaInputReceiver;
					return;
				}
			}
			if ((minimap != NULL) && minimap->FullProxy()) {
				if (minimap->MousePress(x, y, button)) {
					activeReceiver = minimap;
					return;
				}
			}
		}
		return;
	}
the funny part is that the ta overhead camera ALREADY has button-like behaviour thanks to this code (it gets only executed only while mid mouse button is being held down):

Code: Select all

void COverheadController::MouseMove(float3 move)
{
	if (flipped) {
		move.x = -move.x;
		move.y = -move.y;
	}
	move *= 100 * middleClickScrollSpeed;
	float pixelsize = camera->GetTanHalfFov() * 2/globalRendering->viewSizeY * height * 2;
	pos.x += move.x * pixelsize * (1+keys[SDLK_LSHIFT]*3) * scrollSpeed;
	pos.z += move.y * pixelsize * (1+keys[SDLK_LSHIFT]*3) * scrollSpeed;
}
so there is BOTH switch behaviour when you mid click & not move the mouse and button behaviour when you click and drag, but it's only the switch behaviour which fucks up lua code

solution: remove the first block of code, and make a widget to reimplement back switch functionality for those who want it ( locking code should be kept in since it's reused for other stuff such as fps cam )

also, for the record, 99% of the apps uses button-like behaviour for mid click scrolling, not switch
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Unbind crosshair from mousescrollbutton

Post by lurker »

I really don't follow these app-based claims, click does nothing for me in anything that isn't a browser, and drag works in even less.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Unbind crosshair from mousescrollbutton

Post by jK »

lurker wrote:I really don't follow these app-based claims, click does nothing for me in anything that isn't a browser, and drag works in even less.
Notepad, Wordpad, TASClient, SpringLobby, IE, Opera, FireFox, ...
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Unbind crosshair from mousescrollbutton

Post by Tobi »

Regret wrote:I have used nothing else but this to scroll since I started playing spring. It's essential for window mode play.
+1

Just tested in master and indeed only way I usually scroll is gone.

Also middleclick drag scroll seems reversed and arbitrary now, but that's probably off-topic.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Unbind crosshair from mousescrollbutton

Post by lurker »

Notepad, wordpad, nope, and I don't have any mouse drivers you were blaming in irc. I already said it worked in web browsers (but differently in each, clearly not a system feature). Springlobby also has its own scrollydoo.

Can you give me a screenshot of what your scroll cursor looks like?
Post Reply

Return to “Ingame Community”