Changeset 725 for trunk/LocalPlayer/Nego.pas
- Timestamp:
- Jan 13, 2026, 4:01:26 PM (8 weeks ago)
- File:
-
- 1 edited
-
trunk/LocalPlayer/Nego.pas (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Nego.pas
r674 r725 715 715 A, I, Max: Integer; 716 716 Price: Cardinal; 717 InputDlg: TInputDlg; 717 718 begin 718 719 if (Page <> History[Me].N) or (ClientMode = scDipCancelTreaty) or … … 737 738 opMoney: 738 739 begin // choose amount 739 InputDlg.Caption := Phrases.Lookup('TITLE_AMOUNT'); 740 InputDlg.EditInput.Text := ''; 741 InputDlg.CenterToRect(BoundsRect); 742 InputDlg.ShowModal; 743 if InputDlg.ModalResult <> mrOK then 744 Exit; 745 Val(InputDlg.EditInput.Text, A, I); 746 if (I <> 0) or (A <= 0) or (A >= MaxMoneyPrice) then 747 Exit; 748 Inc(Price, A); 740 InputDlg := TInputDlg.Create(nil); 741 try 742 InputDlg.Caption := Phrases.Lookup('TITLE_AMOUNT'); 743 InputDlg.EditInput.Text := ''; 744 InputDlg.CenterToRect(BoundsRect); 745 InputDlg.ShowModal; 746 if InputDlg.ModalResult <> mrOK then 747 Exit; 748 Val(InputDlg.EditInput.Text, A, I); 749 if (I <> 0) or (A <= 0) or (A >= MaxMoneyPrice) then 750 Exit; 751 Inc(Price, A); 752 finally 753 InputDlg.Free; 754 end; 749 755 end; 750 756 opShipParts: … … 828 834 A, I, Max: Integer; 829 835 Price: Cardinal; 836 InputDlg: TInputDlg; 830 837 begin 831 838 if (Page <> History[Me].N) or (ClientMode = scDipCancelTreaty) or … … 849 856 opMoney: 850 857 begin // choose amount 851 InputDlg.Caption := Phrases.Lookup('TITLE_AMOUNT'); 852 InputDlg.EditInput.Text := ''; 853 InputDlg.CenterToRect(BoundsRect); 854 InputDlg.ShowModal; 855 if InputDlg.ModalResult <> mrOK then 856 Exit; 857 Val(InputDlg.EditInput.Text, A, I); 858 if (I <> 0) or (A <= 0) or (A >= MaxMoneyPrice) then 859 Exit; 860 if (Price = opMoney) and (A > MyRO.Money) then 861 A := MyRO.Money; 862 Inc(Price, A); 858 InputDlg := TInputDlg.Create(nil); 859 try 860 InputDlg.Caption := Phrases.Lookup('TITLE_AMOUNT'); 861 InputDlg.EditInput.Text := ''; 862 InputDlg.CenterToRect(BoundsRect); 863 InputDlg.ShowModal; 864 if InputDlg.ModalResult <> mrOK then 865 Exit; 866 Val(InputDlg.EditInput.Text, A, I); 867 if (I <> 0) or (A <= 0) or (A >= MaxMoneyPrice) then 868 Exit; 869 if (Price = opMoney) and (A > MyRO.Money) then 870 A := MyRO.Money; 871 Inc(Price, A); 872 finally 873 InputDlg.Free; 874 end; 863 875 end; 864 876 opShipParts: … … 869 881 Inc(Price, MainScreen.ModalSelectDlg.Result shl 16); 870 882 Max := MyRO.Ship[Me].Parts[MainScreen.ModalSelectDlg.Result]; 871 InputDlg.Caption := Phrases.Lookup('TITLE_NUMBER'); 872 InputDlg.EditInput.Text := ''; 873 InputDlg.CenterToRect(BoundsRect); 874 Gtk2Fix; 875 InputDlg.ShowModal; 876 if InputDlg.ModalResult <> mrOK then 877 Exit; 878 Val(InputDlg.EditInput.Text, A, I); 879 if (I <> 0) or (A <= 0) then 880 Exit; 881 if A > Max then 882 A := Max; 883 if A > MaxShipPartPrice then 884 A := MaxShipPartPrice; 885 Inc(Price, A); 883 InputDlg := TInputDlg.Create(nil); 884 try 885 InputDlg.Caption := Phrases.Lookup('TITLE_NUMBER'); 886 InputDlg.EditInput.Text := ''; 887 InputDlg.CenterToRect(BoundsRect); 888 Gtk2Fix; 889 InputDlg.ShowModal; 890 if InputDlg.ModalResult <> mrOK then 891 Exit; 892 Val(InputDlg.EditInput.Text, A, I); 893 if (I <> 0) or (A <= 0) then 894 Exit; 895 if A > Max then 896 A := Max; 897 if A > MaxShipPartPrice then 898 A := MaxShipPartPrice; 899 Inc(Price, A); 900 finally 901 InputDlg.Free; 902 end; 886 903 end; 887 904 opAllTech:
Note:
See TracChangeset
for help on using the changeset viewer.
