Пример #1
0
        protected override void LoadComplete()
        {
            base.LoadComplete();

            GlobalKeyBindingInputManager globalBinding;

            CursorOverrideContainer = new CursorOverrideContainer {
                RelativeSizeAxes = Axes.Both
            };
            CursorOverrideContainer.Child = globalBinding = new GlobalKeyBindingInputManager(this)
            {
                RelativeSizeAxes = Axes.Both,
                Child            = content = new OsuTooltipContainer(CursorOverrideContainer.Cursor)
                {
                    RelativeSizeAxes = Axes.Both 
                }
            };

            base.Content.Add(new DrawSizePreservingFillContainer {
                Child = CursorOverrideContainer
            });

            KeyBindingStore.Register(globalBinding);
            dependencies.Cache(globalBinding);

            // TODO: This is temporary until we reimplement the local FPS display.
            // It's just to allow end-users to access the framework FPS display without knowing the shortcut key.
            fpsDisplayVisible = LocalConfig.GetBindable <bool>(OsuSetting.ShowFpsDisplay);
            fpsDisplayVisible.ValueChanged += val => { FrameStatisticsMode = val ? FrameStatisticsMode.Minimal : FrameStatisticsMode.None; };
            fpsDisplayVisible.TriggerChange();
        }
Пример #2
0
        private void load(RulesetStore rulesets, GlobalKeyBindingInputManager global)
        {
            AddSection(new GlobalKeyBindingsSection(global, "Global"));

            foreach (var ruleset in rulesets.AllRulesets)
            {
                AddSection(new RulesetBindingsSection(ruleset));
            }
        }
Пример #3
0
        protected override void LoadComplete()
        {
            base.LoadComplete();

            base.Content.Add(inputManager = new GlobalKeyBindingInputManager(Host.Storage)
            {
                Child = new BasicContextMenuContainer
                {
                    RelativeSizeAxes = Axes.Both,
                    Child            = content = new Container
                    {
                        RelativeSizeAxes = Axes.Both,
                        Children         = new Drawable[]
                        {
                            new Console
                            {
                                Depth            = -1,
                                RelativeSizeAxes = Axes.Both
                            }
                        }
                    }
                }
            });
        }
Пример #4
0
 public InGameKeyBindingsSubsection(GlobalKeyBindingInputManager manager) : base(null)
 {
     Defaults = manager.InGameKeyBindings;
 }
Пример #5
0
 public GlobalKeyBindingsSection(GlobalKeyBindingInputManager manager)
 {
     Add(new DefaultBindingsSubsection(manager));
     Add(new InGameKeyBindingsSubsection(manager));
 }