Пример #1
0
 /// <summary>
 /// Processes the current keystate to set a keybinding.
 /// </summary>
 /// <param name="currentState"></param>
 internal void ProcessKey(Microsoft.Xna.Framework.Input.KeyboardState currentState)
 {
     foreach (TabPage tp in tcControlGroups.Controls)
     {
         // if the tab page is one of the custom tab pages (should always be the case)
         if (tp is FlowLayoutTabPage)
         {
             // make it so
             FlowLayoutTabPage fltp = tp as FlowLayoutTabPage;
             // in case this tab page contains the active keybinding control needing to set its binding.
             fltp.ProcessKey(currentState);
         }
     }
 }
Пример #2
0
        /// <summary>
        /// Adds controls (custom tab pages containing keybindingControls) for displaying each keybinding
        /// </summary>
        public void AddKeyBindingGuiControls()
        {
            for (int kmi = 0; kmi < keyMaps.keyMaps.Count; kmi++)
            {
                FlowLayoutTabPage fltp = new FlowLayoutTabPage();
                tcControlGroups.TabPages.Add(fltp);
                KeyMap km = keyMaps.keyMaps.Values[kmi];
                fltp.Text = km.Alias;
                foreach (Input.KeyBinding kb in km.KeyBindings.Values)
                {
                    KeyBindingControl kbc = new KeyBindingControl(kb);

                    fltp.AddControl(kbc);
                }
            }
        }
Пример #3
0
        /// <summary>
        /// Adds controls (custom tab pages containing keybindingControls) for displaying each keybinding
        /// </summary>
        public void AddKeyBindingGuiControls()
        {
            for (int kmi = 0; kmi < keyMaps.keyMaps.Count; kmi++)
            {
                FlowLayoutTabPage fltp = new FlowLayoutTabPage();
                tcControlGroups.TabPages.Add(fltp);
                KeyMap km = keyMaps.keyMaps.Values[kmi];
                fltp.Text = km.Alias;
                foreach (Input.KeyBinding kb in km.KeyBindings.Values)
                {
                    KeyBindingControl kbc = new KeyBindingControl(kb);

                    fltp.AddControl(kbc);
                }
            }
        }