Exemple #1
0
 public void LoadContent()
 {
     _fontRenderer = new PokemonFontRenderer();
     _fontRenderer.LoadContent();
     _continueArrow = Controller.Content.LoadDirect <Texture2D>("Textures/UI/Borders/continueArrow.png");
     _textTarget    = RenderTargetManager.CreateRenderTarget((int)(Border.SCREEN_WIDTH * Border.UNIT * Border.SCALE), (int)(HEIGHT * Border.UNIT * Border.SCALE) - 52);
     _textBatch     = new SpriteBatch(Controller.GraphicsDevice);
 }
Exemple #2
0
        // cancelindex -1 sets it to the last option
        public void Show(string[] options, int cancelIndex = -1)
        {
            Index   = 0;
            Visible = true;

            _options = options;

            Height = 2 + (_options.Length - 1) * 2 + 1 + BufferUp;
            _width = 3 + _options.Max(t => PokemonFontRenderer.PrintableCharAmount(t)) + BufferRight;

            _cancelIndex = cancelIndex;
            if (_cancelIndex == -1)
            {
                _cancelIndex = _options.Length - 1;
            }
        }
Exemple #3
0
 public void LoadContent()
 {
     _fontRenderer = new PokemonFontRenderer();
     _fontRenderer.LoadContent();
 }