anchor.diff:    OBJ_NONE_TAG = -100;
     OBJ_BLOCK_TAG = -200;
     //Objects brush bins
  +  BTN_BRUSH_TYPE_S = 30;
     BTN_BRUSH_SIZE = 36;
   
   
   { TKMMapEdTerrainObjects }
   constructor TKMMapEdTerrainObjects.Create(aParent: TKMPanel; aHideAllPages: TEvent);
  +
  +var
  +  top: Integer;
  +
  +  function NextTop(aInc: Integer): Integer;
  +  begin
  +    Result := top;
  +    top := top + aInc;
  +  end;
  +
   var
     I, J: Integer;
   //  TOA: TKMTerrainObjectAttribute;
  
positive.code: 
      ObjPalette_UpdateControlsPosition;
  
    fSubMenuActionsEvents[0] := ObjectsChange;
    fSubMenuActionsEvents[1] := ObjectsChange;
    fSubMenuActionsEvents[2] := ObjectsPaletteButton_Click;
  
    fSubMenuActionsCtrls[0,0] := ObjectErase;
    fSubMenuActionsCtrls[1,0] := ObjectBlock;
    fSubMenuActionsCtrls[2,0] := ObjectsPalette_Button;
  
  
    with TKMLabel.Create(Panel_Objects, 9, 345, Panel_Objects.Width, 0, gResTexts[TX_MAPED_OBJECTS_BRUSH], fntOutline, taCenter) do
      Anchors := [anLeft, anTop, anRight];
  
    BrushSize   := TKMTrackBar.Create(Panel_Objects, 9, 373, (Panel_Objects.Width - (BTN_BRUSH_SIZE * 2) - 18) - 18, 4, 20);
    BrushSize.Anchors := [anLeft, anTop, anRight];
    BrushSize.Position := 1;
    BrushSize.OnChange := ObjectsChange;
    BrushSize.Hint := GetHintWHotKey(TX_MAPED_TERRAIN_HEIGHTS_SIZE_HINT, gResTexts[TX_KEY_CTRL_MOUSEWHEEL]);
  
    CleanBrush := TKMButtonFlat.Create(Panel_Objects, 15, 400, 34, 34, 673, rxGui);
    CleanBrush.Anchors := [anTop];
    CleanBrush.Hint := gResTexts[TX_MAPED_OBJECTS_BRUSH_CLEAN];
    CleanBrush.OnClick := ObjectsChange;
  
    BrushCircle := TKMButtonFlat.Create(Panel_Objects, Panel_Objects.Width - (BTN_BRUSH_SIZE * 2) - 18, 370, BTN_BRUSH_SIZE, BTN_BRUSH_SIZE, 592);
    BrushCircle.Anchors := [anTop, anRight];
    BrushCircle.Hint := GetHintWHotkey(TX_MAPED_TERRAIN_HEIGHTS_CIRCLE, kfMapedSubMenuAction1);
    BrushCircle.OnClick := ObjectsChange;
    BrushCircle.TexOffsetX := 1;
    BrushCircle.TexOffsetY := 1;
  
    BrushSquare := TKMButtonFlat.Create(Panel_Objects, Panel_Objects.Width - BTN_BRUSH_SIZE - 9, 370, BTN_BRUSH_SIZE, BTN_BRUSH_SIZE, 593);
    BrushSquare.Anchors := [anTop, anRight];
    BrushSquare.Hint := GetHintWHotkey(TX_MAPED_TERRAIN_HEIGHTS_SQUARE, kfMapedSubMenuAction2);
    BrushSquare.OnClick := ObjectsChange;
    BrushSquare.TexOffsetX := 1;
    BrushSquare.TexOffsetY := 1;
  
    J := 0;
    K := 0;
    rxIndex := 226;
  
    for I := 0 to 9 do begin
      case I of
         0: begin rxIndex := 226; objectsHint := gResTexts[TX_MAPED_OBJECTS_BRUSH_TREES];     end;
         1: begin rxIndex := 34;  objectsHint := gResTexts[TX_MAPED_OBJECTS_BRUSH_ALL];       end;
  
negative.code:        9: begin rxIndex := 245; objectsHint := gResTexts[TX_MAPED_OBJECTS_BRUSH_RUINS];     end;
      end;
  
      J := I mod 5;
      K := I div 5;
  
      ObjectTypeSet[I] := TKMButtonFlat.Create(Panel_Objects, 9+BTN_BRUSH_SIZE*J, top + BTN_BRUSH_SIZE*K, 34, 34, rxIndex, rxTrees);
  
      ObjectTypeSet[I].OnClick := ObjectsChange;
      ObjectTypeSet[I].Hint := objectsHint;
    end;
  
    NextTop(80);
  
    ForestDensity   := TKMTrackBar.Create(Panel_Objects, 9, NextTop(50), (Panel_Objects.Width) - 18, 1, 30);
    ForestDensity.Anchors := [anLeft, anTop, anRight];
    ForestDensity.Caption := gResTexts[TX_MAPED_OBJECTS_BRUSH_DENSITY];
    ForestDensity.Position := 10;
    ForestDensity.OnChange := ObjectsChange;
    ForestDensity.Hint := gResTexts[TX_MAPED_OBJECTS_BRUSH_DENSITY_HINT];
  
    ForestAge   := TKMTrackBar.Create(Panel_Objects, 9, NextTop(50), (Panel_Objects.Width) - 18, 1, 3);
    ForestAge.Anchors := [anLeft, anTop, anRight];
    ForestAge.Caption := gResTexts[TX_MAPED_OBJECTS_BRUSH_AGE];
    ForestAge.Position := 1;
    ForestAge.OnChange := ObjectsChange;
    ForestAge.Hint := gResTexts[TX_MAPED_OBJECTS_BRUSH_AGE_HINT];
  