Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Games
KPat
Commits
766f52a3
Commit
766f52a3
authored
Aug 31, 2020
by
Willyanto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pressing alt+G and Enter/Return redeals current game
BUG: 408931
parent
93b72a36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
gameselectionscene.cpp
gameselectionscene.cpp
+8
-3
gameselectionscene.h
gameselectionscene.h
+1
-0
No files found.
gameselectionscene.cpp
View file @
766f52a3
...
...
@@ -356,9 +356,14 @@ void GameSelectionScene::keyReleaseEvent( QKeyEvent * event )
++
m_selectionIndex
;
m_boxes
.
at
(
m_selectionIndex
)
->
setHighlighted
(
true
);
}
else
if
(
(
event
->
key
()
==
Qt
::
Key_Return
||
event
->
key
()
==
Qt
::
Key_Enter
||
event
->
key
()
==
Qt
::
Key_Space
)
}
void
GameSelectionScene
::
keyPressEvent
(
QKeyEvent
*
event
)
{
if
(
(
event
->
key
()
==
Qt
::
Key_Return
||
event
->
key
()
==
Qt
::
Key_Enter
||
event
->
key
()
==
Qt
::
Key_Space
)
&&
m_selectionIndex
!=
-
1
)
{
Q_EMIT
gameSelected
(
m_boxes
.
at
(
m_selectionIndex
)
->
id
()
);
...
...
gameselectionscene.h
View file @
766f52a3
...
...
@@ -39,6 +39,7 @@ Q_SIGNALS:
protected:
void
keyReleaseEvent
(
QKeyEvent
*
event
)
override
;
void
keyPressEvent
(
QKeyEvent
*
event
)
override
;
private
Q_SLOTS
:
void
boxHoverChanged
(
GameSelectionBox
*
box
,
bool
hovered
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment