static public int GetWordAtPosition(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); if (matchType(l, argc, 2, typeof(UnityEngine.Vector2))) { UILabel self = (UILabel)checkSelf(l); UnityEngine.Vector2 a1; checkType(l, 2, out a1); var ret = self.GetWordAtPosition(a1); pushValue(l, true); pushValue(l, ret); return(2); } else if (matchType(l, argc, 2, typeof(UnityEngine.Vector3))) { UILabel self = (UILabel)checkSelf(l); UnityEngine.Vector3 a1; checkType(l, 2, out a1); var ret = self.GetWordAtPosition(a1); pushValue(l, true); pushValue(l, ret); return(2); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function to call"); return(2); } catch (Exception e) { return(error(l, e)); } }
static int GetWordAtPosition(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2 && TypeChecker.CheckTypes<UnityEngine.Vector2>(L, 2)) { UILabel obj = (UILabel)ToLua.CheckObject<UILabel>(L, 1); UnityEngine.Vector2 arg0 = ToLua.ToVector2(L, 2); string o = obj.GetWordAtPosition(arg0); LuaDLL.lua_pushstring(L, o); return 1; } else if (count == 2 && TypeChecker.CheckTypes<UnityEngine.Vector3>(L, 2)) { UILabel obj = (UILabel)ToLua.CheckObject<UILabel>(L, 1); UnityEngine.Vector3 arg0 = ToLua.ToVector3(L, 2); string o = obj.GetWordAtPosition(arg0); LuaDLL.lua_pushstring(L, o); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: UILabel.GetWordAtPosition"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } }
static int GetWordAtPosition(IntPtr L) { int count = LuaDLL.lua_gettop(L); if (count == 2 && LuaScriptMgr.CheckTypes(L, 1, typeof(UILabel), typeof(LuaTable))) { UILabel obj = (UILabel)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UILabel"); Vector2 arg0 = LuaScriptMgr.GetVector2(L, 2); string o = obj.GetWordAtPosition(arg0); LuaScriptMgr.Push(L, o); return(1); } else if (count == 2 && LuaScriptMgr.CheckTypes(L, 1, typeof(UILabel), typeof(LuaTable))) { UILabel obj = (UILabel)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UILabel"); Vector3 arg0 = LuaScriptMgr.GetVector3(L, 2); string o = obj.GetWordAtPosition(arg0); LuaScriptMgr.Push(L, o); return(1); } else { LuaDLL.luaL_error(L, "invalid arguments to method: UILabel.GetWordAtPosition"); } return(0); }
public static int GetWordAtPosition(IntPtr l) { int result; try { int total = LuaDLL.pua_gettop(l); if (LuaObject.matchType(l, total, 2, typeof(Vector2))) { UILabel uILabel = (UILabel)LuaObject.checkSelf(l); Vector2 localPos; LuaObject.checkType(l, 2, out localPos); string wordAtPosition = uILabel.GetWordAtPosition(localPos); LuaObject.pushValue(l, true); LuaObject.pushValue(l, wordAtPosition); result = 2; } else if (LuaObject.matchType(l, total, 2, typeof(Vector3))) { UILabel uILabel2 = (UILabel)LuaObject.checkSelf(l); Vector3 worldPos; LuaObject.checkType(l, 2, out worldPos); string wordAtPosition2 = uILabel2.GetWordAtPosition(worldPos); LuaObject.pushValue(l, true); LuaObject.pushValue(l, wordAtPosition2); result = 2; } else { LuaObject.pushValue(l, false); LuaDLL.pua_pushstring(l, "No matched override function to call"); result = 2; } } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public void ProcessUrlClick(UILabel label) { string urlAtPosition = label.GetUrlAtPosition(UICamera.lastHit.point); if (string.IsNullOrEmpty(urlAtPosition)) { return; } try { Uri uri = new Uri(urlAtPosition); GameUIManager.mInstance.ShowGUIWebViewPopUp(uri.AbsoluteUri, Singleton<StringManager>.Instance.GetString("keFuZhuanQu")); } catch { string wordAtPosition = label.GetWordAtPosition(UICamera.lastHit.point); global::Debug.Log(new object[] { "Clicked on: " + wordAtPosition }); this.AddElfQuestLine(new ElfQuestItem { strQuest = urlAtPosition, strShow = wordAtPosition }); this.RefreshChatPanel(); this.lastQueryQuest = urlAtPosition; GameUIFairyTalePopUp.HttpGetElfQueryUrl(1510, urlAtPosition); } }