コード例 #1
0
ファイル: OsuGameBase.cs プロジェクト: iamerroralpha/osu
        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
ファイル: KeyBindingOverlay.cs プロジェクト: tgi74/osu
        private void load(RulesetStore rulesets, GlobalKeyBindingInputManager global)
        {
            AddSection(new GlobalKeyBindingsSection(global, "Global"));

            foreach (var ruleset in rulesets.AllRulesets)
            {
                AddSection(new RulesetBindingsSection(ruleset));
            }
        }
コード例 #3
0
ファイル: ArborBaseGame.cs プロジェクト: jorolf/baumRPE
        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));
 }