Restore cursor position in Spawnmenu on Linux#2418
Open
acnbhop wants to merge 2 commits intoFacepunch:masterfrom
Open
Restore cursor position in Spawnmenu on Linux#2418acnbhop wants to merge 2 commits intoFacepunch:masterfrom
acnbhop wants to merge 2 commits intoFacepunch:masterfrom
Conversation
Save the cursor position when we re-open the spawnmenu once we closed it, for some reason (I am assuming it's relating to the game code), the cursor resets to the center every time you re-open the spawnmenu. This doesn't happen on Windows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a file to `/lua/autorun/client` for restoring the cursors position in the spawnmenu only on Linux.
Opening this since I think it would be useful. On Windows, the cursor's position is saved when you re-open the spawnmenu when you opened it before, but on Linux, this behavior doesn't apply.
I would have to guess it's something with the actual C++ code (yk, the code we can't touch...), and not the Lua code.
I tired multiple ways and it seems that this works the best from what I can figure out by myself, since VGUI seems to reset the cursor to the center, when, we don't want that, so I had to add a temp frame-override, I don't know of any other ways to do it lol. If you have something better please let me know.
I think I got formatting correct and line endings correct? lol.