/// <summary> /// HexGrid constructor. /// </summary> /// <param name="rect">The rectangle on the screen encompassing the grid</param> /// <param name="centerLocation">The location of the center of the center cell, in screen coordinates</param> public HexGrid(Rectangle rect, Point centerLocation) { m_area = new ScrollableArea(rect); m_area.DragOffsetTopLeft = new Point(80, 80); m_area.DragOffsetBottomRight = new Point(80, 80); CenterLocation = centerLocation; }
public ProgramGrid(Rectangle rect) { m_area = new ScrollableArea(rect); m_area.DragOffsetTopLeft = new Point(10, 0); // Don't drag from the left as it may cause the arm label to be highlighted, confusing the scroll detection m_area.DragOffsetBottomRight = new Point(0, 10); // To work out if the grid scrolled, we look at the number of the first visible arm m_area.VerticalCheckRect = new Rectangle(rect.Left - 30, rect.Top + 10, 15, 15); }
public Sidebar(Rectangle rect, int scrollableHeight, int initialScrollPosition, bool continuousScrolling) { Area = new ScrollableArea(rect, new Point(0, initialScrollPosition)); Area.ScrollableAreaHeight = scrollableHeight; ContinuousScrolling = continuousScrolling; }