[longomatch] Support tagging players from a keypad



commit f62ffd6b8fb5524b60e1733aa6cb7533009fa2c7
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Wed Feb 4 12:46:02 2015 +0100

    Support tagging players from a keypad

 LongoMatch.Services/Services/HotKeysManager.cs |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.Services/Services/HotKeysManager.cs b/LongoMatch.Services/Services/HotKeysManager.cs
index 26a28ad..20a719a 100644
--- a/LongoMatch.Services/Services/HotKeysManager.cs
+++ b/LongoMatch.Services/Services/HotKeysManager.cs
@@ -225,6 +225,9 @@ namespace LongoMatch.Services
                                } else if (inPlayerTagging) {
                                        int number;
                                        string name = Keyboard.NameFromKeyval ((uint)key.Key);
+                                       if (name.StartsWith ("KP_")) {
+                                               name = name.Replace ("KP_", "");
+                                       }
                                        if (int.TryParse (name, out number)) {
                                                playerNumber += number.ToString ();
                                                timer.Change (TIMEOUT_MS, 0);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]