public void WillConnect(UIScene scene, UISceneSession session, UISceneConnectionOptions connectionOptions)
 {
     // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
     // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
     // This delegate does not imply the connecting scene or session are new (see UIApplicationDelegate `GetConfiguration` instead).
 }
Example #2
0
 public void DidBecomeActive(UIScene scene)
 {
     // Called when the scene has moved from an inactive state to an active state.
     // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
 }
Example #3
0
 public void WillResignActive(UIScene scene)
 {
     // Called when the scene will move from an active state to an inactive state.
     // This may occur due to temporary interruptions (ex. an incoming phone call).
 }
Example #4
0
 public void DidEnterBackground(UIScene scene)
 {
     // Called as the scene transitions from the foreground to the background.
     // Use this method to save data, release shared resources, and store enough scene-specific state information
     // to restore the scene back to its current state.
 }
Example #5
0
 public virtual void DidDisconnect(UIScene scene)
 {
     MauiUIApplicationDelegate.Current?.Services?.InvokeLifecycleEvents <iOSLifecycle.SceneDidDisconnect>(del => del(scene));
 }
Example #6
0
        public static void CreatePlatformWindow(this IUIWindowSceneDelegate sceneDelegate, IApplication application, UIScene scene, UISceneSession session, UISceneConnectionOptions connectionOptions)
        {
            // Find any userinfo/dictionaries we might pass into the activation state
            var dicts = new List <NSDictionary>();

            if (scene.UserActivity?.UserInfo is not null)
            {
                dicts.Add(scene.UserActivity.UserInfo);
            }
            if (session.UserInfo is not null)
            {
                dicts.Add(session.UserInfo);
            }
            if (session.StateRestorationActivity?.UserInfo is not null)
            {
                dicts.Add(session.StateRestorationActivity.UserInfo);
            }
            if (connectionOptions.UserActivities is not null)
            {
                foreach (var u in connectionOptions.UserActivities)
                {
                    if (u is NSUserActivity userActivity && userActivity.UserInfo is not null)
                    {
                        dicts.Add(userActivity.UserInfo);
                    }
                }
            }

            var window = CreatePlatformWindow(application, scene as UIWindowScene, dicts.ToArray());

            if (window is not null)
            {
                sceneDelegate.SetWindow(window);
                sceneDelegate.GetWindow()?.MakeKeyAndVisible();
            }
        }
Example #7
0
 public void WillEnterForeground(UIScene scene)
 {
     // Called as the scene transitions from the background to the foreground.
     // Use this method to undo the changes made on entering the background.
 }
Example #8
0
 private static void TryShowLoadScene(UIScene scene)
 {
     FF9Sfx.FF9SFX_Play(103);
     scene?.Hide(OnLoadGameButtonClick);
 }
