Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const string TextContentToken = "##TextContentToken##";
- const string TextStyleToken = "##TextStyleToken##";
- const string TextStyleMarkup = "<s val=\"##TextStyleToken##\">##TextContentToken##</s>";
- text TextStyle (text sourceText, string style)
- {
- if ((sourceText != null) && (style != null))
- {
- // Replace TextContentToken with sourceText
- sourceText = TextReplaceWord(StringToText(TextStyleMarkup),StringToText(TextContentToken),sourceText,c_stringReplaceAll,true);
- // Replace TextStyleToken with style
- sourceText = TextReplaceWord(sourceText,StringToText(TextStyleToken),StringToText(style),c_stringReplaceAll,true);
- }
- return sourceText;
- }
- text TextColorStyle (text sourceText, color tint, string style)
- {
- return TextStyle(TextWithColor(sourceText,tint),style);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement