C# 클래스 Nez.MarkupText

MarkupText lets you set fonts, textures and conditionals and provide some XML text to render that uses them. You must first set the fonts, textures and conditionals before you can use them in your markup. Lorem Ipsum

Some more text with color in the middle

Images are inlined too

conditions can be negated as well isTrue isnt trueisTrue is true

]]>
상속: RenderableComponent
파일 보기 프로젝트 열기: prime31/Nez 1 사용 예제들

공개 메소드들

메소드 설명
MarkupText ( ) : System
MarkupText ( float textWidth ) : System
compile ( ) : void

compiles the current text to prepare it for rendering

render ( Graphics graphics, Camera camera ) : void

renders the MarkupText

setConditional ( string name, bool conditional ) : MarkupText

sets a conditional which can be used in an if tag with a condition attribute. It is also valid to negate the condition by prepending a ! to the name in the if tag

setFont ( string name, IFont font ) : MarkupText

sets a font that can be used in a text tag via the font attribute

setText ( string text ) : MarkupText

sets the text used for the run. Text should be valid XML.

setTextWidth ( float textWidth ) : MarkupText

sets the width that the run will fill

setTexture ( string name, Microsoft.Xna.Framework.Graphics.Texture2D texture ) : MarkupText

sets a texture which can be used in an img tag via the source attribute

비공개 메소드들

메소드 설명
parseColor ( string hexString ) : Color
parseVector2 ( string vectorString ) : Vector2
wrapLine ( Vector2 position, List lineBuffer, HorizontalAlign alignment, float &currentLineHeight ) : Vector2

메소드 상세

MarkupText() 공개 메소드

public MarkupText ( ) : System
리턴 System

MarkupText() 공개 메소드

public MarkupText ( float textWidth ) : System
textWidth float
리턴 System

compile() 공개 메소드

compiles the current text to prepare it for rendering
public compile ( ) : void
리턴 void

render() 공개 메소드

renders the MarkupText
public render ( Graphics graphics, Camera camera ) : void
graphics Graphics Graphics.
camera Camera Camera.
리턴 void

setConditional() 공개 메소드

sets a conditional which can be used in an if tag with a condition attribute. It is also valid to negate the condition by prepending a ! to the name in the if tag
public setConditional ( string name, bool conditional ) : MarkupText
name string Name.
conditional bool Conditional.
리턴 MarkupText

setFont() 공개 메소드

sets a font that can be used in a text tag via the font attribute
public setFont ( string name, IFont font ) : MarkupText
name string Name.
font IFont Font.
리턴 MarkupText

setText() 공개 메소드

sets the text used for the run. Text should be valid XML.
public setText ( string text ) : MarkupText
text string Text.
리턴 MarkupText

setTextWidth() 공개 메소드

sets the width that the run will fill
public setTextWidth ( float textWidth ) : MarkupText
textWidth float Width.
리턴 MarkupText

setTexture() 공개 메소드

sets a texture which can be used in an img tag via the source attribute
public setTexture ( string name, Microsoft.Xna.Framework.Graphics.Texture2D texture ) : MarkupText
name string Name.
texture Microsoft.Xna.Framework.Graphics.Texture2D Texture.
리턴 MarkupText