示例#1
0
    public string ToString(int subSize)
    {
        string str = "";

        foreach (string sign in fields)
        {
            str += UIConstants.SignFormat(sign, subSize);
        }
        return(str);
    }
示例#2
0
    private void SetText()
    {
        int subSize = UIConstants.TextFontSubSize;

        textMesh.text = UIConstants.SignFormat(sign, subSize);

        Bounds textBounds = textRenderer.bounds;

        MaterialPropertyBlock prop = new MaterialPropertyBlock();

        backgroundRenderer.GetPropertyBlock(prop);
        prop.SetFloat("_ScaleX", textBounds.size.x + SIGN_PADDING_WIDTH);
        prop.SetFloat("_ScaleY", textBounds.size.y);
        backgroundRenderer.SetPropertyBlock(prop);
    }
示例#3
0
 private void SetText(string str)
 {
     text           = str;
     textField.text = UIConstants.SignFormat(text, subSize);
 }