C# 클래스 Descent.GUI.InputElement

Takes input from the user and displays everything entered so far. The content can be deleted (character by character) by the backspace key and the value of a specific instance can be read (or set) statically by knowing the instance's key.
상속: GUIElement
파일 보기 프로젝트 열기: nezbo/Descent 1 사용 예제들

공개 메소드들

메소드 설명
Draw ( SpriteBatch draw ) : void
GetInputFrom ( string key ) : string

Gets the current input from a specific input element through it's key. If two input elements share the same key, they will display the same text and always change together.

HandleKeyPress ( Keys key ) : void
InputElement ( Microsoft.Xna.Framework.Game game, string inputName, int x, int y, int width, int height ) : System.Collections.Generic

Create a new input element at the given position and saves the input to its name (key).

SetInput ( string key, string input ) : void

Sets the value for a given key.

메소드 상세

Draw() 공개 메소드

public Draw ( SpriteBatch draw ) : void
draw Microsoft.Xna.Framework.Graphics.SpriteBatch
리턴 void

GetInputFrom() 공개 정적인 메소드

Gets the current input from a specific input element through it's key. If two input elements share the same key, they will display the same text and always change together.
public static GetInputFrom ( string key ) : string
key string The the key for the input element whose input is wanted.
리턴 string

HandleKeyPress() 공개 메소드

public HandleKeyPress ( Keys key ) : void
key Keys
리턴 void

InputElement() 공개 메소드

Create a new input element at the given position and saves the input to its name (key).
public InputElement ( Microsoft.Xna.Framework.Game game, string inputName, int x, int y, int width, int height ) : System.Collections.Generic
game Microsoft.Xna.Framework.Game The current game object.
inputName string The name is used to (internally) save the input and /// to retrieve it externally.
x int The top-left x-coordinate.
y int The top-left x-coordinate.
width int The width of the input element.
height int The height of the input element.
리턴 System.Collections.Generic

SetInput() 공개 정적인 메소드

Sets the value for a given key.
public static SetInput ( string key, string input ) : void
key string The key for the value to set.
input string The new input for the given key.
리턴 void