GUI.TextBlock

Barotrauma.GUITextBlock

Functions

AddToGUIUpdateList(ignoreChildren, order)

AddToGUIUpdateList

Parameters

  • ignoreChildren bool

  • order number

ApplySizeRestrictions(style)

ApplySizeRestrictions

Parameters

  • style GUIComponentStyle

ApplyStyle(componentStyle)

ApplyStyle

Parameters

  • componentStyle GUIComponentStyle

CalculateHeightFromText(padding, removeExtraSpacing)

CalculateHeightFromText

Parameters

  • padding number

  • removeExtraSpacing bool

ClearCaretPositions()

ClearCaretPositions

ClearChildren()

ClearChildren

DrawAuto(spriteBatch)

DrawAuto

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

DrawChildren(spriteBatch, recursive)

DrawChildren

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

  • recursive bool

DrawManually(spriteBatch, alsoChildren, recursive)

DrawManually

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

  • alsoChildren bool

  • recursive bool

DrawToolTip(spriteBatch)

DrawToolTip

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

Equals(obj)

Equals

Parameters

  • obj Object

Returns

  • bool

FadeIn(wait, duration, alsoChildren)

FadeIn

Parameters

  • wait number

  • duration number

  • alsoChildren bool

FadeOut(duration, removeAfter, wait, onRemove, alsoChildren)

FadeOut

Parameters

  • duration number

  • removeAfter bool

  • wait number

  • onRemove Action

  • alsoChildren bool

FindChild(predicate, recursive)

FindChild

Parameters

  • predicate function

  • recursive bool

Returns

  • GUIComponent

FindChild(userData, recursive)

FindChild

Parameters

  • userData Object

  • recursive bool

Returns

  • GUIComponent

FindChildren(userData)

FindChildren

Parameters

  • userData Object

Returns

  • IEnumerable

FindChildren(predicate)

FindChildren

Parameters

  • predicate function

Returns

  • IEnumerable

Flash(color, flashDuration, useRectangleFlash, useCircularFlash, flashRectInflate)

Flash

Parameters

  • color optional Microsoft.Xna.Framework.Color

  • flashDuration number

  • useRectangleFlash bool

  • useCircularFlash bool

  • flashRectInflate optional Microsoft.Xna.Framework.Vector2

ForceLayoutRecalculation()

ForceLayoutRecalculation

ForceUpdate()

ForceUpdate

GUITextBlock(rectT, text, textColor, font, textAlignment, wrap, style, color)

GUITextBlock

Parameters

  • text RichString

  • textColor optional Microsoft.Xna.Framework.Color

  • font GUIFont

  • textAlignment Alignment

  • wrap bool

  • color optional Microsoft.Xna.Framework.Color

GUITextBlock.AutoScaleAndNormalize(textBlocks)

AutoScaleAndNormalize

Parameters

GUITextBlock.AutoScaleAndNormalize(scaleHorizontal, scaleVertical, textBlocks)

AutoScaleAndNormalize

Parameters

  • scaleHorizontal bool

  • scaleVertical bool

GUITextBlock.AutoScaleAndNormalize(textBlocks, scaleHorizontal, scaleVertical, defaultScale)

AutoScaleAndNormalize

Parameters

  • textBlocks IEnumerable

  • scaleHorizontal bool

  • scaleVertical bool

  • defaultScale optional Single

GetAllCaretPositions()

GetAllCaretPositions

Returns

  • Collections.Immutable.ImmutableArray

GetAllChildren()

GetAllChildren

Returns

  • IEnumerable

GetAllChildren()

GetAllChildren

Returns

  • IEnumerable

GetAnyChild()

GetAnyChild

Returns

  • T

GetCaretIndexFromLocalPos(pos)

GetCaretIndexFromLocalPos

Parameters

  • pos Microsoft.Xna.Framework.Vector2&

Returns

  • number

GetCaretIndexFromScreenPos(pos)

GetCaretIndexFromScreenPos

Parameters

  • pos Microsoft.Xna.Framework.Vector2&

Returns

  • number

GetChild(index)

GetChild

Parameters

  • index number

Returns

  • GUIComponent

GetChild()

GetChild

Returns

  • T

GetChildByUserData(obj)

GetChildByUserData

Parameters

  • obj Object

Returns

  • GUIComponent

GetChildIndex(child)

