public override void LoadContent() { base.LoadContent(); int x = 0; int y = 0; Viewport viewport = this.ScreenManager.GraphicsDevice.Viewport; int width = viewport.Width; viewport = this.ScreenManager.GraphicsDevice.Viewport; int height = viewport.Height; this.Fullscreen = new Rectangle(x, y, width, height); if (this.StopsMusic) { MediaPlayer.Stop(); } PostProcessor.EndingSequenceFlashOutActive = false; PostProcessor.EndingSequenceFlashOutPercentageComplete = 0.0f; PostProcessor.dangerModeEnabled = false; if (!this.IsDLCDemoScreen) { return; } this.pointEffect.Init(this.ScreenManager.Game.Content); this.pointEffect.GravityConstant = 2E-05f; this.pointEffect.GlowScaleMod = 5f; this.pointEffect.CircleTex = this.ScreenManager.Game.Content.Load <Texture2D>("NodeCircle"); this.pointEffect.NodeColor = Utils.AddativeRed * 0.5f; this.pointEffect.Explode(300); this.pointEffect.timeRemainingWithoutAttract = 2f; this.pointEffect.LineTexture = Utils.gradientLeftRight; this.pointEffect.LineLengthPercentage = 1f; OS.currentInstance.highlightColor = Utils.AddativeRed; this.HexBackground = new HexGridBackground(this.ScreenManager.Game.Content); }
public override void LoadContent() { buttonColor = new Color(124, 137, 149); exitButtonColor = new Color(105, 82, 82); titleColor = new Color(190, 190, 190, 0); titleFont = ScreenManager.Game.Content.Load <SpriteFont>("Kremlin"); canLoad = SaveFileManager.StorageMethods[0].GetSaveManifest().LastLoggedInUser.Username != null; hexBackground = new HexGridBackground(ScreenManager.Game.Content); HookUpCreationEvents(); }
public override void LoadContent() { MainMenu.buttonColor = new Color(124, 137, 149); MainMenu.exitButtonColor = new Color(105, 82, 82); this.titleColor = new Color(190, 190, 190, 0); this.titleFont = this.ScreenManager.Game.Content.Load <SpriteFont>("Kremlin"); this.canLoad = SaveFileManager.StorageMethods[0].GetSaveManifest().LastLoggedInUser.Username != null; this.hexBackground = new HexGridBackground(this.ScreenManager.Game.Content); this.HookUpCreationEvents(); MusicManager.transitionToSong("Music/Ambient/AmbientDrone_Clipped"); Console.WriteLine("Menu load complete"); }
public static void drawMainMenu(PathfinderEvent pathfinderEvent) { DrawMainMenuEvent drawMainMenuEvent = (DrawMainMenuEvent)pathfinderEvent; if (mainMenuState != MainMenuState.PathfinderModList) { return; } drawMainMenuEvent.IsCancelled = true; GameScreen baseS = ((GameScreen)drawMainMenuEvent.MainMenuInstance); try { PostProcessor.begin(); baseS.ScreenManager.FadeBackBufferToBlack(255); GuiData.startDraw(); Rectangle dest = new Rectangle(0, 0, baseS.ScreenManager.GraphicsDevice.Viewport.Width, baseS.ScreenManager.GraphicsDevice.Viewport.Height); Rectangle destinationRectangle = new Rectangle(-20, -20, baseS.ScreenManager.GraphicsDevice.Viewport.Width + 40, baseS.ScreenManager.GraphicsDevice.Viewport.Height + 40); Rectangle dest2 = new Rectangle(dest.X + dest.Width / 4, dest.Height / 4, dest.Width / 2, dest.Height / 4); GuiData.spriteBatch.Draw(Utils.white, destinationRectangle, Color.Black); if (Settings.DrawHexBackground) { HexGridBackground hexBack = (HexGridBackground)drawMainMenuEvent.MainMenuInstance.GetType().GetField("hexBackground", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(drawMainMenuEvent.MainMenuInstance); hexBack.Draw(dest, GuiData.spriteBatch, Color.Transparent, Settings.lighterColorHexBackground ? new Color(20, 20, 20) : new Color(15, 15, 15, 0), HexGridBackground.ColoringAlgorithm.NegaitiveSinWash, 0f); } TextItem.DrawShadow = false; if (Button.doButton(15, 180, 650, 250, 28, "Return", new Color?(MainMenu.exitButtonColor))) { mainMenuState = MainMenuState.GameHandled; } TextItem.doFontLabel(new Vector2(125f, (float)50), "Loaded Pathfinder Mods", GuiData.font, new Color?(Color.White), 3.40282347E+38f, 3.40282347E+38f, false); float yPos = 120; foreach (string modIdentifier in Pathfinder.LoadedModIdentifiers) { TextItem.doFontLabel(new Vector2(200f, (float)yPos), modIdentifier, GuiData.smallfont, new Color?(Color.White), 3.40282347E+38f, 3.40282347E+38f, false); yPos += 30; } GuiData.endDraw(); PostProcessor.end(); baseS.ScreenManager.FadeBackBufferToBlack((int)(255 - baseS.TransitionAlpha)); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public static void init(ContentManager content) { fileData = new Dictionary <OSTheme, string>(); var utF8Encoding = new UTF8Encoding(); hexGrid = new HexGridBackground(content); hexGrid.HexScale = 0.12f; foreach (OSTheme key in Enum.GetValues(typeof(OSTheme))) { byte[] bytes = utF8Encoding.GetBytes(key.ToString() + key.GetHashCode()); var str = ""; for (var index = 0; index < bytes.Length; ++index) { str += bytes[index].ToString(); } fileData.Add(key, str); } }
public DLCIntroExe(Rectangle location, OS operatingSystem, string[] p) : base(location, operatingSystem) { this.name = "KaguyaTrial"; this.ramCost = 190; this.IdentifierName = "KaguyaTrial"; this.targetIP = this.os.thisComputer.ip; this.circle = this.os.content.Load <Texture2D>("Circle"); this.circleOutline = this.os.content.Load <Texture2D>("CircleOutlineLarge"); this.Assignment1Text = Utils.readEntireFile("Content/DLC/Docs/KaguyaTrial1.txt"); this.Assignment2Text = Utils.readEntireFile("Content/DLC/Docs/KaguyaTrial2.txt"); this.AssignmentsCompleteText = Utils.readEntireFile("Content/DLC/Docs/KaguyaTrialComplete.txt"); this.BackgroundEffect = new HexGridBackground(this.os.content); this.explosion.Init(this.os.content); this.GlowSound = this.os.content.Load <SoundEffect>("SFX/Ending/PorthackSpindown"); this.BreakSound = this.os.content.Load <SoundEffect>("SFX/DoomShock"); if (!(MusicManager.currentSongName != "DLC\\Music\\snidelyWhiplash") || this.os.Flags.HasFlag("KaguyaTrialComplete")) { return; } MusicManager.transitionToSong("Music/Ambient/dark_drone_008"); }