Example #1
0
 static public int DecimalToHex24_s(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         System.Int32 a1;
         checkType(l, 1, out a1);
         var ret = NGUIMath.DecimalToHex24(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Example #2
0
        public static string ConvertColor2Str(Color color)
        {
            StringBuilder colorStr = new StringBuilder(9);

            colorStr.Append('[');
            colorStr.Append(NGUIMath.DecimalToHex24(NGUIMath.ColorToInt(color)));
            colorStr.Append(']');
            return(colorStr.ToString());
        }
Example #3
0
 static public int DecimalToHex24_s(IntPtr l)
 {
     try {
         System.Int32 a1;
         checkType(l, 1, out a1);
         var ret = NGUIMath.DecimalToHex24(a1);
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Example #4
0
 static public int DecimalToHex24_s(IntPtr l)
 {
     try {
         System.Int32 a1;
         checkType(l, 1, out a1);
         var ret = NGUIMath.DecimalToHex24(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
    /// <summary>
    /// Colors to hex string. exmp  0xFFFFFF
    /// </summary>
    /// <returns>The to hex string.</returns>
    /// <param name="color">Color.</param>
    public static string ColorToHexStr(Color color)
    {
        int i = 0xFFFFFF & (NGUIMath.ColorToInt(color) >> 8);

        return(NGUIMath.DecimalToHex24(i));
    }
Example #6
0
 public unsafe static long $Invoke14(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(NGUIMath.DecimalToHex24(*(int *)args)));
 }