This is implemented on top of TextSurface, and isn't really nice to render custom text, ie a cursor. Moreover, some problems may exists when user mix special keys and text, especially when the framerate is low (because special keys are not treated in the order they were typed). More...
#include <InputTextSurface.hh>
Inheritance diagram for InputTextSurface:

Public Member Functions | |
| InputTextSurface (const std::string &font_name, int surf_width) | |
| void | acquireInput (const std::string &lock_id) |
| Get exclusive usage of the keyboard, and begin to grab text. | |
| bool | isAcquireFinished () const |
| User has finished to type text. | |
| void | resetAcquire () |
| Reset the IsAcquireFinished function. | |
| virtual void | update () |
| Method called each frame, to perfom user custom code. | |
Protected Member Functions | |
| virtual void | customTextRender (SDL_Surface *surf, int line) |
| Called when a new text surface is generated. | |
This is implemented on top of TextSurface, and isn't really nice to render custom text, ie a cursor. Moreover, some problems may exists when user mix special keys and text, especially when the framerate is low (because special keys are not treated in the order they were typed).
| void InputTextSurface::update | ( | ) | [virtual] |
Method called each frame, to perfom user custom code.
You should override it.
Since a parent is assigned to the surface (and this parent is itself attached by other means to the root screen), this method is called at each frame. It is not called if this surface or one of its parent is disabled. In this method you can do what you want with your object, like processing input, updating other programs attributes, changing surface property, ...
Reimplemented from TextSurface.
1.4.7