void DoMove(int iOld, int iNew) { EditorManager.Progress.ShowProgressDialog("Resort detail textures"); _terrain.DetailTextures.RemoveAt(iOld); _terrain.DetailTextures.Insert(iNew, _texture); _terrain.EngineTerrain.UpdateDetailTextureOrder(TerrainEditor.CurrentTerrain.DetailTextures, true, EditorManager.Progress); _terrain.Modified = true; TerrainEditor.TriggerOnDetailTextureListChanged(new DetailTextureListChangedArgs(DetailTextureListChangedArgs.Action.OrderChanged, null)); EditorManager.Progress.HideProgressDialog(); }
void SetNewList(ArrayList oldList, ArrayList newList) { EditorManager.Progress.ShowProgressDialog("Resort detail textures"); _terrain.DetailTextures = newList; _terrain.EngineTerrain.UpdateDetailTextureOrder(_terrain.DetailTextures, true, EditorManager.Progress); EditorManager.Progress.HideProgressDialog(); EditorManager.ActiveView.UpdateView(false); _terrain.Modified = true; TerrainEditor.TriggerOnDetailTextureListChanged(new DetailTextureListChangedArgs(DetailTextureListChangedArgs.Action.NewCreated, null)); if (TerrainEditor.CurrentDetailTexture != null && !newList.Contains(TerrainEditor.CurrentDetailTexture)) { TerrainEditor.CurrentDetailTexture = null; } }