From 51ff8587d3a008e9c4867b18034640f58063d4a8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 3 Apr 2012 02:29:24 +0300 Subject: Fix npc menu item selection with keyboard. --- src/gui/npcdialog.cpp | 3 +++ src/keyboarddata.h | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp index 39af0c71d..5e0e9d56f 100644 --- a/src/gui/npcdialog.cpp +++ b/src/gui/npcdialog.cpp @@ -94,6 +94,9 @@ NpcDialog::NpcDialog(int npcId) : // Setup listbox mItemList = new ListBox(this); mItemList->setWrappingEnabled(true); + mItemList->setActionEventId("ok"); + mItemList->addActionListener(this); + setContentSize(260, 175); mListScrollArea = new ScrollArea(mItemList); diff --git a/src/keyboarddata.h b/src/keyboarddata.h index 2fd4b7087..825da9e57 100644 --- a/src/keyboarddata.h +++ b/src/keyboarddata.h @@ -207,7 +207,6 @@ static KeyData const keyData[KeyboardConfig::KEY_TOTAL] = { {"keyQuit", SDLK_ESCAPE, N_("Quit"), KeyboardConfig::GRP_DEFAULT, -// nullptr, &ActionManager::quit, KeyboardConfig::KEY_NO_VALUE, 50, COND_DEFAULT}, -- cgit v1.2.3-70-g09d2