FairyGUI.TextFormat.SetColor C# (CSharp) Method

SetColor() public method

public SetColor ( uint value ) : void
value uint
return void
        public void SetColor(uint value)
        {
            uint rr = (value >> 16) & 0x0000ff;
            uint gg = (value >> 8) & 0x0000ff;
            uint bb = value & 0x0000ff;
            float r = rr / 255.0f;
            float g = gg / 255.0f;
            float b = bb / 255.0f;
            color = new Color(r, g, b, 1);
        }

Usage Example

示例#1
0
 static public int SetColor(IntPtr l)
 {
     try {
         FairyGUI.TextFormat self = (FairyGUI.TextFormat)checkSelf(l);
         System.UInt32       a1;
         checkType(l, 2, out a1);
         self.SetColor(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.TextFormat::SetColor