There is no spoon
UE3:UIComp_DrawStringEditbox (UDK)
Object >> Component >> UIComponent >> UIComp_DrawComponents >> UIComp_DrawString >> UIComp_DrawStringEditbox |
Contents
- Package:
- Engine
- Within class:
- UIEditBox
- Implemented interfaces:
- UIStyleResolver
- This class in other games:
- UT3
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
This specialized version of UIComp_DrawString handles rendering UIStrings for editboxes. The responsibilities specific to rendering text in editboxes are: 1. A caret must be rendered at the appropriate location in the string 2. Ensuring that the text surrounding the caret is always visible 3. Tracking the text that was typed by the user independently from the data source that the owning widget is bound to.
Todo: register this component with the data store for the caret image node so that it receives the refreshdatastore callback
Properties[edit]
Property group 'Appearance'[edit]
StringCaret[edit]
Type: UIRoot.UIStringCaretParameters
Controls whether and how a caret is displayed
Default value:
Member | Value |
---|---|
CaretStyle | 'DefaultCaretStyle' |
CaretWidth | 1.0 |
Internal variables[edit]
bRecalculateFirstCharacter[edit]
Type: bool
Modifiers: const, transient
indicates that the FirstCharacterPosition needs to be re-evaluated the next time the string is reformatted
CaretNode[edit]
Type: pointer{struct FUIStringNode_Image}
Modifiers: const, native, private, transient
the image node that is used for rendering the caret
CaretOffset[edit]
Type: float
Modifiers: const, transient
the offset (in pixels) from the left edge of the editbox's bounding region for rendering the caret
FirstCharacterPosition[edit]
Type: int
Modifiers: const, private, transient
the position of the first visible character in the editbox
SelectionBackgroundColor[edit]
Type: Object.LinearColor
Modifiers: config
the color to use for the background of a selected text block
Default value:
Member | Value |
---|---|
A | 0.6 |
B | 0.019608 |
G | 0.12549 |
R | 0.654901 |
SelectionRegion[edit]
Type: UIStringSelectionRegion
Modifiers: transient
the editbox's selected text
SelectionTextColor[edit]
Type: Object.LinearColor
Modifiers: config
the color to use for selected text
Default value:
Member | Value |
---|---|
A | 1.0 |
B | 1.0 |
G | 1.0 |
R | 1.0 |
UserText[edit]
Type: string
Modifiers: private, transient
Contains the text that the user has typed into the editbox
Default values[edit]
Property | Value | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
StringStyle |
|
||||||||||
TextStyleCustomization |
|
Structs[edit]
UIStringSelectionRegion[edit]
Modifiers: native, transient
Defines a range of selected text in a UIString.
Default values:
Property | Value |
---|---|
SelectionEndCharIndex | 0 |
SelectionStartCharIndex | 0 |
Native functions[edit]
ClearSelection[edit]
Clears the current selection region.
Returns:
- TRUE if the selection was cleared successfully.
GetSelectedText[edit]
Returns:
- the string that is currently selected.
GetSelectionRange[edit]
Retrieves the indexes of start and end characters of the selection region.
Parameters:
- out_startIndex - receives the index for the beginning of the selection region (guaranteed to be less than out_EndIndex)
- out_EndIndex - recieves the index for the end of the selection region.
Returns:
- TRUE if the selection region is valid.
GetUserTextLength[edit]
Returns the length of UserText
SetSelectionEnd[edit]
Sets the ending character for the selection region.
Parameters:
- EndIndex - the index of the character that should become the end of the selection region.
Returns:
- TRUE if the selection's ending index was changed successfully.
SetSelectionRange[edit]
Change the range of selected characters in this editbox.
Parameters:
- StartIndex - the index of the first character that should be selected.
- EndIndex - the index of the last character that should be selected.
Returns:
- TRUE if the selection was changed successfully.
SetSelectionStart[edit]
Sets the starting character for the selection region.
Parameters:
- StartIndex - the index of the character that should become the start of the selection region.
Returns:
- TRUE if the selection's starting index was changed successfully.
SetUserText[edit]
Changes the value of UserText to the specified text without affecting the
SetUserText should be used for modifying the "input text"; that is, the text that would potentially be published to the data store this editbox is bound to. SetValue should be used to change the raw string that will be parsed by the underlying UIString. UserText will be set to the resolved value of the parsed string.
Parameters:
- NewText - the new text that should be displayed
Returns:
- TRUE if the value changed.