Example #1
0
 public DrawableText(string Text, string FontName, Vector2 Position, Color Color, DialogLocation dl)
 {
     text           = Text;
     spriteFont     = ScreenManager.Instance.Content.Load <SpriteFont>("Fonts/" + FontName);
     position       = new Vector2(Position.X - (int)spriteFont.MeasureString(text).X / 2, Position.Y - (int)spriteFont.MeasureString(text).Y / 2);
     color          = Color;
     dialogLocation = dl;
 }
Example #2
0
        protected DialogData(DialogPage[] pages, DialogLocation dialogLocation, Item itemFound)
        {
            _pages = pages;
            DialogLocation = dialogLocation;
            ItemFound = itemFound;

            UpdateDialogPageInformation();
        }
Example #3
0
        public Messagebox(string text, Vector2 pos, string fontName, Color fontColor, Color Color, DialogLocation DialogLocation, string backgroundName)
        {
            size = new Vector2(400, 100);
            if (backgroundName == "default")
            {
                messageBoxTexture = TextboxFactory.DefaultTextbox(new Vector2(400, 100), Color.White);
            }
            else
            {
                messageBoxTexture = ScreenManager.Instance.Content.Load <Texture2D>(backgroundName);
            }
            color    = Color;
            position = new Vector2(pos.X - messageBoxTexture.Width / 2, pos.Y - messageBoxTexture.Height / 2);

            blinkerTexture = ScreenManager.Instance.Content.Load <Texture2D>("Textbox/blinker");
            textBox        = new Textbox(new Rectangle((int)position.X + buffer, (int)position.Y + buffer, (int)size.X - buffer, (int)size.Y - buffer), fontName, text, fontColor);
            DrawBackground = true;
            ShouldDraw     = true;
            dialogLocation = DialogLocation;
            blinkerAlpha   = 0f;
        }