C# 클래스 FSO.Client.UI.Controls.UITextEdit

Big complex text edit control, used in many places
상속: FSO.Client.UI.Framework.UIElement, IFocusableUI, ITextControl
파일 보기 프로젝트 열기: RHY3756547/FreeSO 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
TextMargin Microsoft.Xna.Framework.Rectangle

Private Properties

프로퍼티 타입 설명
Control_GetIndexForLineAdjusment int
Control_GetSelectableIndex int
Control_GetSelectionStart int
Control_MoveCursor void
Control_MoveSelection void
Control_ScrollTo void
Control_SetSelectionEnd void
Control_SetSelectionStart void
Control_ValidateText void

공개 메소드들

메소드 설명
AttachSlider ( UISlider slider ) : void
ComputeDrawingCommands ( ) : void

When the text / scroll / highlight changes we need to re-compute how we are going to draw this text field

CreateTextBox ( ) : UITextEdit
Draw ( FSO.Client.UI.Framework.UISpriteBatch batch ) : void

Render

GetBounds ( ) : Rectangle
GetLineForIndex ( int index ) : UITextEditLine
HitTestText ( Vector2 point ) : int

Returns which character index would be hit by the given mouse coordinates. The coords should be in local coords.

InitDefaultSlider ( ) : void
OnFocusChanged ( FocusEvent newFocus ) : void
OnMouseEvent ( UIMouseEventType evt, UpdateState state ) : void
PositionChildSlider ( ) : void
SetBackgroundTexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture, int marginLeft, int marginRight, int marginTop, int marginBottom ) : void
SetSize ( float width, float height ) : void
UITextEdit ( ) : System
Update ( UpdateState state ) : void
m_Slider_OnChange ( UIElement element ) : void

보호된 메소드들

메소드 설명
CalculateMatrix ( ) : void
CalculateSegments ( UITextEditLine line ) : List

Creates a list of segments to split the line into in order to draw selection boxes

비공개 메소드들

메소드 설명
Control_GetIndexForLineAdjusment ( int startIndex, int deltaY ) : int

Calculate & return the index that should be selected if the cursor is moved up or down by the value deltaY

Control_GetSelectableIndex ( int index, int delta ) : int

Takes in a string index and adjusts it if that index lies between non-breakable chars

Control_GetSelectionStart ( ) : int

Gets the absolute selection start position

Control_MoveCursor ( int deltaX, int deltaY ) : void

Handles using arrow keys to move the selection start

Control_MoveSelection ( int deltaX, int deltaY ) : void

Handles using arrow keys to move the selection end

Control_ScrollTo ( int index ) : void

Sets the scroll position such that the given index is visible on screen

Control_SetSelectionEnd ( int val ) : void
Control_SetSelectionStart ( int val ) : void

Sets the selection start index

Control_ValidateText ( ) : void

Makes sure that the text does not overflow max lines or max chars

메소드 상세

AttachSlider() 공개 메소드

public AttachSlider ( UISlider slider ) : void
slider UISlider
리턴 void

CalculateMatrix() 보호된 메소드

protected CalculateMatrix ( ) : void
리턴 void

CalculateSegments() 보호된 메소드

Creates a list of segments to split the line into in order to draw selection boxes
protected CalculateSegments ( UITextEditLine line ) : List
line UITextEditLine
리턴 List

ComputeDrawingCommands() 공개 메소드

When the text / scroll / highlight changes we need to re-compute how we are going to draw this text field
public ComputeDrawingCommands ( ) : void
리턴 void

CreateTextBox() 공개 정적인 메소드

public static CreateTextBox ( ) : UITextEdit
리턴 UITextEdit

Draw() 공개 메소드

Render
public Draw ( FSO.Client.UI.Framework.UISpriteBatch batch ) : void
batch FSO.Client.UI.Framework.UISpriteBatch
리턴 void

GetBounds() 공개 메소드

public GetBounds ( ) : Rectangle
리턴 Microsoft.Xna.Framework.Rectangle

GetLineForIndex() 공개 메소드

public GetLineForIndex ( int index ) : UITextEditLine
index int
리턴 UITextEditLine

HitTestText() 공개 메소드

Returns which character index would be hit by the given mouse coordinates. The coords should be in local coords.
public HitTestText ( Vector2 point ) : int
point Vector2
리턴 int

InitDefaultSlider() 공개 메소드

public InitDefaultSlider ( ) : void
리턴 void

OnFocusChanged() 공개 메소드

public OnFocusChanged ( FocusEvent newFocus ) : void
newFocus FocusEvent
리턴 void

OnMouseEvent() 공개 메소드

public OnMouseEvent ( UIMouseEventType evt, UpdateState state ) : void
evt UIMouseEventType
state FSO.Common.Rendering.Framework.Model.UpdateState
리턴 void

PositionChildSlider() 공개 메소드

public PositionChildSlider ( ) : void
리턴 void

SetBackgroundTexture() 공개 메소드

public SetBackgroundTexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture, int marginLeft, int marginRight, int marginTop, int marginBottom ) : void
texture Microsoft.Xna.Framework.Graphics.Texture2D
marginLeft int
marginRight int
marginTop int
marginBottom int
리턴 void

SetSize() 공개 메소드

public SetSize ( float width, float height ) : void
width float
height float
리턴 void

UITextEdit() 공개 메소드

public UITextEdit ( ) : System
리턴 System

Update() 공개 메소드

public Update ( UpdateState state ) : void
state FSO.Common.Rendering.Framework.Model.UpdateState
리턴 void

m_Slider_OnChange() 공개 메소드

public m_Slider_OnChange ( UIElement element ) : void
element FSO.Client.UI.Framework.UIElement
리턴 void

프로퍼티 상세

TextMargin 공개적으로 프로퍼티

public Rectangle,Microsoft.Xna.Framework TextMargin
리턴 Microsoft.Xna.Framework.Rectangle