Beispiel #1
0
        void gtv_GrhAfterSelect(object sender, GrhTreeViewEventArgs e)
        {
            GlobalState.Instance.Map.SetGrhToPlace(e.GrhData.GrhIndex);

            var toolManager = ToolManager.Instance;

            var pencilTool = toolManager.TryGetTool<MapGrhPencilTool>();
            if (pencilTool != null && pencilTool.IsOnToolBar)
            {
                var fillTool = toolManager.TryGetTool<MapGrhFillTool>();
                if (fillTool == null || !fillTool.IsEnabled)
                {
                    pencilTool.IsEnabled = true;
                }
            }
        }
Beispiel #2
0
 static void gtv_GrhAfterSelect(object sender, GrhTreeViewEventArgs e)
 {
     GlobalState.Instance.Map.GrhToPlace.SetGrh(e.GrhData);
 }