public bool IsWindowOpened(WindowIndex index) { var targetWindow = windowList[(int)index]; if (targetWindow == null) { return(false); } else { return(targetWindow.gameObject.activeSelf); } }
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); } }
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); } }
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() + "のロードが失敗した"); }); }
private static extern int SetWindowLong(IntPtr hWnd, WindowIndex index, int dwNewLong);
private static extern int GetWindowLong(IntPtr hwnd, WindowIndex index);
public static extern int SetWindowLongPtr(IntPtr hWnd, WindowIndex nIndex, int dwNewLong);
public static extern int GetWindowLongPtr(IntPtr hWnd, WindowIndex nIndex);