GetChildIndex

Parameters

  • child GUIComponent

Returns

  • number

GetHashCode()

GetHashCode

Returns

  • number

GetType()

GetType

Returns

  • Type

ImmediateFlash(color)

ImmediateFlash

Parameters

  • color optional Microsoft.Xna.Framework.Color

InheritTotalChildrenHeight()

InheritTotalChildrenHeight

InheritTotalChildrenMinHeight()

InheritTotalChildrenMinHeight

IsChildOf(component, recursive)

IsChildOf

Parameters

  • component GUIComponent

  • recursive bool

Returns

  • bool

IsParentOf(component, recursive)

IsParentOf

Parameters

  • component GUIComponent

  • recursive bool

Returns

  • bool

OverrideTextColor(color)

OverrideTextColor

Parameters

  • color Microsoft.Xna.Framework.Color

Pulsate(startScale, endScale, duration)

Pulsate

Parameters

  • startScale Microsoft.Xna.Framework.Vector2

  • endScale Microsoft.Xna.Framework.Vector2

  • duration number

RemoveChild(child)

RemoveChild

Parameters

  • child GUIComponent

RemoveFromGUIUpdateList(alsoChildren)

RemoveFromGUIUpdateList

Parameters

  • alsoChildren bool

SetAsFirstChild()

SetAsFirstChild

SetAsLastChild()

SetAsLastChild

SetRichText(richText)

SetRichText

Parameters

  • richText LocalizedString

SetTextPos()

SetTextPos

SlideIn(wait, duration, amount, direction)

SlideIn

Parameters

  • wait number

  • duration number

  • amount number

  • direction SlideDirection

SlideOut(duration, amount, direction)

SlideOut

Parameters

  • duration number

  • amount number

  • direction SlideDirection

ToString()

ToString

Returns

UpdateAuto(deltaTime)

UpdateAuto

Parameters

  • deltaTime number

UpdateChildren(deltaTime, recursive)

UpdateChildren

Parameters

  • deltaTime number

  • recursive bool

UpdateManually(deltaTime, alsoChildren, recursive)

UpdateManually

Parameters

  • deltaTime number

  • alsoChildren bool

  • recursive bool

Fields

AlwaysOverrideCursor

AlwaysOverrideCursor, field of type bool

  • AlwaysOverrideCursor

AutoDraw

AutoDraw, field of type bool

  • AutoDraw

AutoScaleHorizontal

AutoScaleHorizontal, field of type bool

  • AutoScaleHorizontal

AutoScaleVertical

AutoScaleVertical, field of type bool

  • AutoScaleVertical

AutoUpdate

AutoUpdate, field of type bool

  • AutoUpdate

Bounce

Bounce, field of type bool

  • Bounce

CanBeFocused

CanBeFocused, field of type bool

  • CanBeFocused

Censor

Censor, field of type bool

  • Censor

CensoredText

CensoredText, field of type string

  • CensoredText

Center

Center, field of type Microsoft.Xna.Framework.Vector2

  • Center

Children

Children, field of type IEnumerable

  • Children

ClampMouseRectToParent

ClampMouseRectToParent, field of type bool

  • ClampMouseRectToParent

ClickableAreas

ClickableAreas, field of type table

  • ClickableAreas

Color

Color, field of type Microsoft.Xna.Framework.Color

  • Color

ColorCrossFadeTime

ColorCrossFadeTime, field of type number

  • ColorCrossFadeTime

ColorTransition

ColorTransition, field of type TransitionMode

  • ColorTransition

CountChildren

CountChildren, field of type number

  • CountChildren

DefaultColor

DefaultColor, field of type Microsoft.Xna.Framework.Color

  • DefaultColor

DisabledColor

DisabledColor, field of type Microsoft.Xna.Framework.Color

  • DisabledColor

DisabledTextColor

DisabledTextColor, field of type Microsoft.Xna.Framework.Color

  • DisabledTextColor

Enabled

Enabled, field of type bool

  • Enabled

ExternalHighlight

ExternalHighlight, field of type bool

  • ExternalHighlight

FallBackState

FallBackState, field of type SpriteFallBackState

  • FallBackState

FlashTimer

FlashTimer, field of type number

  • FlashTimer

Font

Font, field of type GUIFont

  • Font

ForceUpperCase

