1 #include <SDL_keysym.h>
3 #include <msp/gl/texture.h>
10 Input::Input(Designer &d, const string &t, const string &e):
17 void Input::key_press(unsigned key, unsigned, wchar_t ch)
21 else if(key==SDLK_ESCAPE)
23 else if(key==SDLK_BACKSPACE)
31 else if(key==SDLK_DELETE)
36 else if(key==SDLK_LEFT)
41 else if(key==SDLK_RIGHT)
48 text.insert(pos, 1, ch);
56 glTranslatef(300, 450, 0);
58 GL::Texture::unbind();
59 glColor4f(0.7, 0.7, 0.7, 0.9);
67 glColor4f(0, 0, 0, 1);
68 glTranslatef(5, 35, 0);
72 designer.get_font().draw_string(title);
75 glTranslatef(0, -30, 0);
78 designer.get_font().draw_string(text);
80 glTranslatef(designer.get_font().get_string_width(text.substr(0, pos)), 0, 0);
81 glDisable(GL_TEXTURE_2D);