Esempio n. 1
0
    //更新中
    void Update()
    {
        if (!isInit)
        {
            return;
        }

        if (Engine.IsLoading)
        {
            SystemUi.GetInstance().StartIndicator(this);
        }
        else
        {
            SystemUi.GetInstance().StopIndicator(this);
        }


        if (engine.IsEndScenario)
        {
            Close();
            if (Engine.IsSceneGallery)
            {
                //回想シーン終了したのでギャラリーに
                sceneGallery.Open();
            }
            else
            {
                //シナリオ終了したのでタイトルへ
                title.Open(this);
            }
        }
    }
Esempio n. 2
0
    void CustomCallbackFileLoadError(AssetFile file)
    {
        string errorMsg = "インターネットに接続した状況でプレイしてください";

        if (SystemUi.GetInstance() != null)
        {
            if (isWaitingRetry)
            {
                StartCoroutine(CoWaitRetry(file));
            }
            else
            {
                isWaitingRetry = true;
                //リロードを促すダイアログを表示
                SystemUi.GetInstance().OpenDialog1Button(
                    errorMsg, LanguageSystemText.LocalizeText(SystemText.Retry),
                    () =>
                {
                    isWaitingRetry = false;
                    OnRetry(file);
                });
            }
        }
        else
        {
            OnRetry(file);
        }
    }
Esempio n. 3
0
        public override void Start()
        {
            ToolboxApi.RegisterToolboxTypes(Context);
            Context.RegisterSubsystem(new IconCache(Context));

            Input.SetMouseMode(MouseMode.Absolute);
            Input.SetMouseVisible(true);

            SystemUi.ApplyStyleDefault(true, 1.0f);
            ui.GetStyle().WindowRounding = 3;

            Cache.AutoReloadResources = true;

            SystemUi.AddFont("Fonts/DejaVuSansMono.ttf");
            SystemUi.AddFont("Fonts/fontawesome-webfont.ttf",
                             new ushort[] { FontAwesome.IconMin, FontAwesome.IconMax, 0 }, 0, true);

            // These dock sizes are bullshit. Actually visible sizes do not match these numbers. Instead of spending
            // time implementing this functionality in ImGuiDock proper values were written down and then tweaked until
            // they looked right. Insertion order is also important here when specifying dock placement location.
            var screenSize = Graphics.Size;

            _tabs.Add(new HierarchyTab(Context, "Hierarchy", new Vector2(screenSize.X * 0.2f, screenSize.Y * 0.5f),
                                       null, DockSlot.SlotLeft));
            _tabs.Add(new SceneTab(Context, "Scene", new Vector2(screenSize.X * 0.6f, screenSize.Y * 0.8f),
                                   null, DockSlot.SlotRight));
            _tabs.Add(new ResourcesTab(Context, "Resources", new Vector2(screenSize.X * 0.2f, screenSize.Y * 0.15f),
                                       "Hierarchy", DockSlot.SlotBottom));
            _tabs.Add(new InspectorTab(Context, "Inspector", new Vector2(screenSize.X * 0.07f, screenSize.Y),
                                       "Scene", DockSlot.SlotRight));
            _tabs.Add(new ConsoleTab(Context, "Console", new Vector2(screenSize.X * 0.6f, screenSize.Y * 0.15f),
                                     "Scene", DockSlot.SlotBottom));

            SubscribeToEvent <Update>(OnRender);
        }
Esempio n. 4
0
    void CustomCallbackFileLoadError(AssetFile file)
    {
        string errorMsg = "インターネットに接続した状況でプレイしてください";

        if (SystemUi.GetInstance() != null)
        {
            //リロードを促すダイアログを表示
            SystemUi.GetInstance().OpenDialog1Button(
                errorMsg, LanguageSystemText.LocalizeText(SystemText.Retry),
                () => OnRetry(file));
            this.gameObject.SetActive(false);
        }
        else
        {
            OnRetry(file);
        }
    }
Esempio n. 5
0
    //更新中
    protected virtual void Update()
    {
        if (!isInit)
        {
            return;
        }

        //ローディングアイコンを表示
        if (SystemUi.GetInstance())
        {
            if (Engine.IsLoading)
            {
                SystemUi.GetInstance().StartIndicator(this);
            }
            else
            {
                SystemUi.GetInstance().StopIndicator(this);
            }
        }


        if (Engine.IsEndScenario)
        {
            Close();
            if (Engine.IsSceneGallery)
            {
                //回想シーン終了したのでギャラリーに
                gallery.Open();
            }
            else
            {
                //シナリオ終了したのでタイトルへ
                title.Open(this);
            }
        }
    }