示例#1
0
        public ControlsOptionsMenuScreen()
            : base("Controls")
        {
            foreach (var controlSetting in SettingsManager.Instance.Controls)
            {
                var menuEntry = new KeySelectMenuEntry(controlSetting.Key, controlSetting.Value);
                menuEntry.KeySelectionFinished += OnKeySelectionFinished;
                menuEntry.Entered += OnKeySelectionStart;
                MenuEntries.Add(menuEntry);
            }

            var backMenuEntry = new MenuEntry("Back");
            backMenuEntry.Entered += OnCancel;
            MenuEntries.Add(backMenuEntry);
        }
示例#2
0
 void OnKeySelectionStart(object sender, EventArgs e)
 {
     _activeMenuEntry = (KeySelectMenuEntry) sender;
 }
示例#3
0
 void OnKeySelectionFinished(object sender, EventArgs e)
 {
     _activeMenuEntry = null;
 }