diff options
Diffstat (limited to 'Plugins/MonoGame.Extended/source/MonoGame.Extended.Gui/Controls/Form.cs')
-rw-r--r-- | Plugins/MonoGame.Extended/source/MonoGame.Extended.Gui/Controls/Form.cs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Plugins/MonoGame.Extended/source/MonoGame.Extended.Gui/Controls/Form.cs b/Plugins/MonoGame.Extended/source/MonoGame.Extended.Gui/Controls/Form.cs new file mode 100644 index 0000000..97b984d --- /dev/null +++ b/Plugins/MonoGame.Extended/source/MonoGame.Extended.Gui/Controls/Form.cs @@ -0,0 +1,42 @@ +using System.Linq; +using MonoGame.Extended.Input.InputListeners; +using Microsoft.Xna.Framework.Input; + +namespace MonoGame.Extended.Gui.Controls +{ + //public class Form : StackPanel + //{ + // public Form() + // { + // } + + // public override bool OnKeyPressed(IGuiContext context, KeyboardEventArgs args) + // { + // if (args.Key == Keys.Tab) + // { + // var controls = FindControls<Control>(); + // var index = controls.IndexOf(context.FocusedControl); + // if (index > -1) + // { + // index++; + // if (index >= controls.Count) index = 0; + // context.SetFocus(controls[index]); + // return true; + // } + // } + + // if (args.Key == Keys.Enter) + // { + // var controls = FindControls<Submit>(); + // if (controls.Count > 0) + // { + // var submit = controls.FirstOrDefault(); + // submit.TriggerClicked(); + // return true; + // } + // } + + // return base.OnKeyPressed(context, args); + // } + //} +} |