Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make cursor always start in the center of the screen in the tab menu #253

Closed
wants to merge 5 commits into from

Conversation

dch-GH
Copy link
Contributor

@dch-GH dch-GH commented Nov 29, 2022

Closes: #251

You might suggest that I instead do this, which I tried and would have preferred:

		if ( input.Pressed( InputButton.Score ) )
		{
			Input.MouseDelta = Vector2.Zero;
			Mouse.Position = Screen.Size / 2;
		}

For some reason, it just doesn't work. On Released does, but not Pressed. It might work if you instead queue the reset for the next frame but this is less complicated, imo.

waiting on: Facepunch/sbox-issues#2706

@dch-GH dch-GH changed the title Make cursor always starts in the center of the screen in the tab menu Make cursor always start in the center of the screen in the tab menu Nov 29, 2022
@dch-GH dch-GH closed this Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tab menu remembers last mouse position
2 participants