Ejemplo n.º 1
0
 public override void Init()
 {
     entryComplete =
         displayComplete =
         delayComplete =
         exitComplete = false;
     _bits = EquestriEngine.AssetManager.GetTexture("{bits}");
     _fontDisplay = EquestriEngine.AssetManager.GetFont("{largefont}");
     Show();
 }
        public override void Init()
        {
            _windowTarget = EngineGlobals.GameReference.AssetManager.CreateTargetObject("{achievementgenerator" + instanceNumber + "}", WIDGET_WIDTH, WIDGET_HEIGHT);

            _displayFont = EngineGlobals.GameReference.AssetManager.GetFont("{smallfont}");
            _windowTexture = EngineGlobals.GameReference.AssetManager.CreatePixelTexture("{awind_texture}");

            _achievementTexture = EngineGlobals.GameReference.AssetManager.GetTexture("{achievement}");

            _windowTarget.RunTarget(GenerateWidget);

            Show();
        }
 protected override void LoadContent()
 {
     spriteBatch = new Equestribatch(GraphicsDevice);
     //_skelebatch = new EquestriSkeleBatch(GraphicsDevice);
     errorTexture = AssetManager.GetTexture("{error}");
     smallFont = AssetManager.GetFont("{smallfont}");
     TextureObjectFactory.Device_Ref = GraphicsDevice;
     base.LoadContent();
 }
        public override void LoadContent()
        {
            //_messageBoxWindow = Systems.AssetManager.GetTexture("message_box");
            if (_messageBoxWindowTexture == null)
            {
                _messageBoxWindowTexture = new TextureObject("message_box", @"Graphics\UI\MessageBox");
                _nameBoxWindowTexture = new TextureObject("name_box", @"Graphics\UI\namebox");
                _continueArrowTexture = new TextureObject("continue_arrow", @"Graphics\UI\textbox_arrow");
            }

            _messageBoxFont = EquestriEngine.AssetManager.GetFont("{largefont}");
            boxOrigin = new Vector2(_messageBoxWindowTexture.Width / 2, _messageBoxWindowTexture.Height / 2);
            name = "Fluttershy";
            if (name != null)
            {
                _nameBoxWindow = EquestriEngine.AssetManager.CreateTargetObject("{namebox_texture}", (int)_messageBoxFont.Measure(name).X + 50, 74);
                _nameBoxWindow.RunTarget(DrawNameBox, Color.Transparent);
            }
            base.LoadContent();
        }
        public override void LoadContent()
        {
            //_messageBoxWindow = Systems.AssetManager.GetTexture("message_box");
            _messageBoxWindowTexture = EngineGlobals.GameReference.AssetManager.CreateTextureObjectFromFile("message_box", @"Graphics\UI\MessageBox");
            _nameBoxWindowTexture = EngineGlobals.GameReference.AssetManager.CreateTextureObjectFromFile("name_box", @"Graphics\UI\namebox");
            _continueArrowTexture = EngineGlobals.GameReference.AssetManager.CreateTextureObjectFromFile("continue_arrow", @"Graphics\UI\textbox_arrow");

            _messageBoxFont = EngineGlobals.GameReference.AssetManager.GetFont("{largefont}");
            name = "Fluttershy";
        }
        protected override void LoadContent()
        {
            base.LoadContent();
            _systemReady = true;

            try
            {
                FromInternal("{error}", "Error.derpyeyes");
                FromInternal("{notex}", "Error.notexture");
                FromInternal("{achievement}", "Data.achievements");
                FromInternal("{bits}", "UI.bitcollection");
                FromInternal("{load}", "Loading.loadingscreen_filler");

                var Effect = new Objects.Graphics.BasicEffectObject("{basic_effect}");

                var smallFont = new FontObject("{smallfont}", @"fonts\celestia_redux");
                _fonts["{smallfont}"] = smallFont;
                var largeFont = new FontObject("{largefont}", @"fonts\celestia_redux_large");
                _fonts["{largefont}"] = largeFont;

                _frameCapture = new TargetObject("{screen}", GraphicsDevice, EngineGlobals.Settings.WindowWidth, EngineGlobals.Settings.WindowHeight);
                _empty = CreatePixelTexture("{empty}", Color.Transparent);
                _singleWhite = CreatePixelTexture("{single}");
            }
            catch (System.Exception ex)
            {
                EquestriEngine.ErrorMessage = ex.Message;
            }

            LoadTextures();
            LoadFonts();
            LoadEffects();
            LoadSkeletons();
        }
 public FontObject CreateFontFromFile(string name, string fileName)
 {
     if (!_systemReady)
         throw new EngineException("System not ready for creation", true);
     if (_fonts.ContainsKey(name))
         return _fonts[name];
     else
     {
         FontObject newFont = new FontObject(name, fileName);
         _fonts[name] = newFont;
         return newFont;
     }
 }
 public ConsoleWindow(object game)
     : base(game)
 {
     _font = EquestriEngine.AssetManager.CreateFontFromFile("{console}", @"fonts\celestia_redux");
     _consoleColor = Color.Multiply(Color.White, 0.5f);
     _currentMode = ConsoleMode.Console;
     _consoleInput = new Variable("");
     _entries = "";
     process = System.Diagnostics.Process.GetCurrentProcess();
 }