Exemplo n.º 1
0
    public void AddCenterLabel(string fontName, string labelString, Color labelColor, float labelScale)
    {
        ImLabelComponent lc = new ImLabelComponent("centerLabelComponent", fontName, labelString, labelColor, labelScale);

        lc.label.x           = width_ / 2f;
        centerLabelComponent = lc;
        AddComponent(lc);

        this.height = Mathf.Max(height_, lc.label.textRect.height * lc.label.scaleY + verticalPadding_ * 2);

        lc.label.y = height_ / 2f;
    }
Exemplo n.º 2
0
    public void AddLeftLabel(string fontName, string labelString, Color labelColor, float labelScale)
    {
        labelString = AddLineBreaksToString(labelString, 25);

        ImLabelComponent lc = new ImLabelComponent("leftLabelComponent", fontName, labelString, labelColor, labelScale);

        lc.label.anchorX   = 0;
        lc.label.x         = horizontalPadding_;
        leftLabelComponent = lc;
        AddComponent(lc);

        this.height = Mathf.Max(height_, lc.label.textRect.height * lc.label.scaleY + verticalPadding_ * 2);

        lc.label.y = height_ / 2f;
    }
Exemplo n.º 3
0
    public void AddLeftLabel(string fontName, string labelString, Color labelColor, float labelScale)
    {
        labelString = AddLineBreaksToString(labelString, 25);

        ImLabelComponent lc = new ImLabelComponent("leftLabelComponent", fontName, labelString, labelColor, labelScale);
        lc.label.anchorX = 0;
        lc.label.x = horizontalPadding_;
        leftLabelComponent = lc;
        AddComponent(lc);

        this.height = Mathf.Max(height_, lc.label.textRect.height * lc.label.scaleY + verticalPadding_ * 2);

        lc.label.y = height_ / 2f;
    }
Exemplo n.º 4
0
    public void AddCenterLabel(string fontName, string labelString, Color labelColor, float labelScale)
    {
        ImLabelComponent lc = new ImLabelComponent("centerLabelComponent", fontName, labelString, labelColor, labelScale);
        lc.label.x = width_ / 2f;
        centerLabelComponent = lc;
        AddComponent(lc);

        this.height = Mathf.Max(height_, lc.label.textRect.height * lc.label.scaleY + verticalPadding_ * 2);

        lc.label.y = height_ / 2f;
    }