Skip to content

Commit

Permalink
Sailfish: Make a way to exit the menu by tapping near screen edge
Browse files Browse the repository at this point in the history
  • Loading branch information
celeron55 committed Jan 4, 2014
1 parent 7e8adf3 commit ba748ed
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/guiFormSpecMenu.cpp
Expand Up @@ -2359,6 +2359,20 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
{
// Mouse event other than movement

#ifdef SAILFISH
{
// Make a way to exit the menu by tapping near screen edge
video::IVideoDriver* driver = Environment->getVideoDriver();
v2u32 screenSize = driver->getScreenSize();
if((event.MouseInput.X < (int)screenSize.X / 8 &&
event.MouseInput.Y > 100)||
event.MouseInput.X > (int)screenSize.X - screenSize.X / 8){
quitMenu();
return true;
}
}
#endif

// Get selected item and hovered/clicked item (s)

updateSelectedItem();
Expand Down

0 comments on commit ba748ed

Please sign in to comment.