private void OnJoinedLobby(object sender, LobbyEventArgs e) { GameCodeBox.BeginInvoke(a => a.Text = e.LobbyCode); this.BeginInvoke(a => { if (context.Settings.AlwaysCopyGameCode) { Clipboard.SetText(e.LobbyCode); } }); MapBox.BeginInvoke(a => a.Text = e.Map.ToString()); }
private void GameStateChangedHandler(object sender, GameStateChangedEventArgs e) { setCurrentState(e.NewState.ToString()); while (DeadMessages.Count > 0) { AmongUsCapture.Settings.conInterface.WriteModuleTextColored("PlayerChange", Color.DarkKhaki, DeadMessages.Dequeue()); } AmongUsCapture.Settings.conInterface.WriteModuleTextColored("GameMemReader", Color.Lime, $"State changed to {Color.Cyan.ToTextColor()}{e.NewState}"); if (e.NewState == GameState.MENU) { setGameCode(""); MapBox.BeginInvoke(a => a.Text = ""); } //Program.conInterface.WriteModuleTextColored("GameMemReader", Color.Green, "State changed to " + e.NewState); }