static int set_modal(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.Window obj = (FairyGUI.Window)o; bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.modal = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index modal on a nil value")); } }
static int get_modalWaitingPane(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.Window obj = (FairyGUI.Window)o; FairyGUI.GObject ret = obj.modalWaitingPane; ToLua.PushObject(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index modalWaitingPane on a nil value" : e.Message)); } }
static int get_bringToFontOnClick(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.Window obj = (FairyGUI.Window)o; bool ret = obj.bringToFontOnClick; LuaDLL.lua_pushboolean(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index bringToFontOnClick on a nil value" : e.Message)); } }
static int get_modalWaiting(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.Window obj = (FairyGUI.Window)o; bool ret = obj.modalWaiting; LuaDLL.lua_pushboolean(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index modalWaiting on a nil value")); } }
static int set_contentArea(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.Window obj = (FairyGUI.Window)o; FairyGUI.GObject arg0 = (FairyGUI.GObject)ToLua.CheckObject <FairyGUI.GObject>(L, 2); obj.contentArea = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index contentArea on a nil value")); } }
static int get_contentArea(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.Window obj = (FairyGUI.Window)o; FairyGUI.GObject ret = obj.contentArea; ToLua.PushObject(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index contentArea on a nil value")); } }
static int get_frame(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.Window obj = (FairyGUI.Window)o; FairyGUI.GComponent ret = obj.frame; ToLua.PushObject(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index frame on a nil value")); } }
static int set_dragArea(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.Window obj = (FairyGUI.Window)o; FairyGUI.GObject arg0 = (FairyGUI.GObject)ToLua.CheckObject(L, 2, typeof(FairyGUI.GObject)); obj.dragArea = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index dragArea on a nil value" : e.Message)); } }
static int set_bringToFontOnClick(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.Window obj = (FairyGUI.Window)o; bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.bringToFontOnClick = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index bringToFontOnClick on a nil value" : e.Message)); } }
static int _CreateFairyGUI_Window(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { FairyGUI.Window obj = new FairyGUI.Window(); ToLua.PushObject(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: FairyGUI.Window.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
/// <summary> /// Display a window. /// </summary> /// <param name="win"></param> public void ShowWindow(Window win) { AddChild(win); AdjustModalLayer(); }
/// <summary> /// Display a window. /// </summary> /// <param name="win"></param> public void ShowWindow(Window win) { AddChild(win); if (win.x > this.width) win.x = this.width - win.width; else if (win.x + win.width < 0) win.x = 0; if (win.y > this.height) win.y = this.height - win.height; else if (win.y + win.height < 0) win.y = 0; AdjustModalLayer(); }
/// <summary> /// Remove a window from stage immediatelly. window.Hide/window.OnHide will never be called. /// 立刻关闭一个窗口。不会调用Window.Hide方法,Window.OnHide也不会被调用。 /// </summary> /// <param name="win"></param> /// <param name="dispose">True to dispose the window.</param> public void HideWindowImmediately(Window win, bool dispose) { if (win.parent == this) RemoveChild(win, dispose); else if (dispose) win.Dispose(); AdjustModalLayer(); }
/// <summary> /// Remove a window from stage immediatelly. window.Hide/window.OnHide will never be called. ///立刻关闭一个窗口。不会调用Window.Hide方法,Window.OnHide也不会被调用。 /// </summary> /// <param name="win"></param> public void HideWindowImmediately(Window win) { HideWindowImmediately(win, false); }
/// <summary> /// Call window.Hide /// 关闭一个窗口。将调用Window.Hide方法。 /// </summary> /// <param name="win"></param> public void HideWindow(Window win) { win.Hide(); }
/// <summary> /// 将一个窗口提到所有窗口的最前面 /// </summary> /// <param name="win"></param> public void BringToFront(Window win) { int cnt = this.numChildren; int i; if (this._modalLayer.parent != null && !win.modal) i = this.GetChildIndex(this._modalLayer) - 1; else i = cnt - 1; for (; i >= 0; i--) { GObject g = this.GetChildAt(i); if (g == win) return; if (g is Window) break; } if (i >= 0) this.SetChildIndex(win, i); }