public static Command getCommandByKey(char _key) { int functionId = 0; Command command = new Applicazione.Commands.CommandNotFound(); ParametriUtente.keybind.TryGetValue(_key, out functionId); ParametriUtente.relatedFunction.TryGetValue(functionId, out command); return(command); }
public static void printKeybinds() { Dictionary <char, int> .Enumerator keybindEnum; keybindEnum = ParametriUtente.keybind.GetEnumerator(); while (keybindEnum.MoveNext()) { KeyValuePair <char, int> current = keybindEnum.Current; Command function = new Applicazione.Commands.CommandNotFound(); ParametriUtente.relatedFunction.TryGetValue(current.Value, out function); UI.GameUIHandler.Write("Tasto: " + current.Key + " con funzione:(n°:" + current.Value + ")" + function.getName()); } }