#include <TextSelection.h>
Inheritance diagram for TextSelection:
Public Member Functions | |
TextSelection (const string &label, const string &name, vector< string > &choices, Font *font) | |
void | load (ifstream &file) |
void | save (ofstream &file) |
void | draw (float x, float y, float zoom) |
Type | getType () |
float | getWidth (float zoom) |
float | getHeight (float zoom) |
string & | getName () |
unsigned int | getSelection () |
bool | handleKeyEvent (SDL_Event *event) |
Definition at line 17 of file TextSelection.h.
|
lable is the name the user can see on screen. choices is a vector containing the text strings the user can select. name is the name of the TextEntry in the config file. font is the Font to use when rendering. Definition at line 6 of file TextSelection.cpp. |
|
Draws the MenuItem at x,y with a zoom factor of zoom (2 equals double size). The MenuItem may decide not to apply the scale or to only support some zoom steps, always check getWidth and getHeight if you need the excact size. Implements MenuItem. Definition at line 31 of file TextSelection.cpp. |
|
Returns the height of this MenuItem at zoom factor zoom, must be excact Implements MenuItem. Definition at line 41 of file TextSelection.cpp. |
|
Returns the name of the MenuItem used when save is called. The name may not contain a =. Implements MenuItem. Definition at line 36 of file TextSelection.h. |
|
Returns the number of the text string the user has selected. Index 0. Definition at line 38 of file TextSelection.h. |
|
Returns the Type of this control. Implements MenuItem. Definition at line 33 of file TextSelection.h. |
|
Returns the width of this MenuItem at zoom factor zoom, must be excact Implements MenuItem. Definition at line 36 of file TextSelection.cpp. |
|
Called when a key press/release event occurs, return true if the MenuItem has handled the event. If true is returned the event handling will stop. Implements MenuItem. Definition at line 46 of file TextSelection.cpp. |
|
Reads the configuration for the MenuItem from any position within the file Hint: Use findLoadPosition to find you entry in the file Reimplemented from MenuItem. Definition at line 19 of file TextSelection.cpp. |
|
Saves the MenuItem at the current position in the file. Entrys must look like "name=value\n". Reimplemented from MenuItem. Definition at line 26 of file TextSelection.cpp. |