Ignore:
Timestamp:
Sep 14, 2024, 11:02:08 AM (6 days ago)
Author:
chronos
Message:
  • Added: Allow to rename city with mouse right click on city caption in City screen.
  • Fixed: Do not overflow city name text in City screen.
  • Fixed: Repaint main screen after city and unit rename.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Select.pas

    r558 r613  
    6969    procedure InitLines;
    7070    procedure Line(ca: TCanvas; L: Integer; NonText, lit: Boolean);
    71     function RenameCity(cix: Integer): Boolean;
    7271    function RenameModel(mix: Integer): Boolean;
    7372    procedure OnScroll(var Msg: TMessage); message WM_VSCROLL;
     
    7574  public
    7675    Result: Integer;
     76    function RenameCity(cix: Integer): Boolean;
    7777    function OnlyChoice(TestKind: TListKind): Integer;
    7878    // -2=empty, -1=ambiguous, other=only choice
     
    248248  if ScrollBar.Position + L >= FirstShrinkedLine[Layer] then
    249249    ofs := (ScrollBar.Position + L - FirstShrinkedLine[Layer]) and 1 * 33
    250   else { if FirstShrinkedLine[Layer]<Lines[Layer] then }
     250  else { if FirstShrinkedLine[Layer] < Lines[Layer] then }
    251251    ofs := 33;
    252252
     
    973973      case Kind of
    974974        kCities, kCityEvents:
    975           if RenameCity(lix) then
     975          if RenameCity(lix) then begin
    976976            SmartUpdateContent;
     977            Term.MainScreen.RepaintAll;
     978          end;
    977979        kModels:
    978           if RenameModel(lix) then
     980          if RenameModel(lix) then begin
    979981            SmartUpdateContent;
     982            Term.MainScreen.RepaintAll;
     983          end;
    980984      end;
    981985  end;
Note: See TracChangeset for help on using the changeset viewer.