Difference between revisions of "DisplayMBString"

From WikiPrizm
Jump to navigationJump to search
Line 2: Line 2:
 
{{syscall
 
{{syscall
 
| name = DisplayMBString
 
| name = DisplayMBString
 +
| index = 0x121D
 +
| header = fxcg/keyboard.h
 
| signature = void DisplayMBString(unsigned char *buffer, int start, int cursor, int x, int y)
 
| signature = void DisplayMBString(unsigned char *buffer, int start, int cursor, int x, int y)
| synopsis = Draws a string for manual single-line text editing.  A blinking cursor is provided and the string does not wrap.
+
| synopsis = Draws a multi-byte string for manual single-line text editing.  A blinking cursor is provided and the string does not wrap.
 
| parameters =
 
| parameters =
* '''buffer''' - A text string that will be displayed - can be constant
+
* '''buffer''' - A multi-byte (i.e., supports special characters) text string that will be displayed, can be constant.
* '''start''' - Location of the first character to display.  0 is the beginning of the string, >0 will shift the string to the left. If <code>'''cursor'''>'''start'''</code> then the location of the first character will be <code>'''cursor'''</code>
+
* '''start''' - Location of the first character to display.  0 is the beginning of the string, >0 will shift the string to the left. If <code>'''cursor'''>'''start'''</code> then the location of the first character will be <code>'''cursor'''</code>.
 
* '''cursor''' - Location of the cursor from the start of the string.  This is absolute and is from the start of the displayed text ('''cursor''' of 3 and '''start''' of 2, the cursor is located after the first character displayed, not after the third).  0 is before the first character.
 
* '''cursor''' - Location of the cursor from the start of the string.  This is absolute and is from the start of the displayed text ('''cursor''' of 3 and '''start''' of 2, the cursor is located after the first character displayed, not after the third).  0 is before the first character.
* '''x''' - X location to draw the string, similar to [[PrintXY]].
+
* '''x''' - X location to draw the string in "homescreen" coordinates, similar to [[PrintXY]].
* '''y''' - Y location to draw the string, similar to [[PrintXY]].
+
* '''y''' - Y location to draw the string in "homescreen" coordinates, similar to [[PrintXY]].
| comments = Function is non-blocking, meant for manual string entry. Cursor blinking cannot be moved unless this function is re-called with updated '''cursor'''.
+
| comments = Function is non-blocking, meant for manual string entry. String editing has to be done with other function(s) like the conjunction of [[EditMBStringCtrl]] and [[EditMBStringChar]]. Cursor blinking cannot be moved unless this function is re-called with updated '''cursor'''.
  
 
Result of setting '''cursor''' out of bounds has not been tested, overflow characters are not drawn.
 
Result of setting '''cursor''' out of bounds has not been tested, overflow characters are not drawn.
 
}}
 
}}

Revision as of 10:07, 31 July 2014

This page's documentation is not complete and is based off of preliminary testing. There may be errors in the documentation or the naming conventions may not be completely agreed upon.


Synopsis

Header: fxcg/keyboard.h
Syscall index: 0x121D
Function signature: void DisplayMBString(unsigned char *buffer, int start, int cursor, int x, int y)

Draws a multi-byte string for manual single-line text editing. A blinking cursor is provided and the string does not wrap.

Parameters

  • buffer - A multi-byte (i.e., supports special characters) text string that will be displayed, can be constant.
  • start - Location of the first character to display. 0 is the beginning of the string, >0 will shift the string to the left. If cursor>start then the location of the first character will be cursor.
  • cursor - Location of the cursor from the start of the string. This is absolute and is from the start of the displayed text (cursor of 3 and start of 2, the cursor is located after the first character displayed, not after the third). 0 is before the first character.
  • x - X location to draw the string in "homescreen" coordinates, similar to PrintXY.
  • y - Y location to draw the string in "homescreen" coordinates, similar to PrintXY.

Comments

Function is non-blocking, meant for manual string entry. String editing has to be done with other function(s) like the conjunction of EditMBStringCtrl and EditMBStringChar. Cursor blinking cannot be moved unless this function is re-called with updated cursor.

Result of setting cursor out of bounds has not been tested, overflow characters are not drawn.