Activate the control and connect dialog's W_Deactivated after its creation

As the control is activated before, the connection should be done after the activation because ActivateControl() sends W_Activated to the UIFloatingWindow, which will cause ActivateControl() to be called again to activate the dialog's title bar button (and would deactivate the gamespy dialog)
This commit is contained in:
smallmodel 2025-02-06 22:50:21 +01:00
parent 3c836144e2
commit 9922a7095b
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -79,8 +79,6 @@ void GameSpyDialog::FrameInitialized(void) {
overlay->AllowActivate(true);
overlay->Connect(this, W_Button_Pressed, W_Deactivated);
Connect(this, W_Deactivated, W_Deactivated);
}
void GameSpyDialog::Create(UIWidget* parent, const UIRect2D& rect, const char* title, const UColor& bgColor, const UColor& fgColor)
@ -107,4 +105,8 @@ void UI_LaunchGameSpy_f(void) {
UColor(0.15f, 0.195f, 0.278f),
UHudColor
);
uWinMan.ActivateControl(dialog);
dialog->Connect(dialog, W_Deactivated, W_Deactivated);
}