Esempio n. 1
0
    public bool IsWindowOpened(WindowIndex index)
    {
        var targetWindow = windowList[(int)index];

        if (targetWindow == null)
        {
            return(false);
        }
        else
        {
            return(targetWindow.gameObject.activeSelf);
        }
    }
Esempio n. 2
0
    public void CreateAndOpen(WindowIndex index, bool openAsTop = true, Action <WindowBase> onOpened = null)
    {
        var targetWindow = windowList[(int)index];

        if (targetWindow == null)
        {
            CreateWindow(index, (wnd) =>
            {
                OpenWindow(index, openAsTop, onOpened);
            });
        }
        else
        {
            OpenWindow(index, openAsTop, onOpened);
        }
    }
Esempio n. 3
0
    void OpenWindow(WindowIndex index, bool openAsTop = true, Action <WindowBase> onOpened = null
                    )
    {
        var wnd = windowList[(int)index];

        if (wnd == null)
        {
            Debug.LogError("Wnd is not exist index " + index.ToString());
            return;
        }

        wnd.Open(openAsTop);

        if (onOpened != null)
        {
            onOpened(wnd);
        }
    }
Esempio n. 4
0
    void CreateWindow(WindowIndex index, Action <WindowBase> onCreated)
    {
        ResourceManager.Get().LoadResource(windowPathDict[index], (o) =>
        {
            var wind = o.GetComponent <WindowBase>();

            if (wind == null)
            {
                Debug.Log("ロードしたオブジェクトにwindowが無かった");
            }
            else
            {
                windowList[(int)index] = wind;
            }
        }, (path) =>
        {
            Debug.LogError(index.ToString() + "のロードが失敗した");
        });
    }
Esempio n. 5
0
 private static extern int SetWindowLong(IntPtr hWnd, WindowIndex index, int dwNewLong);
Esempio n. 6
0
 private static extern int GetWindowLong(IntPtr hwnd, WindowIndex index);
Esempio n. 7
0
 public static extern int SetWindowLongPtr(IntPtr hWnd, WindowIndex nIndex, int dwNewLong);
Esempio n. 8
0
 public static extern int GetWindowLongPtr(IntPtr hWnd, WindowIndex nIndex);