-
Notifications
You must be signed in to change notification settings - Fork 40
feat: Add team invite button (to scoreboard) #145
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
base: master
Are you sure you want to change the base?
feat: Add team invite button (to scoreboard) #145
Conversation
Features: - Interactive invite buttons in scoreboard for each player - Auto-join functionality for TEAM_FLOCK players (join empty team + lock + invite) - Normal invite functionality for players already on teams - Mouse cursor support in scoreboard for button interaction - Visual feedback (checkmarks, cooldowns, disabled states) - State tracking and cooldown management - Automatic cleanup when players leave/join Files modified: - src/game/client/components/scoreboard.h: Added invite button methods and member variables - src/game/client/components/scoreboard.cpp: Added full invite button implementation
Made the following changes: - When in an active run, AND not frozen, hide the invite buttons (alternative can disable, doesnt matter), and restore regular mouse interaction when the scoreboard is open Bugs fixed: - No longer shows when we are in spectator / in super - Added server join cooldown to handle internal delay after join / map switch
SollyBunny
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty intrusive and I haven't yet touched scoreboard like storma has done since I don't know what upstream will be doing.
If anything is done I would liek it to be easily expandable (to add warlist/friend/mod abilities to it)
As for the feature itself I'm undecided, /mc;team -1;lock combats the delay for making a new team and locking and can be bound
| #include <game/client/ui.h> | ||
| #include <game/localization.h> | ||
|
|
||
| #include "SDL_mouse.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Components shouldn't interact with SDL directly
| { | ||
| Input()->MouseModeRelative(); | ||
| m_MouseModeWasAbsolute = false; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for keeping track of m_MouseModeWasAbsolute
39265a2 to
0796368
Compare
|
I agree, the implementation was quite poor here, and too intrusive. After more testing, I've switched to holding ALT to unlock the cursor (not just opening the scoreboard), and it can only be activated before passing the start line. I've also added another button to accept team invites. The last quirk is people joining / leaving as you go to invite, causing you to invite the wrong player. The scoreboard would likely need to be frozen while it's open (or free cursor is enabled). |
1e549e3 to
0c27c3e
Compare
d306b83 to
689e1d8
Compare



Features:
Files modified:
Automates the tedious process of joining team, locking it, and inviting players (especially those with special characters in name).
Checklist