示例#1
0
        private void SetupGui()
        {
            var fontSystem = FontSystemFactory.Create(GraphicsDevice, 2048, 2048);

            fontSystem.AddFont(File.ReadAllBytes("Content/Fonts/Goldman-Regular.ttf"));
            GuiHelper.Setup(this, fontSystem);
            _screen = new ScreenPanel {
                Layout = new LayoutVerticalCenter()
            };
            _focus         = new ComponentFocus(_screen, Default.ConditionPrevFocus, Default.ConditionNextFocus);
            _menuGuiModule = new GuiModule(_focus);
            Components.Add(_menuGuiModule);
        }
示例#2
0
        public Menu()
        {
            _grabFocus = c => {
                _menuFocus.Focus = c;
            };

            MenuPanel mp = new MenuPanel();

            mp.Layout = new LayoutVerticalCenter();
            mp.Add(deviceSelectMenu());

            _menuFocus = new ComponentFocus(mp, Default.ConditionPrevFocus, Default.ConditionNextFocus);
        }
示例#3
0
 public GuiModule(ComponentFocus componentFocus)
 {
     _componentFocus = componentFocus;
 }