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); }
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); }
public GuiModule(ComponentFocus componentFocus) { _componentFocus = componentFocus; }