Example #9
0
    private Boolean handleMenuControlKeyPressCustomInput(GameObject activeButton = null)
    {
        UIScene sceneFromState = PersistenSingleton <UIManager> .Instance.GetSceneFromState(PersistenSingleton <UIManager> .Instance.State);

        if (ButtonGroupState.ActiveButton && ButtonGroupState.ActiveButton != PersistenSingleton <UIManager> .Instance.gameObject)
        {
            activeButton = ButtonGroupState.ActiveButton;
        }
        else if (activeButton == null)
        {
            activeButton = UICamera.selectedObject;
        }
        if (sceneFromState != null && (!PersistenSingleton <UIManager> .Instance.Dialogs.Activate || PersistenSingleton <UIManager> .Instance.IsPause))
        {
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(1) || keyCommand == Control.Cancel)
            {
                keyCommand = Control.None;
                sceneFromState.OnKeyCancel(activeButton);
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(0) || keyCommand == Control.Confirm)
            {
                keyCommand = Control.None;
                sceneFromState.OnKeyConfirm(activeButton);
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(8) || keyCommand == Control.Pause)
            {
                keyCommand = Control.None;
                if (PersistenSingleton <UIManager> .Instance.IsPauseControlEnable)
                {
                    sceneFromState.OnKeyPause(activeButton);
                }
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(9) || keyCommand == Control.Select)
            {
                keyCommand = Control.None;
                sceneFromState.OnKeySelect(UICamera.selectedObject);
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(2) || keyCommand == Control.Menu)
            {
                keyCommand = Control.None;
                if (FF9StateSystem.AndroidTVPlatform && FF9StateSystem.EnableAndroidTVJoystickMode && (PersistenSingleton <HonoInputManager> .Instance.GetSource(Control.Menu) == SourceControl.Joystick && PersistenSingleton <UIManager> .Instance.State == UIManager.UIState.Pause))
                {
                    sceneFromState.OnKeyMenu(activeButton);
                }
                else if (PersistenSingleton <UIManager> .Instance.IsMenuControlEnable)
                {
                    sceneFromState.OnKeyMenu(activeButton);
                }
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(3) || keyCommand == Control.Special)
            {
                keyCommand = Control.None;
                sceneFromState.OnKeySpecial(activeButton);
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(4) || keyCommand == Control.LeftBumper)
            {
                keyCommand = Control.None;
                sceneFromState.OnKeyLeftBumper(activeButton);
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(5) || keyCommand == Control.RightBumper)
            {
                keyCommand = Control.None;
                sceneFromState.OnKeyRightBumper(activeButton);
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(6) || keyCommand == Control.LeftTrigger)
            {
                BattleHUD.ForceNextTurn = true;
                keyCommand = Control.None;
                sceneFromState.OnKeyLeftTrigger(activeButton);
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(7) || keyCommand == Control.RightTrigger)
            {
                keyCommand = Control.None;
                sceneFromState.OnKeyRightTrigger(activeButton);
                return(true);
            }
        }

        //if (AltKeyDown)
        //{
        //    if (F2Key)
        //    {
        //        OnPartySceneCommandDetected(sceneFromState);
        //        return true;
        //    }
        //    if (F4Key)
        //    {
        //        OnQuitCommandDetected(sceneFromState);
        //        return true;
        //    }
        //    if (F5Key)
        //    {
        //        OnSaveLoadSceneCommandDetected(sceneFromState, SaveLoadUI.SerializeType.Save);
        //        return true;
        //    }
        //    if (F9Key)
        //    {
        //        OnSaveLoadSceneCommandDetected(sceneFromState, SaveLoadUI.SerializeType.Load);
        //        return true;
        //    }
        //}

        if (AltKey)
        {
            if (F2KeyDown)
            {
                OnPartySceneCommandDetected(sceneFromState);
                return(true);
            }
            if (F4KeyDown)
            {
                OnQuitCommandDetected(sceneFromState);
                return(true);
            }
            if (F5KeyDown)
            {
                OnSaveLoadSceneCommandDetected(sceneFromState, SaveLoadUI.SerializeType.Save);
                return(true);
            }
            if (F9KeyDown)
            {
                OnSaveLoadSceneCommandDetected(sceneFromState, SaveLoadUI.SerializeType.Load);
                return(true);
            }
        }

        return(false);
    }
Example #10
0
 public void DidEnterBackground(UIScene scene)
 {
 }
