public override void OnMouseClick() { if (!drop.active) { drop.Show(); } else { drop.Hide(); } base.OnMouseClick(); }
public ComboBox(Vector2 position, SpriteFont font, params string[] items) { Position = position; drop = new DropDownList(position + new Vector2((-width - 15), height / 2), font); label = new TextDrawer(font, "", position, Color.White, TextAlign.Center); drop.Hide(); foreach (string item in items) { drop.AddItem(new Structs.DropDownItem(item, () => { updateSelected(); })); } if (items.Length > 0) selectedIndex = -1; base.UIC_Initialize(); }
public ComboBox(Vector2 position, SpriteFont font, params string[] items) { Position = position; drop = new DropDownList(position + new Vector2((-width - 15), height / 2), font); label = new TextDrawer(font, "", position, Color.White, TextAlign.Center); drop.Hide(); foreach (string item in items) { drop.AddItem(new Structs.DropDownItem(item, () => { updateSelected(); })); } if (items.Length > 0) { selectedIndex = -1; } base.UIC_Initialize(); }
public void HideTest() { Vector2 position = new Vector2(); // TODO: Initialize to an appropriate value SpriteFont font = null; // TODO: Initialize to an appropriate value DropDownList target = new DropDownList(position, font); // TODO: Initialize to an appropriate value target.Hide(); Assert.Inconclusive("A method that does not return a value cannot be verified."); }