EditorPanel.setTexture C# (CSharp) Method

setTexture() public method

public setTexture ( Texture2D bgTexture ) : void
bgTexture UnityEngine.Texture2D
return void
    public void setTexture(Texture2D bgTexture)
    {
        backgroundTexture = bgTexture;
    }

Usage Example

Example #1
0
    public void Init()
    {
        button_style.normal.background = button_up_texture;
        button_style.active.background = button_down_texture;
        button_style.normal.textColor  = Color.white;
        button_style.active.textColor  = new Color(0.75f, 0.75f, 0.75f);
        button_style.alignment         = TextAnchor.MiddleCenter;
        button_style.fontSize          = 30;

        remove_style.normal.background = red_button_up_texture;
        remove_style.active.background = red_button_down_texture;
        remove_style.normal.textColor  = Color.black;
        remove_style.active.textColor  = new Color(0.75f, 0.75f, 0.75f);
        remove_style.alignment         = TextAnchor.MiddleCenter;
        remove_style.fontSize          = 30;

        code_style.fontSize         = 20;
        code_style.normal.textColor = Color.black;
        code_style.font             = ide_font;
        code_style.wordWrap         = false;

        shouldPopup = shouldRemove = false;

        //editorPanel = new Rectangle(0,0,Screen.width*3/4,Screen.height);
        editorPanel = new EditorPanel(this);
        editorPanel.setTexture(left_panel_background);
        //editorPanel.scale((float) 0.5, (float) 0.75);
        //editorPanel.move(800, 150);
        errorPanel = new ErrorPanel(this);
        errorPanel.setTexture(left_panel_background);
        //errorPanel.scale((float) 2, (float) 0.25);
        //errorPanel.move(-200, 500);
        //errorPanel = new Rectangle(Screen.width*3/4+5,0,Screen.width*1/4-5,Screen.height);
        buttonPanel = new ButtonPanel(this);
        trashcan    = Resources.Load("Crumpled_Paper") as Texture2D;
        //trashcan.Resize(32, 32);
    }
All Usage Examples Of EditorPanel::setTexture