/// <summary> /// Initializes a new instance of the <see cref="GameScreenBase"/> class. /// </summary> /// <param name="rootDirectory">The root directory of the panel's local content manager.</param> /// <param name="definitionAsset">The asset path of the screen's definition file.</param> /// <param name="globalContent">The content manager with which to load globally-available assets.</param> /// <param name="uiScreenService">The screen service which created this screen.</param> public GameScreenBase(String rootDirectory, String definitionAsset, ContentManager globalContent, UIScreenService uiScreenService) : base(rootDirectory, definitionAsset, globalContent) { Contract.Require(uiScreenService, "uiScreenService"); this.uiScreenService = uiScreenService; }
public ExampleScreen(ContentManager globalContent, UIScreenService uiScreenService) : base("Content/UI/Screens/ExampleScreen", "ExampleScreen", globalContent) { Contract.Require(uiScreenService, "uiScreenService"); View.SetViewModel(new ExampleViewModel(Ultraviolet)); }
public GameplayScreen(ContentManager globalContent, UIScreenService uiScreenService) : base("Content/UI/Screens/GameplayScreen", "GameplayScreen", globalContent) { Contract.Require(uiScreenService, "uiScreenService"); this.textRenderer = new TextRenderer(); this.blankTexture = GlobalContent.Load<Texture2D>(GlobalTextureID.Blank); this.photograph = GlobalContent.Load<Texture2D>(GlobalTextureID.Photograph); this.font = GlobalContent.Load<SpriteFont>(GlobalFontID.SegoeUI); }
public SampleScreen2(ContentManager globalContent, UIScreenService uiScreenService) : base("Content/UI/Screens/SampleScreen2", "SampleScreen2", globalContent) { Contract.Require(uiScreenService, "uiScreenService"); IsOpaque = true; this.font = LocalContent.Load<SpriteFont>("Garamond"); this.blankTexture = GlobalContent.Load<Texture2D>(GlobalTextureID.Blank); this.textRenderer = new TextRenderer(); }
protected override void OnLoadingContent() { this.content = ContentManager.Create("Content"); LoadContentManifests(content); LoadLocalizationDatabases(content); var screenService = new UIScreenService(content); var screen = screenService.Get<SampleScreen1>(); Ultraviolet.GetUI().GetScreens().Open(screen, TimeSpan.Zero); base.OnLoadingContent(); }
protected override void OnLoadingContent() { this.content = ContentManager.Create("Content"); LoadContentManifests(content); LoadLocalizationDatabases(content); var screenService = new UIScreenService(content); var screen = screenService.Get <SampleScreen1>(); Ultraviolet.GetUI().GetScreens().Open(screen, TimeSpan.Zero); base.OnLoadingContent(); }
public LoadingScreen(ContentManager globalContent, UIScreenService uiScreenService) : base("Content/UI/Screens/LoadingScreen", "LoadingScreen", globalContent) { Contract.Require(uiScreenService, "uiScreenService"); this.uiScreenService = uiScreenService; this.textRenderer = new TextRenderer(); this.blankTexture = GlobalContent.Load <Texture2D>(GlobalTextureID.Blank); this.font = GlobalContent.Load <SpriteFont>(GlobalFontID.SegoeUI); this.spinnerSprite = LocalContent.Load <Sprite>("Spinner"); this.loader = new AsynchronousContentLoader(); this.textRenderer.LayoutEngine.RegisterIcon("spinner", spinnerSprite[0]); UpdateMessage(String.Empty); }
protected override void OnLoadingContent() { this.content = ContentManager.Create("Content"); LoadContentManifests(this.content); LoadLocalizationDatabases(this.content); LoadPresentation(); GC.Collect(2); var screenService = new UIScreenService(content); var screen = screenService.Get<ExampleScreen>(); Ultraviolet.GetUI().GetScreens().Open(screen); base.OnLoadingContent(); }
public LoadingScreen(ContentManager globalContent, UIScreenService uiScreenService) : base("Content/UI/Screens/LoadingScreen", "LoadingScreen", globalContent) { Contract.Require(uiScreenService, "uiScreenService"); this.uiScreenService = uiScreenService; this.textRenderer = new TextRenderer(); this.blankTexture = GlobalContent.Load<Texture2D>(GlobalTextureID.Blank); this.font = GlobalContent.Load<SpriteFont>(GlobalFontID.SegoeUI); this.spinnerSprite = LocalContent.Load<Sprite>("Spinner"); this.loader = new AsynchronousContentLoader(); this.textRenderer.RegisterIcon("spinner", spinnerSprite[0]); UpdateMessage(String.Empty); }
protected override void OnLoadingContent() { this.content = ContentManager.Create("Content"); LoadContentManifests(this.content); LoadLocalizationDatabases(this.content); LoadPresentation(); GC.Collect(2); var screenService = new UIScreenService(content); var screen = screenService.Get <ExampleScreen>(); Ultraviolet.GetUI().GetScreens().Open(screen); base.OnLoadingContent(); }
protected override void OnLoadingContent() { this.content = ContentManager.Create("Content"); LoadContentManifests(); var screenService = new UIScreenService(content); var screen = screenService.Get <LoadingScreen>(); screen.SetContentManager(this.content); screen.AddLoadingStep("Loading, please wait..."); screen.AddLoadingStep(Ultraviolet.GetContent().Manifests["Global"]); screen.AddLoadingDelay(2500); screen.AddLoadingStep("Loading interface..."); screen.AddLoadingStep(screenService.Load); screen.AddLoadingDelay(2500); screen.AddLoadingStep("Reticulating splines..."); screen.AddLoadingDelay(2500); Ultraviolet.GetUI().GetScreens().Open(screen, TimeSpan.Zero); base.OnLoadingContent(); }
protected override void OnLoadingContent() { this.content = ContentManager.Create("Content"); LoadContentManifests(content); LoadLocalizationDatabases(content); var screenService = new UIScreenService(content); var screen = screenService.Get<LoadingScreen>(); screen.SetContentManager(this.content); screen.AddLoadingStep("Loading, please wait..."); screen.AddLoadingStep(Ultraviolet.GetContent().Manifests["Global"]); screen.AddLoadingDelay(2500); screen.AddLoadingStep("Loading interface..."); screen.AddLoadingStep(screenService.Load); screen.AddLoadingDelay(2500); screen.AddLoadingStep("Reticulating splines..."); screen.AddLoadingDelay(2500); Ultraviolet.GetUI().GetScreens().Open(screen, TimeSpan.Zero); base.OnLoadingContent(); }
/// <summary> /// Initializes a new instance of the <see cref="GameMenuScreen"/> class. /// </summary> /// <param name="globalContent">The content manager with which to load globally-available assets.</param> /// <param name="uiScreenService">The screen service which created this screen.</param> public GameMenuScreen(ContentManager globalContent, UIScreenService uiScreenService) : base("Content/UI/Screens/GameMenuScreen", "GameMenuScreen", globalContent, uiScreenService) { }
/// <summary> /// Initializes a new instance of the <see cref="GameScreenBase"/> class. /// </summary> /// <param name="rootDirectory">The root directory of the panel's local content manager.</param> /// <param name="definitionAsset">The asset path of the screen's definition file.</param> /// <param name="globalContent">The content manager with which to load globally-available assets.</param> /// <param name="uiScreenService">The screen service which created this screen.</param> public GameScreenBase(String rootDirectory, String definitionAsset, ContentManager globalContent, UIScreenService uiScreenService) : base(rootDirectory, definitionAsset, globalContent) { Contract.Require(uiScreenService, nameof(uiScreenService)); this.uiScreenService = uiScreenService; }
/// <summary> /// Called when the application is loading content. /// </summary> protected override void OnLoadingContent() { this.content = ContentManager.Create("Content"); if (Ultraviolet.IsRunningInServiceMode) { LoadPresentation(); CompileContent(); CompileBindingExpressions(); Environment.Exit(0); } else { LoadLocalizationDatabases(); LoadInputBindings(); LoadContentManifests(); LoadPresentation(); GC.Collect(2); var screenService = new UIScreenService(content); var screen = screenService.Get<GameMenuScreen>(); Ultraviolet.GetUI().GetScreens().Open(screen); } base.OnLoadingContent(); }
/// <summary> /// Initializes a new instance of the <see cref="GamePlayScreen"/> class. /// </summary> /// <param name="globalContent">The content manager with which to load globally-available assets.</param> /// <param name="uiScreenService">The screen service which created this screen.</param> public GamePlayScreen(ContentManager globalContent, UIScreenService uiScreenService) : base("Content/UI/Screens/GamePlayScreen", "GamePlayScreen", globalContent, uiScreenService) { this.escMenuDialog = new EscMenuDialog(this); }
/// <summary> /// Initializes a new instance of the <see cref="ImGuiScreen"/> class. /// </summary> /// <param name="globalContent">The content manager with which to load globally-available assets.</param> /// <param name="uiScreenService">The screen service which created this screen.</param> public ImGuiScreen(ContentManager globalContent, UIScreenService uiScreenService) : base("Content/UI/Screens/ImGuiScreen", "ImGuiScreen", globalContent, uiScreenService) { }
public ExampleScreen(ContentManager globalContent, UIScreenService uiScreenService) : base("Content/UI/Screens/ExampleScreen", "ExampleScreen", globalContent) { }