Skip to content

Restore cursor position in Spawnmenu on Linux#2418

Open
acnbhop wants to merge 2 commits intoFacepunch:masterfrom
acnbhop:master
Open

Restore cursor position in Spawnmenu on Linux#2418
acnbhop wants to merge 2 commits intoFacepunch:masterfrom
acnbhop:master

Conversation

@acnbhop
Copy link

@acnbhop acnbhop commented Jan 10, 2026


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.

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.
@robotboy655 robotboy655 added the Fix The pull request fixes current functionality. label Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix The pull request fixes current functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants