private void appendConnectionList(List <KeymapInput> list, Keymap keymap, int wiimote, bool defaultKeymap, Panel container) { foreach (KeymapInput input in list) { KeymapOutConfig config = keymap.getConfigFor(wiimote, input.Key); if (config != null) { KeymapConnectionRow row = new KeymapConnectionRow(input, config, defaultKeymap); row.OnConfigChanged += connectionRow_OnConfigChanged; row.OnDragStart += output_OnDragStart; row.OnDragStop += output_OnDragStop; container.Children.Add(row); } } }
private void rClear_MouseUp(object sender, MouseButtonEventArgs e) { if (this.config.Stack.Count == 1) { if (this.fromDefault) { this.SetConfig(new KeymapOutConfig(KeymapDatabase.Current.getDisableOutput(), false)); } else { Keymap defaultKeymap = KeymapDatabase.Current.getDefaultKeymap(); this.config.Stack = defaultKeymap.getConfigFor(0, this.input.Key).Stack; this.config.Inherited = true; this.SetConfig(this.config); } } else if (this.config.Stack.Count > 1) { this.config.Stack.RemoveAt(this.config.Stack.Count - 1); this.SetConfig(this.config); } }
private void appendConnectionList(List<KeymapInput> list, Keymap keymap, int wiimote, bool defaultKeymap, Panel container) { foreach (KeymapInput input in list) { KeymapOutConfig config = keymap.getConfigFor(wiimote, input.Key); if (config != null) { KeymapConnectionRow row = new KeymapConnectionRow(input, config, defaultKeymap); row.OnConfigChanged += connectionRow_OnConfigChanged; row.OnDragStart += output_OnDragStart; row.OnDragStop += output_OnDragStop; container.Children.Add(row); } } }