Changeset 435 for trunk/LocalPlayer
- Timestamp:
- May 4, 2022, 4:59:24 PM (3 years ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Select.pas
r431 r435 27 27 ToggleBtn: TButtonB; 28 28 Popup: TPopupMenu; 29 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 29 30 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState; 30 31 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); … … 291 292 begin 292 293 first := j; 293 Break 294 Break; 294 295 end; 295 296 if first >= 0 then … … 300 301 begin 301 302 inc(i); 302 inc(test, test) 303 inc(test, test); 303 304 end; 304 305 s := CityEventName(i); … … 321 322 begin 322 323 inc(i); 323 inc(test, test) 324 inc(test, test); 324 325 end; 325 326 if (CityEventPriority[j] = chNoGrowthWarning) and … … 328 329 Sprite(offscreen, HGrSystem, x, y0 + 1, 18, 18, 329 330 1 + i mod 3 * 19, 1 + i div 3 * 19); 330 dec(x, 20) 331 end 332 end 333 end 331 dec(x, 20); 332 end; 333 end; 334 end; 334 335 end 335 336 else … … 366 367 y0 + 1, s); 367 368 ca.Font.Assign(UniFont[ftNormal]); 368 end 369 end; 369 370 end 370 371 else … … 385 386 Sprite(offscreen, HGrSystem, x + CityNameSpace + 4 + 132 + 1, y + 6, 386 387 10, 10, 88, 115); 387 end 388 end; 388 389 end; 389 390 s := inttostr(CityTaxBalance(lix, CityReport)); … … 421 422 CityReport.ProjectCost, true, MainTexture); 422 423 end; 423 end 424 end; 424 425 end; 425 426 end … … 431 432 begin 432 433 x := x + SideFrame; 433 y := y + TitleHeight 434 y := y + TitleHeight; 434 435 end; 435 436 if lit then … … 631 632 icon := 4 + ResearchDone div 25; 632 633 if icon > 4 + 3 then 633 icon := 4 + 3 634 icon := 4 + 3; 634 635 end 635 636 else if lix = adMilitary then … … 654 655 RisedTextout(ca, 104 - 33 + 15 + 10 + TechNameSpace + 24 * j - 655 656 BiColorTextWidth(ca, number) div 2, y0, number); 656 end 657 end 657 end; 658 end; 658 659 end; 659 660 end; // kAdvance, kScience … … 685 686 xSizeSmall, ySizeSmall, SmallImp.Canvas, 686 687 (lix - 1) * xSizeSmall, ySizeSmall); 687 end 688 end; 688 689 end; 689 690 kMission: … … 709 710 begin 710 711 x := x + SideFrame; 711 y := y + TitleHeight 712 y := y + TitleHeight; 712 713 end; 713 714 if lit then … … 718 719 integer(TribeNames.Objects[lix]),s) 719 720 else } ReplaceText(x, y, TextColor, s); 720 end 721 end; 721 722 end; 722 723 … … 760 761 MoveTo(104 - 33 + 15 + TechNameSpace + 24 * i + j * 2, 0); 761 762 LineTo(104 - 33 + 15 + TechNameSpace + 24 * i + j * 2, InnerHeight); 762 end 763 end; 763 764 end; 764 765 end; … … 766 767 for i := -1 to DispLines do 767 768 if (i + sb.Position >= 0) and (i + sb.Position < Lines[Layer]) then 768 Self.line(offscreen.Canvas, i, true, false) 769 Self.line(offscreen.Canvas, i, true, false); 769 770 end; 770 771 MarkUsedOffscreen(InnerWidth, 8 + 48 + DispLines * LineDistance); … … 794 795 line(Canvas, Sel0, false, false); 795 796 if Sel <> -2 then 796 line(Canvas, Sel, false, true) 797 line(Canvas, Sel, false, true); 797 798 end; 798 799 … … 846 847 end; 847 848 849 procedure TListDlg.FormClose(Sender: TObject; var CloseAction: TCloseAction); 850 begin 851 Gtk2Fix; 852 end; 853 848 854 function TListDlg.RenameCity(cix: integer): boolean; 849 855 var … … 859 865 CityNameInfo.ID := MyCity[cix].ID; 860 866 CityNameInfo.NewName := InputDlg.EInput.Text; 861 Server(cSetCityName + (length(CityNameInfo.NewName) + 8) div 4, me, 0, 862 CityNameInfo); 867 Server(cSetCityName, me, 0, CityNameInfo); 863 868 if CityDlg.Visible then 864 869 begin … … 885 890 ModelNameInfo.mix := mix; 886 891 ModelNameInfo.NewName := InputDlg.EInput.Text; 887 Server(cSetModelName + (length(ModelNameInfo.NewName) + 1 + 4 + 3) div 4, 888 me, 0, ModelNameInfo); 892 Server(cSetModelName, me, 0, ModelNameInfo); 889 893 if UnitStatDlg.Visible then 890 894 begin … … 1736 1740 1737 1741 inherited ShowNewContent(NewMode, forceclose); 1738 end; // ShowNewContent1742 end; 1739 1743 1740 1744 procedure TListDlg.ShowNewContent_CityProject(NewMode: TWindowMode; cix: integer); -
trunk/LocalPlayer/Term.pas
r431 r435 772 772 result := 2; 773 773 100: 774 result := 3 774 result := 3; 775 775 end; 776 776 end; … … 812 812 Tribe[p].SetModelPicture(Picture, IsNew) 813 813 else if IsNew then 814 Server(cSetNewModelPicture + (Length(Picture.GrName) + 1 + 16 + 3) div 4, 815 0, 0, Picture) 814 Server(cSetNewModelPicture, 0, 0, Picture) 816 815 else 817 Server(cSetModelPicture + (Length(Picture.GrName) + 1 + 16 + 3) div 4, 0, 818 0, Picture) 816 Server(cSetModelPicture, 0, 0, Picture) 819 817 else 820 818 with Tribe[p].ModelPicture[mix] do … … 830 828 begin 831 829 result := false; 832 exit 830 exit; 833 831 end; 834 832 with MyRO.EnemyModel[emix] do … … 914 912 TribeMessage(p1, Tribe[p1].TPhrase('FRNEWNATION'), ''); 915 913 MyData.ToldContact := MyData.ToldContact or (1 shl p1); 916 end 914 end; 917 915 end; 918 916 … … 963 961 ModelNameInfo.mix := MyData.ToldModels; 964 962 ModelNameInfo.NewName := EInput.Text; 965 Server(cSetModelName + (Length(ModelNameInfo.NewName) + 1 + 4 + 3) 966 div 4, me, 0, ModelNameInfo); 963 Server(cSetModelName, me, 0, ModelNameInfo); 967 964 end; 968 965 end; … … 1857 1854 GrName := 'StdUnits.png'; 1858 1855 Tribe[p1].SetModelPicture(Picture, true); 1859 end 1856 end; 1860 1857 end; 1861 1858 … … 2139 2136 begin 2140 2137 OpenSound := 'MSG_COLDWAR'; 2141 s := Tribe[MyRO.Wonder[i].EffectiveOwner].TPhrase('COLDWAR') 2138 s := Tribe[MyRO.Wonder[i].EffectiveOwner].TPhrase('COLDWAR'); 2142 2139 end 2143 2140 else if MyRO.Wonder[i].EffectiveOwner >= 0 then … … 2145 2142 OpenSound := 'WONDER_BUILT'; 2146 2143 s := Tribe[MyRO.Wonder[i].EffectiveOwner] 2147 .TPhrase('WONDERBUILT') 2144 .TPhrase('WONDERBUILT'); 2148 2145 end 2149 2146 else … … 2161 2158 IconIndex := i; 2162 2159 ShowModal; 2163 end 2164 end 2160 end; 2161 end; 2165 2162 end 2166 2163 else if (MyRO.Wonder[i].EffectiveOwner <> MyData.ToldWonders[i] … … 2181 2178 IconIndex := i; 2182 2179 ShowModal; 2183 end 2180 end; 2184 2181 end 2185 2182 else if (MyData.ToldWonders[i].EffectiveOwner >= 0) and not OwnWonder … … 2203 2200 begin 2204 2201 SoundMessageEx(Phrases.Lookup('COLDWAREND'), 'MSG_DEFAULT'); 2205 MyData.ColdWarStart := -ColdWarTurns - 1 2202 MyData.ColdWarStart := -ColdWarTurns - 1; 2206 2203 end; 2207 2204 … … 2734 2731 CreateTribe(TribeInfo.trix, TribeInfo.FileName, false) 2735 2732 else 2736 Server(cSetTribe + (Length(TribeInfo.FileName) + 1 + 7) div 4, 2737 0, 0, TribeInfo); 2733 Server(cSetTribe, 0, 0, TribeInfo); 2738 2734 end; 2739 2735 … … 2749 2745 CreateTribe(TribeInfo.trix, TribeInfo.FileName, false) 2750 2746 else 2751 Server(cSetTribe + (Length(TribeInfo.FileName) + 1 + 7) div 4, 2752 0, 0, TribeInfo); 2747 Server(cSetTribe, 0, 0, TribeInfo); 2753 2748 end; 2754 2749 end; … … 3445 3440 MainOffscreenPaint; 3446 3441 Update; 3447 end 3442 end; 3448 3443 end; 3449 3444 3450 3445 else 3451 3446 if Command >= cClientEx then 3452 case Command and $FFF0 of 3453 3447 case Command of 3454 3448 cSetTribe: 3455 with TTribeInfo(Data) do 3456 begin 3449 with TTribeInfo(Data) do begin 3457 3450 i := UnusedTribeFiles.Count - 1; 3458 3451 while (i >= 0) and … … 3463 3456 CreateTribe(trix, FileName, true); 3464 3457 end; 3465 3466 cSetNewModelPicture, cSetModelPicture: 3458 cSetNewModelPicture: 3467 3459 if TribeOriginal[TModelPictureInfo(Data).trix] then 3468 3460 Tribe[TModelPictureInfo(Data).trix].SetModelPicture 3469 (TModelPictureInfo(Data), Command and 3470 $FFF0 = cSetNewModelPicture); 3471 3472 cSetSlaveIndex and $FFF0: 3461 (TModelPictureInfo(Data), True); 3462 cSetModelPicture: 3463 if TribeOriginal[TModelPictureInfo(Data).trix] then 3464 Tribe[TModelPictureInfo(Data).trix].SetModelPicture 3465 (TModelPictureInfo(Data), False); 3466 cSetSlaveIndex: 3473 3467 Tribe[integer(Data) shr 16].mixSlaves := integer(Data) and $FFFF; 3474 3475 3468 cSetCityName: 3476 3469 with TCityNameInfo(Data) do 3477 3470 if TribeOriginal[ID shr 12] then 3478 3471 Tribe[ID shr 12].SetCityName(ID and $FFF, NewName); 3479 3480 3472 cSetModelName: 3481 3473 with TModelNameInfo(Data) do … … 5138 5130 Brush.Style := bsClear; 5139 5131 if UnFocus >= 0 then 5140 with MyUn [UnFocus] do5141 with MyModel [mix] do5132 with MyUn^[UnFocus] do 5133 with MyModel^[mix] do 5142 5134 begin { display info about selected unit } 5143 5135 if Job = jCity then
Note:
See TracChangeset
for help on using the changeset viewer.