00001
00002
#ifndef MOD_TEXTSELECTION_H
00003
#define MOD_TEXTSELECTION_H
00004
00005
00006
00007
00008
#include "MenuItem.h"
00009
#include "Font.h"
00010
#include <string>
00011
#include <vector>
00012
00013
using namespace std;
00014
00015
00016
00017 class TextSelection :
public MenuItem
00018 {
00019
public:
00020
00021
00022
00023
00024
00025
00026
00027
00028
TextSelection(
const string &label,
const string &name, vector<string> &choices,
Font *font);
00029 ~
TextSelection();
00030
void load(ifstream &file);
00031
void save(ofstream &file);
00032
void draw(
float x,
float y,
float zoom);
00033 Type
getType(){
return CONTROL;}
00034
float getWidth(
float zoom);
00035
float getHeight(
float zoom);
00036 string &
getName(){
return name_;}
00037
00038 unsigned int getSelection(){
return currentSelection_;}
00039
bool handleKeyEvent(SDL_Event *event);
00040
private:
00041 string label_;
00042 string name_;
00043 vector<string> choices_;
00044
Font *font_;
00045
unsigned int currentSelection_;
00046 };
00047
00048
00049
#endif