示例#1
0
        public PokemonMenuLine(TextureBox icon, HPLine hpLine, TextBox nameBox, HPText hpText, TextBox level,
            TextBox hpLabel, TextureProvider textureProvider)
        {
            mainContainer = new Container();
            this.icon = icon;
            this.hpLine = hpLine;
            this.hpText = hpText;

            this.nameBox = nameBox;
            this.level = level;
            this.hpLabel = hpLabel;
            this.textureProvider = textureProvider;
        }
示例#2
0
 public HPText(TextBox text)
 {
     this.text = text;
     text.PreferredSizeChanged += (obj, ev) => SetPreferredSize(ev);
 }
示例#3
0
 public AIPokemonDataView(HPLine line, TextBox nameBox, TextBox levelBox, TextBox hpBox) :
     base(line, nameBox, levelBox, hpBox)
 { }
示例#4
0
        private TextBox CreateTextBox(float width, float height, float charSize = 16.0f)
        {
            var fontStub = new Mock<ISpriteFont>();
            fontStub.Setup(o => o.MeasureString(It.IsAny<string>())).Returns<string>(s => new Vector2(charSize * s.Length, charSize));
            var textBox = new TextBox(fontMock.Object);
            textBox.Height = height;
            textBox.Width = width;

            return textBox;
            
        }
示例#5
0
        private TextBox CreateTextBox(float width, float height, GraphicalTextStub stub)
        {
            var box = new TextBox(stub);
            box.Width = width;
            box.Height = height;

            return box;
        }
 public PlayerPokemonDataView(HPLine line, TextBox nameBox, TextBox levelBox, TextBox hpBox, HPText hpTextBox) :
     base(line, nameBox, levelBox, hpBox, hpTextBox)
 { }