ForceUpperCase, field of type ForceUpperCase

  • ForceUpperCase

GlowOnSelect

GlowOnSelect, field of type bool

  • GlowOnSelect

HasColorHighlight

HasColorHighlight, field of type bool

  • HasColorHighlight

HoverColor

HoverColor, field of type Microsoft.Xna.Framework.Color

  • HoverColor

HoverCursor

HoverCursor, field of type CursorState

  • HoverCursor

HoverTextColor

HoverTextColor, field of type Microsoft.Xna.Framework.Color

  • HoverTextColor

IgnoreLayoutGroups

IgnoreLayoutGroups, field of type bool

  • IgnoreLayoutGroups

MouseRect

MouseRect, field of type Microsoft.Xna.Framework.Rectangle

  • MouseRect

OnAddedToGUIUpdateList

OnAddedToGUIUpdateList, field of type Action

  • OnAddedToGUIUpdateList

OnSecondaryClicked

OnSecondaryClicked, field of type SecondaryButtonDownHandler

  • OnSecondaryClicked

Origin

Origin, field of type Microsoft.Xna.Framework.Vector2

  • Origin

OutlineColor

OutlineColor, field of type Microsoft.Xna.Framework.Color

  • OutlineColor

OverflowClip

OverflowClip, field of type bool

  • OverflowClip

OverflowClipActive

OverflowClipActive, field of type bool

  • OverflowClipActive

OverrideRichTextDataAlpha

OverrideRichTextDataAlpha, field of type bool

  • OverrideRichTextDataAlpha

Padding

Padding, field of type Microsoft.Xna.Framework.Vector4

  • Padding

Parent

Parent, field of type GUIComponent

  • Parent

PlaySoundOnSelect

PlaySoundOnSelect, field of type bool

  • PlaySoundOnSelect

PressedColor

PressedColor, field of type Microsoft.Xna.Framework.Color

  • PressedColor

Rect

Rect, field of type Microsoft.Xna.Framework.Rectangle

  • Rect

RectTransform

RectTransform, field of type RectTransform

  • RectTransform

RichTextData

RichTextData, field of type ?Collections.Immutable.ImmutableArray

  • RichTextData

RoundToNearestPixel

RoundToNearestPixel, field of type bool

  • RoundToNearestPixel

Selected

Selected, field of type bool

  • Selected

SelectedColor

SelectedColor, field of type Microsoft.Xna.Framework.Color

  • SelectedColor

SelectedTextColor

SelectedTextColor, field of type Microsoft.Xna.Framework.Color

  • SelectedTextColor

Shadow

Shadow, field of type bool

  • Shadow

SpriteCrossFadeTime

SpriteCrossFadeTime, field of type number

  • SpriteCrossFadeTime

SpriteEffects

SpriteEffects, field of type Microsoft.Xna.Framework.Graphics.SpriteEffects

  • SpriteEffects

State

State, field of type ComponentState

  • State

Strikethrough

Strikethrough, field of type StrikethroughSettings

  • Strikethrough

Style

Style, field of type GUIComponentStyle

  • Style

Text

Text, field of type RichString

  • Text

TextAlignment

TextAlignment, field of type Alignment

  • TextAlignment

TextColor

TextColor, field of type Microsoft.Xna.Framework.Color

  • TextColor

TextDepth

TextDepth, field of type number

  • TextDepth

TextGetter

TextGetter, field of type TextGetterHandler

  • TextGetter

TextOffset

TextOffset, field of type Microsoft.Xna.Framework.Vector2

  • TextOffset

TextPos

TextPos, field of type Microsoft.Xna.Framework.Vector2

  • TextPos

TextScale

TextScale, field of type number

  • TextScale

TextSize

TextSize, field of type Microsoft.Xna.Framework.Vector2

  • TextSize

ToolTip

ToolTip, field of type RichString

  • ToolTip

UVOffset

UVOffset, field of type Microsoft.Xna.Framework.Vector2

  • UVOffset

UpdateOrder

UpdateOrder, field of type number

  • UpdateOrder

UserData

UserData, field of type Object

  • UserData

Visible

Visible, field of type bool

  • Visible

Wrap

Wrap, field of type bool

  • Wrap

WrappedText

WrappedText, field of type LocalizedString

  • WrappedText

sprites

sprites, field of type table

  • sprites