Example #11
0
    private Boolean handleMenuControlKeyPressCustomInput(GameObject activeButton = null)
    {
        IsShiftKeyPressed = ShiftKey;

        UIScene sceneFromState = PersistenSingleton <UIManager> .Instance.GetSceneFromState(PersistenSingleton <UIManager> .Instance.State);

        if (ButtonGroupState.ActiveButton && ButtonGroupState.ActiveButton != PersistenSingleton <UIManager> .Instance.gameObject)
        {
            activeButton = ButtonGroupState.ActiveButton;
        }
        else if (activeButton == null)
        {
            activeButton = UICamera.selectedObject;
        }
        if (sceneFromState != null && (!PersistenSingleton <UIManager> .Instance.Dialogs.Activate || PersistenSingleton <UIManager> .Instance.IsPause))
        {
            if (sceneFromState.GetType() == typeof(ConfigUI) && FF9StateSystem.AndroidTVPlatform && PersistenSingleton <HonoInputManager> .Instance.IsInputDown(8))
            {
                if (PersistenSingleton <UIManager> .Instance.IsPauseControlEnable)
                {
                    sceneFromState.OnKeyPause(activeButton);
                }
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(1) || keyCommand == Control.Cancel)
            {
                keyCommand = Control.None;
                sceneFromState.OnKeyCancel(activeButton);
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(0) || keyCommand == Control.Confirm)
            {
                keyCommand = Control.None;
                sceneFromState.OnKeyConfirm(activeButton);
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(8) || keyCommand == Control.Pause)
            {
                keyCommand = Control.None;
                if (PersistenSingleton <UIManager> .Instance.IsPauseControlEnable)
                {
                    sceneFromState.OnKeyPause(activeButton);
                }
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(9) || keyCommand == Control.Select)
            {
                keyCommand = Control.None;
                sceneFromState.OnKeySelect(UICamera.selectedObject);
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(2) || keyCommand == Control.Menu)
            {
                keyCommand = Control.None;
                if (FF9StateSystem.AndroidTVPlatform && FF9StateSystem.EnableAndroidTVJoystickMode && (PersistenSingleton <HonoInputManager> .Instance.GetSource(Control.Menu) == SourceControl.Joystick && PersistenSingleton <UIManager> .Instance.State == UIManager.UIState.Pause))
                {
                    sceneFromState.OnKeyMenu(activeButton);
                }
                else if (PersistenSingleton <UIManager> .Instance.IsMenuControlEnable)
                {
                    sceneFromState.OnKeyMenu(activeButton);
                }
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(3) || keyCommand == Control.Special)
            {
                keyCommand = Control.None;
                sceneFromState.OnKeySpecial(activeButton);
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(4) || keyCommand == Control.LeftBumper)
            {
                keyCommand = Control.None;
                sceneFromState.OnKeyLeftBumper(activeButton);
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(5) || keyCommand == Control.RightBumper)
            {
                keyCommand = Control.None;
                sceneFromState.OnKeyRightBumper(activeButton);
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(6) || keyCommand == Control.LeftTrigger)
            {
                BattleHUD.ForceNextTurn = true;
                keyCommand = Control.None;
                sceneFromState.OnKeyLeftTrigger(activeButton);
                return(true);
            }
            if (PersistenSingleton <HonoInputManager> .Instance.IsInputDown(7) || keyCommand == Control.RightTrigger)
            {
                keyCommand = Control.None;
                sceneFromState.OnKeyRightTrigger(activeButton);
                return(true);
            }
        }

        if (AltKey)
        {
            if (F2KeyDown)
            {
                OnPartySceneCommandDetected(sceneFromState);
                return(true);
            }
            if (F4KeyDown)
            {
                OnQuitCommandDetected(sceneFromState);
                return(true);
            }
            if (F5KeyDown)
            {
                OnSaveLoadSceneCommandDetected(sceneFromState, SaveLoadUI.SerializeType.Save);
                return(true);
            }
            if (F9KeyDown)
            {
                OnSaveLoadSceneCommandDetected(sceneFromState, SaveLoadUI.SerializeType.Load);
                return(true);
            }
            if (SpaceKeyDown)
            {
                Configuration.Graphics.WidescreenSupport = !Configuration.Graphics.WidescreenSupport;
                return(true);
            }

            if (IsShiftKeyPressed && ControlKey)
            {
                if (SKeyDown)
                {
                    OnSoundDebugRoomCommandDetected();
                    return(true);
                }

                if (F12KeyDown)
                {
                    GameObjectService.Start();
                    return(true);
                }
            }
        }

        if (IsShiftKeyPressed && F4KeyDown)
        {
            SettingsState.IsRapidEncounter = !SettingsState.IsRapidEncounter;
            return(true);
        }

        return(false);
    }
Example #12
0
 public void WillEnterForeground(UIScene scene)
 {
 }
Example #13
0
 public void WillResignActive(UIScene scene)
 {
 }
Example #14
0
 public void DidBecomeActive(UIScene scene)
 {
 }
Example #15
0
 public void DidDisconnect(UIScene scene)
 {
 }
Example #16
0
 public void WillConnect(UIScene scene, UISceneSession session, UISceneConnectionOptions connectionOptions)
 {
 }