public void YogUI_UpdateTest() { GameTime time = null; // TODO: Initialize to an appropriate value YogUI.YogUI_Update(time); Assert.Inconclusive("A method that does not return a value cannot be verified."); }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { //Update all of our UIComponents. YogUI.YogUI_Update(gameTime); textField.Update(gameTime); filterTextField.Update(gameTime); listBox.Update(gameTime); progressBar.Update(gameTime); sliderBar.Update(gameTime); radioButton1.Update(gameTime); radioButton2.Update(gameTime); checkBox.Update(gameTime); comboBox.Update(gameTime); button.Update(gameTime); button.SetText(textField.GetText()); base.Update(gameTime); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); YogUI.YogUI_LoadContent(this); SpriteFont buttonFont = Content.Load <SpriteFont>("buttonFont"); loadNinepatch = new Button(new Vector2(46, 23), "Open", buttonFont, loadExisting); saveNinepatchAs = new Button(new Vector2(150, 23), "Save", buttonFont, saveImage); xStart = new TextField(new Vector2(225, 3), 70, 15, Color.Black, buttonFont, (string s) => { refresh(); }, (string s) => { refresh(); }); xEnd = new TextField(new Vector2(225, 28), 70, 15, Color.Black, buttonFont, (string s) => { refresh(); }, (string s) => { refresh(); }); xStart.stringPattern = xEnd.stringPattern = "^\\d+?$"; xStart.placeHolderText = "X start"; xEnd.placeHolderText = "X end"; yStart = new TextField(new Vector2(305, 3), 70, 15, Color.Black, buttonFont, (string s) => { refresh(); }, (string s) => { refresh(); }); yEnd = new TextField(new Vector2(305, 28), 70, 15, Color.Black, buttonFont, (string s) => { refresh(); }, (string s) => { refresh(); }); yStart.stringPattern = yEnd.stringPattern = "^\\d+?$"; yStart.placeHolderText = "Y start"; yEnd.placeHolderText = "Y end"; refreshNinepatch = new Button(new Vector2(420, 18), "Refresh", buttonFont, refresh); patchScale = new SliderBar(new Vector2(465, 9), 225, 30, 0, 100, buttonFont); drawContent = new CheckBox(new Vector2(390, 45), buttonFont); drawContent.SetLabel("Draw content"); drawContent.SetChecked(true); scaleX = new RadioButton(new Vector2(700, 9), buttonFont, "Scale X"); scaleY = new RadioButton(new Vector2(700, 23), buttonFont, "Scale Y"); scaleXY = new RadioButton(new Vector2(700, 37), buttonFont, "Scale X+Y"); scaleGroup.addButton(scaleX); scaleGroup.addButton(scaleY); scaleGroup.addButton(scaleXY); scaleX.selected = true; // TODO: use this.Content to load your game content here }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { YogUI.YogUI_Update(gameTime); loadNinepatch.Update(gameTime); saveNinepatchAs.Update(gameTime); xStart.Update(gameTime); xEnd.Update(gameTime); yStart.Update(gameTime); yEnd.Update(gameTime); refreshNinepatch.Update(gameTime); patchScale.Update(gameTime); scaleX.Update(gameTime); scaleY.Update(gameTime); scaleXY.Update(gameTime); drawContent.Update(gameTime); base.Update(gameTime); }
public void YogUIConstructorTest() { YogUI target = new YogUI(); Assert.Inconclusive("TODO: Implement code to verify target"); }