protected override void KeyDown(object sender, KeyboardKeyEventArgs e) { LauncherTableWidget table = (LauncherTableWidget)widgets[tableIndex]; if (e.Key == Key.Enter) { if (table.Count == 1 && String.IsNullOrEmpty(Get(hashIndex))) { widgets[hashIndex].Text = table.usedEntries[0].Hash; ConnectToServer(0, 0); } else { base.KeyDown(sender, e); } } else if (e.Key == Key.Up) { table.SetSelected(table.SelectedIndex - 1); table.NeedRedraw(); } else if (e.Key == Key.Down) { table.SetSelected(table.SelectedIndex + 1); table.NeedRedraw(); } else { base.KeyDown(sender, e); } }
protected override void RedrawLastInput() { base.RedrawLastInput(); if (lastInput != widgets[hashIndex]) { return; } LauncherTableWidget table = (LauncherTableWidget)widgets[tableIndex]; table.SetSelected(widgets[hashIndex].Text); Resize(); }