Enable hiding the Server QR-Code Popup

This commit is contained in:
Flamefire committed 2014-08-09 14:35:03 +02:00
1 parent 51a5165308
commit 62675821ed
2 files changed
+15 -3

No files matched your search

+1 -2
View File
@@ -348,8 +348,7 @@ namespace Vocaluxe.Base
if (!eventsAvailable)
keyEvent = inputKeyEvent;
if (keyEvent.Key == Keys.Left || keyEvent.Key == Keys.Right || keyEvent.Key == Keys.Up || keyEvent.Key == Keys.Down || keyEvent.Key == Keys.NumPad0 ||
keyEvent.Key == Keys.D0)
if (keyEvent.IsArrowKey() || keyEvent.Key == Keys.NumPad0 || keyEvent.Key == Keys.D0)
{
_Cursor.Deactivate();
+14 -1
View File
@@ -15,6 +15,7 @@
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Windows.Forms;
using Vocaluxe.Base;
using Vocaluxe.Base.Server;
using VocaluxeLib;
@@ -75,7 +76,7 @@ namespace Vocaluxe.Screens
public override bool HandleMouse(SMouseEvent mouseEvent)
{
if (mouseEvent.LB)
if (mouseEvent.LB || mouseEvent.RB)
{
CGraphics.HidePopup(EPopupScreens.PopupServerQR);
return true;
@@ -83,6 +84,18 @@ namespace Vocaluxe.Screens
return false;
}
public override bool HandleInput(SKeyEvent keyEvent)
{
switch (keyEvent.Key)
{
case Keys.Escape:
case Keys.Back:
CGraphics.HidePopup(EPopupScreens.PopupServerQR);
return true;
}
return base.HandleInput(keyEvent);
}
public override bool UpdateGame()
{
return true;