コード例 #1
0
 private void _SetAlpha(float a)
 {
     labelA.SetText((255 * a).ToString());
     sliderA.value = a;
     selectedColorDisplay.color = new Color(selectedColorDisplay.color.r, selectedColorDisplay.color.g, selectedColorDisplay.color.b, a);
     _SetHexCode();
     _CursorVisible(true);
 }
コード例 #2
0
    private void _SetHexCode()
    {
        string hex = (hasAlpha)? _ColorToHex(selectedColorDisplay.color):_ColorToHexWithOutAlpha(selectedColorDisplay.color);

        labelHexCode.SetText(hex);
        hexCode = hex;
        //DPlayerPref.PlayCamLastColorHex = hex;
    }
コード例 #3
0
    private void _SetColor(Color color)
    {
        if (_IsOnSilderValueChange)
        {
            _IsOnSilderValueChange = false;
            return;
        }

        labelR.SetText(Mathf.FloorToInt(255 * color.r).ToString());
        labelG.SetText(Mathf.FloorToInt(255 * color.g).ToString());
        labelB.SetText(Mathf.FloorToInt(255 * color.b).ToString());
        _IsSetColor   = true;
        sliderR.value = color.r;
        _IsSetColor   = true;
        sliderG.value = color.g;
        _IsSetColor   = true;
        sliderB.value = color.b;
        selectedColorDisplay.color = new Color(color.r, color.g, color.b, selectedColorDisplay.color.a);
        _SetHexCode();
        _CursorVisible(true);
    }
コード例 #4
0
    private void _SetHexCode()
    {
        string hex = (hasAlpha)? _ColorToHex(selectedColorDisplay.color):_ColorToHexWithOutAlpha(selectedColorDisplay.color);

        labelHexCode.SetText(hex);
    }