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:        9: begin rxIndex := 245; objectsHint := gResTexts[TX_MAPED_OBJECTS_BRUSH_RUINS];     end;
      end;
  
      if I = 5 then
      begin
        J := 0;
        K := 1;
      end;
      ObjectTypeSet[I] := TKMButtonFlat.Create(Panel_Objects, 9+BTN_BRUSH_SIZE*J, 450+BTN_BRUSH_SIZE*K, 34, 34, rxIndex, rxTrees);
  
      ObjectTypeSet[I].OnClick := ObjectsChange;
      ObjectTypeSet[I].Hint := objectsHint;
      J := J+1;
    end;
  
    with TKMLabel.Create(Panel_Objects, 9, 520, Panel_Objects.Width - 9, 20, gResTexts[TX_MAPED_OBJECTS_BRUSH_DENSITY], fntMetal, taLeft) do
      Hint := gResTexts[TX_MAPED_OBJECTS_BRUSH_DENSITY_HINT];
  
    ForestDensity   := TKMTrackBar.Create(Panel_Objects, 9, 545, (Panel_Objects.Width) - 18, 1, 30);
    ForestDensity.Anchors := [anLeft, anTop, anRight];
    ForestDensity.Position := 10;
    ForestDensity.OnChange := ObjectsChange;
    ForestDensity.Hint := gResTexts[TX_MAPED_OBJECTS_BRUSH_DENSITY_HINT];
  
    with TKMLabel.Create(Panel_Objects, 9, 570, Panel_Objects.Width - 9, 20, gResTexts[TX_MAPED_OBJECTS_BRUSH_AGE], fntMetal, taLeft) do
      Hint := gResTexts[TX_MAPED_OBJECTS_BRUSH_AGE_HINT];
  
    ForestAge   := TKMTrackBar.Create(Panel_Objects, 9, 595, (Panel_Objects.Width) - 18, 1, 3);
    ForestAge.Anchors := [anLeft, anTop, anRight];
    ForestAge.Position := 1;
    ForestAge.OnChange := ObjectsChange;
    ForestAge.Hint := gResTexts[TX_MAPED_OBJECTS_BRUSH_AGE_HINT];
  
negative.code:   gGameCursor.MapEdObjectsType[0] := True;
    gGameCursor.MapEdObjectsType[1] := True;
  
    gGameCursor.MapEdForestAge := 1;
    gGameCursor.MapEdCleanBrush := False;
  
  
    // hotkeys for object functions
    fSubMenuActionsEvents[0] := ObjectsChange;
    fSubMenuActionsEvents[1] := ObjectsChange;
    fSubMenuActionsEvents[2] := ObjectsChange;
    fSubMenuActionsEvents[3] := ObjectsChange;
    fSubMenuActionsEvents[4] := ObjectsPaletteButton_Click;
  
    fSubMenuActionsCtrls[0,0] := ObjectErase;
    fSubMenuActionsCtrls[1,0] := ObjectBlock;
    fSubMenuActionsCtrls[2,0] := BrushCircle;
    fSubMenuActionsCtrls[3,0] := BrushSquare;
    fSubMenuActionsCtrls[4,0] := ObjectsPalette_Button;
  end;
  
  
  