public override void DrawDocumentation(ExampleWindow window) { window.AddVerticalSpace(15); window.AddHeader("Rich Text", 15); //Rich Text window.AddRichText("You can add Rich Text using:\n<code>window.AddRichText(text);</code>"); //Bold window.AddRichText("You can style text with <b>bold</b>:\n<code>\"<b>bold</b>\"</code>"); //Italics window.AddRichText("You can style text with <i>italics</i>:\n<code>\"<i>italics</i>\"</code>"); //Bold Italics window.AddRichText("You can style text with <b><i>bold-italics</i></b>:\n<code>\"<b><i>bold-italics</i></b>\"</code>"); //Colour window.AddRichText($"You can style text with {RichTextUtility.GetColouredString("colour", Color.cyan)}:\n<code>\"<color=#00FFFF>color</color>\"</code>"); //Inline Buttons window.AddRichText($"You can add inline {RichTextUtility.GetButtonString(ButtonKey, RichTextUtility.GetColouredString("buttons", Color.green))}\n<code>\"<button=key><color=#00FF00>label</color></button>\"</code>"); }
public override void DrawDocumentation(ExampleWindow window) { window.AddVerticalSpace(15); window.AddHeader("Methods", 15); //Full Width Buttons window.AddFullWidthButton("Full Width Buttons", Color.magenta, RichTextStylesPage.ButtonKey); window.AddRichText("<code>window.AddFullWidthButton(\"Label\", Color.magenta, buttonKey);</code>"); //Vertical Space window.AddPlainText("Vertical"); window.AddVerticalSpace(5); window.AddPlainText("Space"); window.AddRichText("<code>window.AddVerticalSpace(5);</code>"); //Header window.AddHeader(RichTextUtility.GetColouredString("Headers", Color.gray), 14); window.AddRichText("<code>window.AddHeader(\"Headers\");</code>"); //Splitter window.AddPlainText("Splitter:"); window.AddSplitter(); window.AddRichText("<code>window.AddSplitter();</code>"); }