Qt: Merge findFocus from master

This commit is contained in:
Jeffrey Pfau 2015-01-05 04:21:56 -08:00
parent 388c94a569
commit 13de6dfdc7
2 changed files with 15 additions and 0 deletions

View File

@ -179,6 +179,20 @@ void GBAKeyEditor::save() {
m_controller->saveConfiguration(m_type);
}
bool GBAKeyEditor::findFocus() {
if (m_currentKey != m_keyOrder.end() && (*m_currentKey)->hasFocus()) {
return true;
}
for (auto key = m_keyOrder.begin(); key != m_keyOrder.end(); ++key) {
if ((*key)->hasFocus()) {
m_currentKey = key;
return true;
}
}
return false;
}
#ifdef BUILD_SDL
void GBAKeyEditor::testGamepad() {
QSet<int> activeKeys = m_controller->activeGamepadButtons();

View File

@ -31,6 +31,7 @@ protected:
private slots:
void setNext();
void save();
bool findFocus();
#ifdef BUILD_SDL
void testGamepad();
#endif