Exemplo n.º 1
0
Arquivo: ui.cpp Projeto: JickLee/Core
bool UI::keyPress(SDL_KeyboardEvent *e) {

    UIElement* selected = getSelected();

    if(!selected) return false;

    if(e->keysym.unicode == SDLK_ESCAPE) {
        deselect();
        return selected->isEditable();
    }

    char c = toChar(e);

    return selected->keyPress(e, c);
}