Ejemplo n.º 1
0
		public void SetUp()
		{
			center = Rectangle.FromCenter(0.5f, 0.5f, 0.5f, 0.1f);
			scrollbar = new Scrollbar(center);
			scrollbar.Add(new FontText(Font.Default, "", new Rectangle(0.5f, 0.7f, 0.2f, 0.1f)));
			scrollbar.Start<DisplayScrollbarValue>();
			InitializeMouse();
		}
Ejemplo n.º 2
0
		public SelectBox(Theme theme, Rectangle firstLineDrawArea, List<object> values)
			: base(theme, theme.SelectBox, firstLineDrawArea)
		{
			var scrollbar = new Scrollbar(theme, Rectangle.Unused) { Rotation = 90 };
			Add(scrollbar);
			AddChild(scrollbar);
			Clicked += ClickLine;
			if (values == null || values.Count == 0)
				throw new MustBeAtLeastOneValue();
			Add(new Data(values, firstLineDrawArea, values.Count));
			DrawArea = new Rectangle(firstLineDrawArea.Left, firstLineDrawArea.Top,
				firstLineDrawArea.Width, firstLineDrawArea.Height * values.Count);
			Values = values;
		}