Ejemplo n.º 1
0
    public void Clay()
    {
        var diffuseTexture = StockTexture.CreateSolidTexture(Util.HexToColor("FFDAAA"));

        SetShader("Standard");

        SwapTexture(diffuseTexture, "_MainTex");
        SwapTexture(null, "_MetallicGlossMap");

        SetValue("_Glossiness", 0.25f);
        SetValue("_Metallic", 0.2f);
        SetValue("_BumpScale", 0.5f);

        EnableKeyword("_NORMALMAP");
        DisableKeyWord("_METALLICGLOSSMAP");
        DisableKeyWord("_SPECGLOSSMAP");
    }
Ejemplo n.º 2
0
        public GuiListBox(int x, int y, int width = 200, int height = 200, CovertItemToString convertItemToString = null)
            : base(width, height)
        {
            ItemList        = new List <T>();
            SelectedIndex   = 0;
            CanReceiveFocus = true;

            Style.normal.background = StockTexture.CreateSolidTexture(new Color(0f, 0f, 0f, 0.25f));
            EnableBackground        = false;

            ItemStyle                   = Engine.GetStyleCopy("Solid");
            ItemStyle.font              = Engine.Instance.TextFont;
            ItemStyle.fontSize          = 16;
            ItemStyle.alignment         = TextAnchor.MiddleLeft;
            ItemStyle.normal.background = StockTexture.CreateSolidTexture(new Color(0f, 0f, 0f, 0.0f));

            SelectedItemStyle = new GUIStyle(ItemStyle);
            SelectedItemStyle.normal.background = StockTexture.CreateSolidTexture(new Color(0.2f, 0.2f, 0.5f));

            DoConvertItemToString = convertItemToString ?? ((T item) => item.ToString());
        }
Ejemplo n.º 3
0
 /** Sets the background color of the unselected items */
 public void SetBackgroundColor(Color color)
 {
     ItemStyle.normal.background = StockTexture.CreateSolidTexture(color);
 }