Esempio n. 1
0
        /// <summary>
        /// Convert a Unity text alignment to a kRPC text alignment.
        /// </summary>
        public static TextAlignment ToTextAlignment(this UnityEngine.TextAlignment style)
        {
            switch (style)
            {
            case UnityEngine.TextAlignment.Left:
                return(TextAlignment.Left);

            case UnityEngine.TextAlignment.Right:
                return(TextAlignment.Right);

            case UnityEngine.TextAlignment.Center:
                return(TextAlignment.Center);

            default:
                throw new ArgumentOutOfRangeException(nameof(style));
            }
        }
Esempio n. 2
0
    static int get_alignment(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.TextMesh      obj = (UnityEngine.TextMesh)o;
            UnityEngine.TextAlignment ret = obj.alignment;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index alignment on a nil value" : e.Message));
        }
    }
Esempio n. 3
0
    static int set_alignment(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.TextMesh      obj  = (UnityEngine.TextMesh)o;
            UnityEngine.TextAlignment arg0 = (UnityEngine.TextAlignment)ToLua.CheckObject(L, 2, typeof(UnityEngine.TextAlignment));
            obj.alignment = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index alignment on a nil value" : e.Message));
        }
    }
Esempio n. 4
0
        static StackObject *set_alignment_9(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.TextAlignment value = (UnityEngine.TextAlignment) typeof(UnityEngine.TextAlignment).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.GUIText instance_of_this_method;
            instance_of_this_method = (UnityEngine.GUIText) typeof(UnityEngine.GUIText).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.alignment = value;

            return(__ret);
        }