/// <summary> /// 将需要监听的对象添加到List之中 /// </summary> /// <param name="listener"></param> public void RegisterSender(IWindowListener listener) { if (!listeners.Contains(listener)) { listeners.Add(listener); } }
/// <summary> /// 从List之中移除掉监听的对象 /// </summary> /// <param name="listener"></param> public void RemoveListener(IWindowListener listener) { if (listeners.Contains(listener)) { listeners.Remove(listener); } }
protected void setWindowConfiguration(WindowConfiguration config) { windowX = config.windowX; windowY = config.windowY; windowWidth = config.windowWidth; windowHeight = config.windowHeight; windowMinWidth = config.windowMinWidth; windowMinHeight = config.windowMinHeight; windowMaxWidth = config.windowMaxWidth; windowMaxHeight = config.windowMaxHeight; windowResizable = config.windowResizable; windowDecorated = config.windowDecorated; windowMaximized = config.windowMaximized; windowIconFileType = config.windowIconFileType; windowIconPaths = config.windowIconPaths; windowListener = config.windowListener; fullscreenMode = config.fullscreenMode; title = config.title; initialBackgroundColor = config.initialBackgroundColor; initialVisible = config.initialVisible; }
/// <summary> /// 弹窗 /// </summary> /// <param name="type">类型</param> /// <param name="callBack">需要回调的对象</param> public void AlertWindow(AlertWindowType type, IWindowListener callBack = null) { if (callBack != null) { RegisterSender(callBack); } GameObject tempGo = default(GameObject); switch (type) { case AlertWindowType.SelectWindow: tempGo = TSingleTon <PrefabLoad> .Singleton().LoadFromResource("Common", SelectLevelWindow.PrefabName); break; } if (tempGo != null) { currentWindow = GameObject.Instantiate(tempGo, windowRoot); currentWindow.transform.localPosition = Vector3.zero; currentAlert = currentWindow.GetComponent <SelectLevelWindow>(); } }
public void setWindowListener(IWindowListener windowListener) { this.windowListener = windowListener; }
internal Window(IApplicationListener listener, ApplicationConfiguration config) { this.listener = listener; windowListener = config.windowListener; this.config = config; }
public void setWindowListener(IWindowListener listener) { windowListener = listener; }
public void SetWindowListener(IWindowListener iWindowListener) { this.iWindowListener = iWindowListener; iWindowListener.StartGameCoreRunner(); }