private void ProcessBackKey() { if (MonoBehaviourSingleton <GameSceneManager> .IsValid() && MonoBehaviourSingleton <GameSceneManager> .I.IsBackKeyEventExecutionPossible()) { if (Object.op_Implicit(mainChat) && mainChat.IsOpeningWindow()) { mainChat.OnPressBackKey(); } else { GameSection currentSection = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSection(); if (currentSection != null && currentSection.collectUI != null) { if (currentSection.useOnPressBackKey) { currentSection.OnPressBackKey(); } else { string b = "[BACK]"; if (!string.IsNullOrEmpty(currentSection.overrideBackKeyEvent)) { b = currentSection.overrideBackKeyEvent; } UIGameSceneEventSender[] componentsInChildren = currentSection.collectUI.GetComponentsInChildren <UIGameSceneEventSender>(); int num = 0; int num2 = componentsInChildren.Length; while (true) { if (num >= num2) { return; } if (componentsInChildren[num].eventName == b) { break; } num++; } componentsInChildren[num]._SendEvent(); } } } } }