public EditHotkeyScreen( Game game, Hotkey original )
     : base(game)
 {
     hotkeys = game.InputHandler.Hotkeys;
     origHotkey = original;
     curHotkey = original;
 }
示例#2
0
 static int CompareHotkeys(Hotkey a, Hotkey b)
 {
     return(b.Flags.CompareTo(a.Flags));
 }
        void TextButtonClick( Game game, Widget widget )
        {
            LostFocus();
            ButtonWidget button = (ButtonWidget)widget;

            curHotkey = (Hotkey)button.Metadata;
            origHotkey = curHotkey;
            CreateEditingWidgets();
        }
        void TextButtonClick( Game game, Widget widget, MouseButton mouseBtn )
        {
            if( mouseBtn != MouseButton.Left ) return;
            LostFocus();
            ButtonWidget button = (ButtonWidget)widget;

            curHotkey = (Hotkey)button.Metadata;
            origHotkey = curHotkey;
            CreateEditingWidgets();
        }
示例#5
0
        void TextButtonClick( Game game, Widget widget )
        {
            LostFocus();
            ButtonWidget button = (ButtonWidget)widget;

            if( button.Metadata != null ) {
                curHotkey = (Hotkey)button.Metadata;
                origHotkey = curHotkey;
                // do stuff here
                CreateEditingWidgets();
            }
        }