Changeset 474
- Timestamp:
- Dec 4, 2023, 7:18:18 PM (13 months ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Global.pas
r447 r474 4 4 5 5 const 6 CevoTitle = 'C-evo'; 6 7 CevoExt = '.cevo'; 7 8 CevoMapExt = '.cevomap'; -
trunk/Inp.lfm
r232 r474 1 1 object InputDlg: TInputDlg 2 2 Left = 514 3 Height = 99 3 4 Top = 236 5 Width = 232 4 6 BorderStyle = bsNone 5 7 ClientHeight = 99 6 8 ClientWidth = 232 7 9 Color = clBtnFace 8 Font.Charset = DEFAULT_CHARSET10 DesignTimePPI = 144 9 11 Font.Color = clWindowText 10 Font.Height = - 1312 Font.Height = -20 11 13 Font.Name = 'MS Sans Serif' 12 Font.Style = []13 14 FormStyle = fsStayOnTop 14 15 OnClose = FormClose … … 16 17 OnPaint = FormPaint 17 18 OnShow = FormShow 18 PixelsPerInch = 9619 LCLVersion = '2.2.6.0' 19 20 Scaled = False 20 object OKBtn: TButtonA21 object ButtonOk: TButtonA 21 22 Left = 66 23 Height = 25 22 24 Top = 67 23 25 Width = 100 24 Height = 2525 26 Down = False 26 27 Permanent = False 27 OnClick = OKBtnClick 28 Caption = '' 28 OnClick = ButtonOkClick 29 29 end 30 object E Input: TEdit30 object EditInput: TEdit 31 31 Left = 16 32 Height = 27 32 33 Top = 40 33 34 Width = 200 34 Height = 1935 35 BorderStyle = bsNone 36 36 Color = clBlack 37 Font.Charset = DEFAULT_CHARSET38 37 Font.Color = 4176863 39 38 Font.Height = -15 40 39 Font.Name = 'Times New Roman' 41 40 Font.Style = [fsBold] 41 OnKeyPress = EInputKeyPress 42 42 ParentFont = False 43 43 TabOrder = 0 44 OnKeyPress = EInputKeyPress45 44 end 46 45 end -
trunk/Inp.pas
r471 r474 5 5 6 6 uses 7 ScreenTools, LCLIntf, LCLType, SysUtils, Classes, DrawDlg, ButtonA, StdCtrls,8 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, System.UITypes{$ELSE}9 Graphics, Controls, Forms {$ENDIF};7 ScreenTools, LCLIntf, LCLType, SysUtils, Classes, DrawDlg, ButtonA, 8 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.StdCtrls, System.UITypes{$ELSE} 9 Graphics, Controls, Forms, StdCtrls{$ENDIF}; 10 10 11 11 type 12 12 TInputDlg = class(TDrawDlg) 13 OKBtn: TButtonA;14 E Input: TEdit;15 procedure OKBtnClick(Sender: TObject);13 ButtonOk: TButtonA; 14 EditInput: TEdit; 15 procedure ButtonOkClick(Sender: TObject); 16 16 procedure FormPaint(Sender: TObject); 17 17 procedure FormCreate(Sender: TObject); … … 44 44 procedure TInputDlg.FormPaint(Sender: TObject); 45 45 begin 46 PaintBackground( self, 3, 3, ClientWidth - 6, ClientHeight - 6);47 Frame(Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0);48 Frame(Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2,46 PaintBackground(Self, 3, 3, Width - 6, Height - 6); 47 Frame(Canvas, 0, 0, Width - 1, Height - 1, 0, 0); 48 Frame(Canvas, 1, 1, Width - 2, Height - 2, 49 49 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 50 Frame(Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3,50 Frame(Canvas, 2, 2, Width - 3, Height - 3, 51 51 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 52 EditFrame(Canvas, E Input.BoundsRect, MainTexture);53 BtnFrame(Canvas, OKBtn.BoundsRect, MainTexture);54 RisedTextOut(Canvas, ( ClientWidth - BiColorTextWidth(Canvas, Caption)) div 2,52 EditFrame(Canvas, EditInput.BoundsRect, MainTexture); 53 BtnFrame(Canvas, ButtonOk.BoundsRect, MainTexture); 54 RisedTextOut(Canvas, (Width - BiColorTextWidth(Canvas, Caption)) div 2, 55 55 9, Caption); 56 { Corner(canvas, 1,1,0,MainTexture);57 Corner(Canvas, ClientWidth-9,1,1,MainTexture);58 Corner(Canvas, 1,ClientHeight-9,2,MainTexture);59 Corner(Canvas, ClientWidth-9,ClientHeight-9,3,MainTexture); }56 { Corner(canvas, 1, 1, 0, MainTexture); 57 Corner(Canvas, Width - 9, 1, 1, MainTexture); 58 Corner(Canvas, 1, Height - 9, 2, MainTexture); 59 Corner(Canvas, Width - 9, Height - 9, 3, MainTexture); } 60 60 end; 61 61 62 procedure TInputDlg. OKBtnClick(Sender: TObject);62 procedure TInputDlg.ButtonOkClick(Sender: TObject); 63 63 begin 64 if E Input.Text = '' then64 if EditInput.Text = '' then 65 65 ModalResult := mrCancel 66 66 else … … 70 70 procedure TInputDlg.EInputKeyPress(Sender: TObject; var Key: Char); 71 71 begin 72 if (Key = #13) and (E Input.Text <> '') then72 if (Key = #13) and (EditInput.Text <> '') then 73 73 begin 74 74 Key := #0; … … 84 84 procedure TInputDlg.FormShow(Sender: TObject); 85 85 begin 86 OKBtn.Caption := Phrases.Lookup('BTN_OK');87 E Input.Font.Color := MainTexture.ColorMark;88 E Input.SelStart := 0;89 E Input.SelLength := Length(EInput.Text);86 ButtonOk.Caption := Phrases.Lookup('BTN_OK'); 87 EditInput.Font.Color := MainTexture.ColorMark; 88 EditInput.SelStart := 0; 89 EditInput.SelLength := Length(EditInput.Text); 90 90 if Center then 91 91 CenterToRect(Rect(0, 0, Screen.Width, Screen.Height)); -
trunk/Integrated.lpr
r473 r474 27 27 DotNetClient := nil; 28 28 Application.Initialize; 29 Application.Title := 'C-evo';29 Application.Title := CevoTitle; 30 30 Application.TaskBarBehavior := TTaskBarBehavior.tbMultiButton; 31 31 ScreenTools.LoadConfig(AppRegistryKey); -
trunk/LocalPlayer/Help.pas
r471 r474 2044 2044 begin 2045 2045 InputDlg.Caption := Phrases.Lookup('SEARCH'); 2046 InputDlg.E Input.Text := SearchContent;2046 InputDlg.EditInput.Text := SearchContent; 2047 2047 InputDlg.CenterToRect(BoundsRect); 2048 2048 InputDlg.ShowModal; 2049 if (InputDlg.ModalResult = mrOK) and (Length(InputDlg.E Input.Text) >= 2) then2050 begin 2051 Search(InputDlg.E Input.Text);2049 if (InputDlg.ModalResult = mrOK) and (Length(InputDlg.EditInput.Text) >= 2) then 2050 begin 2051 Search(InputDlg.EditInput.Text); 2052 2052 case SearchResult.Count of 2053 2053 0: begin 2054 2054 Gtk2Fix; 2055 2055 SimpleMessage(Format(HelpText.Lookup('NOMATCHES'), 2056 [InputDlg.E Input.Text]));2056 [InputDlg.EditInput.Text])); 2057 2057 end; 2058 2058 1: … … 2060 2060 ShowNewContent(FWindowMode, Category, Index); 2061 2061 else begin 2062 NewSearchContent := InputDlg.E Input.Text;2062 NewSearchContent := InputDlg.EditInput.Text; 2063 2063 ShowNewContent(FWindowMode, hkMisc, Integer(miscSearchResult)); 2064 2064 end; -
trunk/LocalPlayer/Nego.pas
r471 r474 741 741 begin // choose amount 742 742 InputDlg.Caption := Phrases.Lookup('TITLE_AMOUNT'); 743 InputDlg.E Input.Text := '';743 InputDlg.EditInput.Text := ''; 744 744 InputDlg.CenterToRect(BoundsRect); 745 745 InputDlg.ShowModal; 746 746 if InputDlg.ModalResult <> mrOK then 747 747 Exit; 748 val(InputDlg.E Input.Text, A, I);748 val(InputDlg.EditInput.Text, A, I); 749 749 if (I <> 0) or (A <= 0) or (A >= MaxMoneyPrice) then 750 750 Exit; … … 771 771 Max := MyRO.Ship[DipMem[Me].pContact].Parts[MainScreen.ModalSelectDlg.Result]; 772 772 InputDlg.Caption := Phrases.Lookup('TITLE_NUMBER'); 773 InputDlg.E Input.Text := '';773 InputDlg.EditInput.Text := ''; 774 774 InputDlg.CenterToRect(BoundsRect); 775 775 InputDlg.ShowModal; 776 776 if InputDlg.ModalResult <> mrOK then 777 777 Exit; 778 val(InputDlg.E Input.Text, A, I);778 val(InputDlg.EditInput.Text, A, I); 779 779 if (I <> 0) or (A <= 0) then 780 780 Exit; … … 853 853 begin // choose amount 854 854 InputDlg.Caption := Phrases.Lookup('TITLE_AMOUNT'); 855 InputDlg.E Input.Text := '';855 InputDlg.EditInput.Text := ''; 856 856 InputDlg.CenterToRect(BoundsRect); 857 857 InputDlg.ShowModal; 858 858 if InputDlg.ModalResult <> mrOK then 859 859 Exit; 860 val(InputDlg.E Input.Text, A, I);860 val(InputDlg.EditInput.Text, A, I); 861 861 if (I <> 0) or (A <= 0) or (A >= MaxMoneyPrice) then 862 862 Exit; … … 873 873 Max := MyRO.Ship[Me].Parts[MainScreen.ModalSelectDlg.Result]; 874 874 InputDlg.Caption := Phrases.Lookup('TITLE_NUMBER'); 875 InputDlg.E Input.Text := '';875 InputDlg.EditInput.Text := ''; 876 876 InputDlg.CenterToRect(BoundsRect); 877 877 InputDlg.ShowModal; 878 878 if InputDlg.ModalResult <> mrOK then 879 879 Exit; 880 val(InputDlg.E Input.Text, A, I);880 val(InputDlg.EditInput.Text, A, I); 881 881 if (I <> 0) or (A <= 0) then 882 882 Exit; -
trunk/LocalPlayer/Select.pas
r473 r474 856 856 begin 857 857 InputDlg.Caption := Phrases.Lookup('TITLE_CITYNAME'); 858 InputDlg.E Input.Text := CityName(MyCity[cix].ID);858 InputDlg.EditInput.Text := CityName(MyCity[cix].ID); 859 859 InputDlg.CenterToRect(BoundsRect); 860 860 InputDlg.ShowModal; 861 if (InputDlg.ModalResult = mrOK) and (InputDlg.E Input.Text <> '') and862 (InputDlg.E Input.Text <> CityName(MyCity[cix].ID)) then861 if (InputDlg.ModalResult = mrOK) and (InputDlg.EditInput.Text <> '') and 862 (InputDlg.EditInput.Text <> CityName(MyCity[cix].ID)) then 863 863 begin 864 864 CityNameInfo.ID := MyCity[cix].ID; 865 CityNameInfo.NewName := InputDlg.E Input.Text;865 CityNameInfo.NewName := InputDlg.EditInput.Text; 866 866 if CityNameInfo.GetCommandDataSize > CommandDataMaxSize then 867 867 Delete(CityNameInfo.NewName, Length(CityNameInfo.NewName) - … … 885 885 begin 886 886 InputDlg.Caption := Phrases.Lookup('TITLE_MODELNAME'); 887 InputDlg.E Input.Text := Tribe[Me].ModelName[mix];887 InputDlg.EditInput.Text := Tribe[Me].ModelName[mix]; 888 888 InputDlg.CenterToRect(BoundsRect); 889 889 InputDlg.ShowModal; 890 if (InputDlg.ModalResult = mrOK) and (InputDlg.E Input.Text <> '') and891 (InputDlg.E Input.Text <> Tribe[Me].ModelName[mix]) then890 if (InputDlg.ModalResult = mrOK) and (InputDlg.EditInput.Text <> '') and 891 (InputDlg.EditInput.Text <> Tribe[Me].ModelName[mix]) then 892 892 begin 893 893 ModelNameInfo.mix := mix; 894 ModelNameInfo.NewName := InputDlg.E Input.Text;894 ModelNameInfo.NewName := InputDlg.EditInput.Text; 895 895 if ModelNameInfo.GetCommandDataSize > CommandDataMaxSize then 896 896 Delete(ModelNameInfo.NewName, Length(ModelNameInfo.NewName) - -
trunk/Packages/CevoComponents/ScreenTools.pas
r473 r474 1795 1795 end; 1796 1796 1797 LogoBuffer := TBitmap.Create; 1798 LogoBuffer.PixelFormat := TPixelFormat.pf24bit; 1799 LogoBuffer.SetSize(BigBook.Width, BigBook.Height); 1797 if not Assigned(LogoBuffer) then begin 1798 LogoBuffer := TBitmap.Create; 1799 LogoBuffer.PixelFormat := TPixelFormat.pf24bit; 1800 LogoBuffer.SetSize(BigBook.Width, BigBook.Height); 1801 end; 1800 1802 1801 1803 LoadGraphicFile(Colors, GetGraphicsDir + DirectorySeparator + 'Colors.png'); -
trunk/Packages/DpiControls/Dpi.Graphics.pas
r468 r474 245 245 public 246 246 constructor Create; override; 247 destructor Destroy; override; 247 248 procedure BeginUpdate(ACanvasOnly: Boolean = False); 248 249 procedure EndUpdate(AStreamIsValid: Boolean = False); … … 630 631 end; 631 632 633 destructor TRasterImage.Destroy; 634 begin 635 FreeAndNil(FCanvas); 636 inherited; 637 end; 638 632 639 procedure TRasterImage.BeginUpdate(ACanvasOnly: Boolean); 633 640 begin -
trunk/Start.pas
r473 r474 1644 1644 else 1645 1645 InputDlg.Caption := Phrases.Lookup('TITLE_MAPNAME'); 1646 InputDlg.E Input.Text := List.Items[List.ItemIndex];1646 InputDlg.EditInput.Text := List.Items[List.ItemIndex]; 1647 1647 InputDlg.CenterToRect(BoundsRect); 1648 1648 InputDlg.ShowModal; 1649 NewName := InputDlg.E Input.Text;1649 NewName := InputDlg.EditInput.Text; 1650 1650 while (NewName <> '') and (NewName[1] = '~') do 1651 1651 Delete(NewName, 1, 1);
Note:
See TracChangeset
for help on using the changeset viewer.