示例#1
0
        public HexgridPanelExample()
        {
            InitializeComponent();

            MenuBarToolStrip.LoadTraceMenu();
            MenuBarToolStrip.LoadMapList(MapList.Maps.Select(item => item.MapName).ToArray());
        }
示例#2
0
 private void LandmarksReady(object sender, EventArgs <ILandmarkCollection> e)
 {
     if (InvokeRequired)
     {
         Invoke((Action) delegate { MenuBarToolStrip.LoadLandmarkMenu(e.Value); });
     }
     else
     {
         MenuBarToolStrip.LoadLandmarkMenu(e.Value);
     }
 }
示例#3
0
        private void SetMapBoard(IPanelModel mapBoard)
        {
            HexgridPanel.SetModel(MapBoard = mapBoard);
            MapBoard.ShowPathArrow         = MenuBarToolStrip.ShowPathArrow;
            MapBoard.ShowFov         = MenuBarToolStrip.ShowFieldOfView;
            MapBoard.FovRadius       =
                MapBoard.RangeCutoff = MenuBarToolStrip.PathCutover;
            MenuBarToolStrip.LoadLandmarkMenu(MapBoard.Landmarks);

            CustomCoords = new CustomCoords(new IntMatrix2D(2, 0, 0, -2, 0, 2 * MapBoard.MapSizeHexes.Height - 1, 2));

            HexgridPanel.Focus();
        }