public string ToString(int subSize) { string str = ""; foreach (string sign in fields) { str += UIConstants.SignFormat(sign, subSize); } return(str); }
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); }
private void SetText(string str) { text = str; textField.text = UIConstants.SignFormat(text, subSize); }