@@ -32,9 +32,7 @@ BackSolid=yes
3232DisableWelcomePage = yes
3333
3434[Files]
35- Source : " bc1.bmp" ; Flags : dontcopy
36- Source : " bc2.bmp" ; Flags : dontcopy
37- Source : " bc3.bmp" ; Flags : dontcopy
35+ Source : " bg.bmp" ; Flags : dontcopy
3836
3937[Languages]
4038Name : " english" ; MessagesFile : " compiler:Default.isl"
5149 Container: TPanel;
5250 Content: TPanel;
5351 end ;
52+ BcLabelArray = array [1 ..4 ] of TLabel;
5453
5554var
56- AuthPageID: Integer;
57- ComponentPageID: Integer;
55+ // Page IDs
56+ AuthPageID, ComponentPageID, DownloadPageID : Integer;
57+
5858 AuthLabel: TNewStaticText;
59- StdColor: TColor;
6059
60+ // "Standard" blue color used throughout the installer
61+ StdColor: TColor;
62+
63+ // Breadcrumb image
64+ Breadcrumbs: TBitmapImage;
65+
66+ // Breadcrumb labels, we store references to these in an array for convenience
67+ BreadcrumbLabel: BcLabelArray;
68+
69+ // Converts a color String in the format '$rrggbb' to a TColor value
6170function StringToColor (Color: String): TColor;
6271var
6372 RR, GG, BB: String;
@@ -533,20 +542,68 @@ begin
533542 Result := IDPForm.Page.ID;
534543end ;
535544
545+ procedure SelectBreadcrumb (Index: Integer);
546+ var
547+ I: Integer;
548+ ItemColor: TColor;
549+ begin
550+ for I := 1 to 4 do
551+ begin
552+ if (I = Index) then
553+ begin
554+ ItemColor := StdColor;
555+ BreadcrumbLabel[I].Font.Style := BreadcrumbLabel[I].Font.Style + [fsBold];
556+ end
557+ else
558+ begin
559+ ItemColor := StringToColor(' $cccccc' );
560+ BreadcrumbLabel[I].Font.Style := BreadcrumbLabel[I].Font.Style - [fsBold];
561+ end ;
562+
563+ BreadcrumbLabel[I].Font.Color := ItemColor;
564+ BreadcrumbLabel[I].Width := 120 ;
565+ BreadcrumbLabel[I].Alignment := taCenter;
566+
567+ with Breadcrumbs.Bitmap.Canvas do
568+ begin
569+ Brush.Color := ItemColor;
570+ Brush.Style := bsSolid;
571+ Pen.Color := ItemColor;;
572+ Ellipse(BreadcrumbLabel[I].Left + 54 , 22 , BreadcrumbLabel[I].Left + 64 , 12 );
573+ end ;
574+ end ;
575+ end ;
576+
536577procedure CurPageChanged (CurPageID: Integer);
537578begin
538579 if (CurPageID = AuthPageID) then
539580 begin
540581 Wizardform.NextButton.Enabled := False;
582+ SelectBreadcrumb(1 );
583+ end else if (CurPageID = ComponentPageID) then
584+ begin
585+ SelectBreadcrumb(2 );
541586 end ;
542587end ;
543588
589+ procedure CreateBreadcrumbLabel (Index: Integer; Caption: String);
590+ begin
591+ BreadcrumbLabel[Index] := TLabel.Create(WizardForm.MainPanel);
592+ BreadcrumbLabel[Index].Caption := Caption;
593+ BreadcrumbLabel[Index].Parent := WizardForm.MainPanel;
594+ BreadcrumbLabel[Index].Font.Color := StringToColor(' $cccccc' );
595+ BreadcrumbLabel[Index].Font.Size := 8 ;
596+ BreadcrumbLabel[Index].Top := 24 ;
597+ BreadcrumbLabel[Index].Left := 36 + ((Index - 1 ) * 120 );
598+ BreadcrumbLabel[Index].Width := 120 ;
599+ BreadcrumbLabel[Index].Alignment := taCenter;
600+ end ;
601+
544602procedure InitializeWizard ();
545603var
546604 BackgroundBitmapImage: TBitmapImage;
547605 BackgroundBitmapText: TNewStaticText;
548606 BitmapFileName: String;
549- BitmapImage: TBitmapImage;
550607begin
551608 StdColor := StringToColor(' $0093d9' );
552609
@@ -563,21 +620,34 @@ begin
563620
564621 // Set the width of the top panel
565622 WizardForm.MainPanel.Width := 920 ;
566- // WizardForm.MainPanel.Color := clGreen;
567-
568623
569624 WizardForm.WizardSmallBitmapImage.Visible := false;
570625
571- BitmapFileName := ExpandConstant(' {tmp}\bc1.bmp' );
626+ Breadcrumbs := TBitmapImage.Create(WizardForm.MainPanel);
627+ Breadcrumbs.Parent := WizardForm.MainPanel;
628+ Breadcrumbs.Top := 0 ;
629+ Breadcrumbs.Left := 0 ;
630+ Breadcrumbs.Width := 600 ;
631+ Breadcrumbs.Height := 50 ;
632+ Breadcrumbs.AutoSize := True;
633+
634+ BitmapFileName := ExpandConstant(' {tmp}\bg.bmp' );
572635 ExtractTemporaryFile(ExtractFileName(BitmapFileName));
573636
574- BitmapImage := TBitmapImage.Create(WizardForm.MainPanel);
575- BitmapImage.AutoSize := False;
576- BitmapImage.Bitmap.LoadFromFile(BitmapFileName);
577- BitmapImage.Parent := WizardForm.MainPanel;
578- BitmapImage.Width := 535 ;
579- BitmapImage.Height := 28 ;
580- BitmapImage.Top := 18 ;
637+ Breadcrumbs.Bitmap.LoadFromFile(BitmapFileName);
638+
639+ with Breadcrumbs.Bitmap.Canvas do
640+ begin
641+ Pen.Color := StringToColor(' $cccccc' );
642+ MoveTo(1 , 16 );
643+ LineTo(460 ,16 );
644+ end ;
645+
646+ // Create the breadcrumb labels
647+ CreateBreadcrumbLabel(1 , ' Install Setup' );
648+ CreateBreadcrumbLabel(2 , ' Confirmation' );
649+ CreateBreadcrumbLabel(3 , ' Download && Install' );
650+ CreateBreadcrumbLabel(4 , ' Get Started' );
581651
582652 WizardForm.BorderStyle := bsSingle;
583653 WizardForm.Color := clWhite;
@@ -618,7 +688,8 @@ begin
618688
619689 // idpDownloadAfter(wpWelcome);
620690
621- createDownloadForm(wpReady);
691+ DownloadPageID := createDownloadForm(ComponentPageID);
692+
622693 idpConnectControls;
623694 idpInitMessages;
624695end ;
0 commit comments