Skip to content

Klass.KCode.TextPanelLight

Adrian Preuß edited this page May 21, 2020 · 3 revisions

################## Klass.KCode.TextPanelLight ################## WARNING: The parser is currently under development!

KCode

API

Constructors =========

TextPanelLight panel = new TextPanelLight()
TextPanelLight panel = new TextPanelLight(string content)

Methods

panel.SetContent(string content)
panel.Repaint()

Options

Name Type Default
Allowment
AllowBold bool true +
AllowBold bool true +
AllowItalic bool true +
AllowFontSize bool true +
AllowImages bool true +
AllowAlignment bool true +
AllowIndentation bool true +
AllowBreaklines bool true +
Defaults
DefaultFontSize int 16 +
DefaultTextColor Color Color.FromRgb(0, 0, 0) +
DefaultLinkHoverColor Color Color.FromRgb(255, 0, 0) +
ChannelRed Color Color.FromRgb(255, 0, 0) +
ChannelGreen Color Color.FromRgb(0, 255, 0) +
ChannelBlue Color Color.FromRgb(0, 0, 255) +

Usage

TextPanelLight panel = new TextPanelLight(<content>);

/* Allow some Snippets */
panel.AllowBold			= true;
panel.AllowItalic		= true;
panel.AllowFontSize		= true;
panel.AllowColor		= true;
panel.AllowImages		= true;
panel.AllowLinks		= true;
panel.AllowAlignment		= true;
panel.AllowIndentation		= true;
panel.AllowBreaklines		= true;

/* Default Styles */
panel.DefaultFontSize		= 16;
panel.DefaultTextColor		= Color.FromRgb(0, 0, 0);
panel.DefaultLinkHoverColor	= Color.FromRgb(255, 0, 0);
panel.ChannelRed		= Color.FromRgb(255, 0, 0);
panel.ChannelGreen		= Color.FromRgb(0, 255, 0);
panel.ChannelBlue		= Color.FromRgb(0, 0, 255);

/* You can set the content on constructor or here */
panel.SetContent(<content>);

/* Add the TextPanelLight to your UI */
this.Output.Children.Add(panel);
Clone this wiki locally