| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(LuaOneLevelWindow); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 1, 1); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 1, 1, 1); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "CloseAllChildWindow", _m_CloseAllChildWindow); |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "filePath", _g_get_filePath); |
| | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_CloseAllChildWindow(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | LuaOneLevelWindow gen_to_be_invoked = (LuaOneLevelWindow)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.CloseAllChildWindow( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(SpiritWeaponConfig); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 6, 0); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 8, 0); |
| | | |
| | | |
| | | |
| | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "AttrValueList", _g_get_AttrValueList); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "AttrColorList", _g_get_AttrColorList); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "AttrScore", _g_get_AttrScore); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "UpCostItem", _g_get_UpCostItem); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "NextItemID", _g_get_NextItemID); |
| | | |
| | | |
| | | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | | null, null, null); |
| | | |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 6, 1, 0); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Get", _m_Get_xlua_st_); |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 7, 1, 0); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetAllRelatedItems", _m_GetAllRelatedItems_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Get", _m_Get_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetKeys", _m_GetKeys_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetValues", _m_GetValues_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Has", _m_Has_xlua_st_); |
| | |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetAllRelatedItems_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | System.Collections.Generic.HashSet<int> gen_ret = SpiritWeaponConfig.GetAllRelatedItems( ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Get_xlua_st_(RealStatePtr L) |
| | |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_UpCostItem(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | SpiritWeaponConfig gen_to_be_invoked = (SpiritWeaponConfig)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.UpCostItem); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_NextItemID(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | SpiritWeaponConfig gen_to_be_invoked = (SpiritWeaponConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.NextItemID); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | table.Get("OnDestroy", out luaOnDestroy); |
| | | } |
| | | |
| | | public void CloseAllChildWindow()
|
| | | {
|
| | | CloseSubWindows();
|
| | | } |
| | | |
| | | void OnDestroy() |
| | | { |
| | | if (luaOnDestroy != null) |
| | |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_Close.SetListener(() => { WindowCenter.Instance.Close(this.GetType().Name); }); |
| | | m_Close.SetListener(() => { WindowCenter.Instance.Close(this.gameObject.name); }); |
| | | m_Left.SetListener(() => { m_Group.TriggerLast(); }); |
| | | m_Right.SetListener(() => { m_Group.TriggerNext(); }); |
| | | } |
| | |
| | | |
| | | protected virtual void CloseSubWindows() |
| | | { |
| | | var subWindows = WindowConfig.GetChildWindows(this.GetType().Name); |
| | | var subWindows = WindowConfig.GetChildWindows(this.gameObject.name); |
| | | foreach (var window in subWindows) |
| | | { |
| | | WindowCenter.Instance.Close(window); |
| | |
| | |
|
| | | private void AddWindowPattern()
|
| | | {
|
| | | var pattern = WindowConfig.GetWindowPattern(this.GetType().Name);
|
| | | var pattern = WindowConfig.GetWindowPattern(this.gameObject.name);
|
| | | if (!string.IsNullOrEmpty(pattern))
|
| | | {
|
| | | var instance = UIUtility.CreateWidget(pattern, "Pivot");
|