Modify GameInformationPanel to optionally display as an invite
Currently when you receive an invite to join a game, you can only get information about the game host and game name. This PR modifies game invite requests to show as a GameInformationPanel instead of ChoiceNotificationBox so you get the nice map thumbnail and all the other information that is normally shown about a game.
It adds Accept/Decline buttons to the GameInformationPanel which are visible if [panel].IsInvite is set.
First timer here so apologies if I am going about this incorrectly.
I'm also a first timer but damn this looks nice. Maybe place the buttons farther from each other or all the way in the left and right corners?
Transmitting this on behalf of @Rampastring who doesn't have convenient access to GitHub at the moment:
Could be done better by creating a game invitation panel/window that has the game information panel as a child
Nightly build for this pull request:
- artifacts-Ares.zip
- artifacts-YR.zip
- artifacts-TS.zip This comment is automatic and is meant to allow guests to get latest automatic builds without registering. It is updated on every successful build.
Thanks for the feedback Saint, Meta, and Rampa. A game invitation panel makes much more sense. I have made the requested changes.
A bug has also been fixed where if you accept an invite to a game lobby that you are already a part of, it will no longer leave lobby and attempt to join again. Previously this would quite often fail.
There is a slight change to the layout from my last commit:
Hey, @11EJDE11! A pro tip about GitHub:
To quickly incorporate more than one suggested change into a single commit, you can also apply suggested changes as a batch. ...
from: Reviewing proposed changes in a pull request - GitHub Docs
Thanks for the review, Metadorius.
-
Regarding the INIs - not too sure if they can be customised through there. I'm not calling ReadINIForControl so I assume not? I don't believe it was doing anything with the INIs before though either.
-
Alpha stuff was a leftover. I've removed it now.
3.1) I have made a change so the panel will update when the game information updates.
3.2) The invite will disappear if the game has closed or the host is offline.
I've removed the border from the inner panel and have added the invitee's name back in (note: invites can only be from hosts and the host name is already on the inner panel).
Also I am new to Github and all this jazz - do I click Resolve Conversations on the ones above? I have switched to nameof as you suggested, and I am now using the button constants for size. There is no constant I could see for the padding amount so I have copied the amount from another area that had padding.
And thanks pzhlkj6612 - I could have sworn that was greyed out! Please keep the tips coming; I need them. Pretty sure I've done the last commit a bit weird. Not sure why there is a second one for changing the map to readonly. When I pushed it said I was behind so had to update to the latest branch. Did that and there was a conflict, chose the newer/local copy and then it put that one line into another commit. Pushed that and here we are.
New panel:
@11EJDE11 You're welcome!
Regarding the INIs - not too sure if they can be customised through there. I'm not calling ReadINIForControl so I assume not? I don't believe it was doing anything with the INIs before though either.
This should be done. Generally the point is to have all of the client customizable since there are many users (as in modders and game maintainers) who use it and they all have different customization needs. , For example, look at GameCreationWindow -- it is customizable via INI.
I am not sure if I am a fan of combining title that is all in caps and the username.
do I click Resolve Conversations on the ones above?
Yeah.
There is no constant I could see for the padding amount so I have copied the amount from another area that had padding.
I propose to introduce one. It is used in GameInformationPanel as well.
I could have sworn that was greyed out!
That's the GitHub unintuitivity for you. It is only available in the files tab.
Regarding the INIs ...
... who use it and they all have different customization needs. ...
Another example is, I'd like to hide the "GAME INFORMATION" line in the dialog. I can achieve it easily if you provide INI-ish way to customize it.
Any progress on this?
Will take another look.