Jump to content
Korean Random
EvilAlex

Создание инсталляторов для модпаков на базе Inno Setup

Recommended Posts

Ребят прошу еще помощи, можно ли как то сделать так:
Вот у меня есть рамка для картинки и описания, но картинка и описание появляется только тогда когда навожу на мод(Строчку) А можно сделать начальное изображение, то есть до того как я навел на мод(Строчку) курсор, изображение было, но как только я навожу оно пропадает, и на его месте появляется нужное изображение(от мода) Спасибо вам большое что помогаете таким нубам как я, я пытаюсь потихоньку, что то освоить но дается тяжело..   Прошу помогите, я у вас не часто просил, хоть все скрипты и Т.Д 
Взял у вас)
Спасибо вам большое)

Share this post


Link to post

Short link
Share on other sites

Ребят прошу еще помощи, можно ли как то сделать так:

Вот у меня есть рамка для картинки и описания, но картинка и описание появляется только тогда когда навожу на мод(Строчку) А можно сделать начальное изображение, то есть до того как я навел на мод(Строчку) курсор, изображение было, но как только я навожу оно пропадает, и на его месте появляется нужное изображение(от мода) Спасибо вам большое что помогаете таким нубам как я, я пытаюсь потихоньку, что то освоить но дается тяжело..   Прошу помогите, я у вас не часто просил, хоть все скрипты и Т.Д 

Взял у вас)

Спасибо вам большое)

Где-то выше кто-то выкладывал подобный пример.

Share this post


Link to post

Short link
Share on other sites

 

 

Где-то выше кто-то выкладывал подобный пример.

А примерно страничка))

Share this post


Link to post

Short link
Share on other sites

 

 

 хз, если честно. 25-50

Спасибо потому что пол форума пересмотрел не могу найти( 

Share this post


Link to post

Short link
Share on other sites

@Shpyrny, вот, нашёл что-то на подобии:

'скрипт'

[CustomMessages]
CompName1=Компонент 1
CompName2=Компонент 2
ComponentsInfo=Наведите курсор мыши на компонент, чтобы прочитать его описание.
ComponentsImgInfo=Наведите курсор мыши на компонент, чтобы посмотреть его превью.
CompDesc1=Описание первого компонента
CompDesc2=Описание второго компонента

[Files]
Source: "Image.bmp"; DestName: "CompDescImg1.bmp"; Flags: dontcopy
Source: "Image2.bmp"; DestName: "CompDescImg2.bmp"; Flags: dontcopy

[Types]
Name: full; Description: Full installation; Flags: iscustom

[Components]
Name: comp1; Description: "{cm:CompName1}"; Types: full
Name: comp2; Description: "{cm:CompName2}"; Types: full

[Code]
type
  TComponentDesc = record
    Description: String;
    ImageName: String;
    Index: Integer;
  end;

var
  CompDescs: array of TComponentDesc;
  CompDescPanel, CompDescImgPanel: TPanel;
  CompDescText: array[1..2] of TLabel;
  CompIndex, LastIndex: Integer;
  CompDescImg: TBitmapImage;

procedure ShowCompDescription(Sender: TObject; X, Y, Index: Integer; Area: TItemArea);
var
  i: Integer;
begin
  if Index = LastIndex then Exit;
  CompIndex := -1;
  for i := 0 to GetArrayLength(CompDescs) -1 do
  begin
    if (CompDescs[i].Index = Index) then
    begin
      CompIndex := i;
      Break;
    end;
  end;
  if (CompIndex >= 0) and (Area = iaItem) then
  begin
    if not FileExists(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName) then
      ExtractTemporaryFile(CompDescs[CompIndex].ImageName);
    CompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName);
    CompDescImg.Show;

    CompDescText[2].Caption := CompDescs[CompIndex].Description;
    CompDescText[2].Enabled := True;
  end else
  begin
    CompDescText[2].Caption := CustomMessage('ComponentsInfo');
    CompDescText[2].Enabled := False;
    CompDescImg.Hide;
  end;
  LastIndex := Index;
end;

procedure CompListMouseLeave(Sender: TObject);
begin
  CompDescImg.Hide;
  CompDescText[2].Caption := CustomMessage('ComponentsInfo');
  CompDescText[2].Enabled := False;
  LastIndex := -1;
end;

procedure AddCompDescription(AIndex: Integer; ADescription: String; AImageName: String);
var
  i: Integer;
begin
  i := GetArrayLength(CompDescs);
  SetArrayLength(CompDescs, i + 1);
  CompDescs[i].Description := ADescription;
  CompDescs[i].ImageName := AImageName;
  CompDescs[i].Index := AIndex - 1
end;

procedure InitializeWizard();
begin
  WizardForm.SelectComponentsLabel.Hide;
  WizardForm.TypesCombo.Hide;
  WizardForm.ComponentsList.SetBounds(ScaleX(0), ScaleY(0), ScaleX(184), ScaleY(205));
  WizardForm.ComponentsList.OnItemMouseMove:= @ShowCompDescription;
  WizardForm.ComponentsList.OnMouseLeave := @CompListMouseLeave;

  CompDescImgPanel := TPanel.Create(WizardForm);
  with CompDescImgPanel do
  begin
    Parent := WizardForm.SelectComponentsPage;
    SetBounds(ScaleX(192), ScaleY(0), ScaleX(225), ScaleY(120));
    BevelInner := bvLowered;
  end;

  CompDescText[1] := TLabel.Create(WizardForm);
  with CompDescText[1] do
  begin
    Parent := CompDescImgPanel;
    SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));
    AutoSize := False;
    WordWrap := True;
    Enabled := False;
    Caption := CustomMessage('ComponentsImgInfo');
  end;

  CompDescImg := TBitmapImage.Create(WizardForm);
  with CompDescImg do
  begin
    Parent := CompDescImgPanel;
    SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));
    Stretch := True;
    Hide;
  end;

  CompDescPanel := TPanel.Create(WizardForm);
  with CompDescPanel do
  begin
    Parent := WizardForm.SelectComponentsPage;
    SetBounds(ScaleX(192), ScaleY(125), ScaleX(225), ScaleY(80));
    BevelInner := bvLowered;
  end;

  CompDescText[2] := TLabel.Create(WizardForm);
  with CompDescText[2] do
  begin
    Parent := CompDescPanel;
    SetBounds(ScaleX(5), ScaleY(5), CompDescPanel.Width - ScaleX(10), CompDescPanel.Height - ScaleY(10));
    AutoSize := False;
    WordWrap := True;
    Enabled := False;
    Caption := CustomMessage('ComponentsInfo');
  end;

  AddCompDescription(1, CustomMessage('CompDesc1'), 'CompDescImg1.bmp');
  AddCompDescription(2, CustomMessage('CompDesc2'), 'CompDescImg2.bmp');
end;

Share this post


Link to post

Short link
Share on other sites
вот, нашёл что-то на подобии:

Прости меня я очень сильны нуб, адаптировать не могу, и хочу спросить его можно прикрепить через include?

И спасибо за скрипт) 

@Kotyarko_O, можешь как то научит адаортировать под под свой скрипт?

Потому что я что то не могу, буду очень благодарен)

Прости за наглость, я знаю что я не правильно делаю, но покажи мне как это делать, на будущее, что бы мог адаптировать под свои скрипты...

Edited by Shpyrny

Share this post


Link to post

Short link
Share on other sites
его можно прикрепить через include?

Можно, но придётся разделять процедуры InitializeWizard.

Давай свой скрипт, я тебе подключу. Но дальше уже сам (могу подсказывать некоторые мелочи), надо же самому учиться.

Edited by Kotyarko_O

Share this post


Link to post

Short link
Share on other sites

Давай свой скрипт, я тебе подключу. Но дальше уже сам (могу подсказывать некоторые мелочи), надо же самому учиться.

 Да я не спорю я только за, только подсказуй, хорошо?)

Я не знаю как прикреплять файлы на форуме( так что могу скинуть текст

#define MyAppName "ModPack by Clan Brothers Time 0.9.2" ;Название инстоллятора

#define MyInfoVer "1.1" ;Версия инсталлятора

#define MyAppVer "0.9.2" ;Версия игры

#define MyAppPublisher "Expoint" ;Имя компании или человека кто делал

#define MyAppURL "http://yandex.ru"

#define MyAppSupportURL "http://yandex.ru" ;Ссылка для лого

#define Patch "0.9.2"

#define Patch1 "0.9.2-backup"

 

 

#include "Components.iss" ;Компаненты, они же моды

#include "Модули/Messages.iss" ;Сообщение, надписи на кнопках и т.д.

#include "Модули/BackUpPage.iss" ;Резерное копирование или удаление res_mods

#include "CustomMessages.iss" ;Описание модов ;скин

#include "Check For Run.iss"

 

[setup]

AppName={#MyAppName}

AppVersion={#MyAppVer}

;AppVerName={#MyAppName} {#MyAppVersion}

AppPublisher={#MyAppPublisher}

 

//====={ Ссылки }=====\\

AppPublisherURL={#MyAppURL}

AppSupportURL={#MyAppURL}

AppUpdatesURL={#MyAppURL}

 

//====={ Папка устанвки }=====\\

;DefaultDirName={pf}\{#MyAppName}

DefaultDirName={reg:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{1EAC1D02-C6AC-4FA6-9A44-96258C37C812RU%7d_is1,InstallLocation|{pf}\World_of_Tanks}

DefaultGroupName={#MyAppName}

 

//====={ Картинки }=====\\

SetupIconFile=Files\qqq.ico

WizardSmallImageFile=Files\Small.bmp

WizardImageFile=Files\img1.bmp

 

//====={ Отключение строниц }=====\\

DisableProgramGroupPage=yes

 

//====={ Лицензия и Фак }=====\\

LicenseFile=licensia.rtf

InfoBeforeFile=faq.rtf

 

//====={ Папка создания и название сетапа }=====\\

OutputDir=.\Output

OutputBaseFilename={#MyAppName}

 

//====={ Сжатие сетапа }=====\\

InternalCompressLevel=ultra64

Compression=lzma2/ultra64

 

//====={ Сюда прописываешь те файлы и папки которые закинул в Mods }=====\\

WizardImageBackColor=$0000CC99

DisableStartupPrompt=False

AlwaysShowDirOnReadyPage=True

FlatComponentsList=False

ShowTasksTreeLines=True

AlwaysShowGroupOnReadyPage=True

 

//====={ Основные файлы сетапа }=====\\

[Files]

Source: "Files\Splash.png"; DestDir: {tmp}; Flags: dontcopy nocompression

Source: "Files\isgsg.dll"; Flags: dontcopy;

Source: Files\logo.bmp; Flags: dontcopy noencryption noencryption

Source: Files\logo2.bmp; Flags: dontcopy noencryption noencryption

Source: "Files\img_mod\1.bmp"; DestName: "CompDescImg1.bmp"; Flags: dontcopy

Source: "Files\img_mod\2.bmp"; DestName: "CompDescImg3.bmp"; Flags: dontcopy

Source: "Files\img_mod\3.bmp"; DestName: "CompDescImg4.bmp"; Flags: dontcopy

Source: "Files\img_mod\1.bmp"; DestName: "CompDescImg2.bmp"; Flags: dontcopy

 

procedure ShowSplashScreen(p1:HWND;p2:AnsiString;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer);

external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';

 

{ RedesignWizardFormBegin } // Не удалять эту строку!

// Не изменять эту секцию. Она создана автоматически.

var

OldEvent_LicenseAcceptedRadioClick: TNotifyEvent;

 

procedure LicenseAcceptedRadioClick(Sender: TObject); forward;

 

procedure RedesignWizardForm;

begin

with WizardForm.LicenseAcceptedRadio do

begin

Left := ScaleX(392);

Top := ScaleY(216);

OldEvent_LicenseAcceptedRadioClick := OnClick;

OnClick := @LicenseAcceptedRadioClick;

end;

 

{ ReservationBegin }

// Вы можете добавить ваш код здесь.

 

{ ReservationEnd }

end;

// Не изменять эту секцию. Она создана автоматически.

{ RedesignWizardFormEnd } // Не удалять эту строку!

 

procedure LicenseAcceptedRadioClick(Sender: TObject);

begin

OldEvent_LicenseAcceptedRadioClick(Sender);

end;

 

procedure LogoOnClick(Sender: TObject);

var ResCode: Integer;

begin

ShellExec('', '{#MyAppURL}', '' , '', SW_SHOW, ewNoWait, ResCode)

end;

var

BitmapImage1: TBitmapImage;

procedure RedesignWizardForm2;

var

i: integer;

BtnPanel: TPanel;

BtnImage: TBitmapImage;

begin

ExtractTemporaryFile('logo.bmp')

BtnPanel:=TPanel.Create(WizardForm)

with BtnPanel do begin

Left:=0

Top:=490

Width:=120

Height:=50

Cursor:=crHand

OnClick:=@logoOnClick

Parent:=WizardForm

end;

BtnImage:=TBitmapImage.Create(WizardForm)

with BtnImage do begin

AutoSize:=True;

Enabled:=False;

Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\logo.bmp')

Parent:=BtnPanel

end;

end;

//////////////////////////

 

///////////////////////

 

procedure LogoOnClick1(Sender: TObject);

var

ResCode: Integer;

begin

ShellExec('', '{#MyAppSupportURL}', '' , '', SW_SHOW, ewNoWait, ResCode)

end;

procedure RedesignWizardForm3;

var

BtnPanel: TPanel;

BtnImage: TBitmapImage;

begin

ExtractTemporaryFile('logo2.bmp')

BtnPanel:=TPanel.Create(WizardForm)

with BtnPanel do

begin

Left:=130

Top:=490

Width:=120

Height:=50

Cursor:=crHand

OnClick:=@logoOnClick1

Parent:=WizardForm

end;

BtnImage:=TBitmapImage.Create(WizardForm)

with BtnImage do

begin

AutoSize:=True;

Enabled:=False;

Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\logo2.bmp')

Parent:=BtnPanel

end;

end;

 

function WindowResize(): Boolean;

var

HeightOffset, WidthOffset: Integer;

begin

HeightOffset:=170;

WidthOffset:=200;

 

WizardForm.Height:=WizardForm.Height + HeightOffset;

WizardForm.Width:=WizardForm.Width + WidthOffset;

 

WizardForm.NextButton.Top:=WizardForm.NextButton.Top + HeightOffset;

WizardForm.BackButton.Top:=WizardForm.BackButton.Top + HeightOffset;

WizardForm.CancelButton.Top:=WizardForm.CancelButton.Top + HeightOffset;

WizardForm.NextButton.Left:=WizardForm.NextButton.Left + WidthOffset;

WizardForm.BackButton.Left:=WizardForm.BackButton.Left + WidthOffset;

WizardForm.CancelButton.Left:=WizardForm.CancelButton.Left + WidthOffset;

 

WizardForm.OuterNotebook.Height:=WizardForm.OuterNotebook.Height + HeightOffset;

WizardForm.InnerNotebook.Height:=WizardForm.InnerNotebook.Height + HeightOffset;

WizardForm.OuterNotebook.Width:=WizardForm.OuterNotebook.Width + WidthOffset;

WizardForm.InnerNotebook.Width:=WizardForm.InnerNotebook.Width + WidthOffset;

WizardForm.WizardSmallBitmapImage.Left:= WizardForm.WizardSmallBitmapImage.Left + WidthOffset;

WizardForm.Bevel.Top:=WizardForm.Bevel.Top + HeightOffset;

WizardForm.BeveledLabel.Top:=WizardForm.BeveledLabel.Top + HeightOffset;

WizardForm.Bevel.Width:=WizardForm.Bevel.Width + WidthOffset;

WizardForm.Bevel1.Width:=WizardForm.Bevel1.Width + WidthOffset;

WizardForm.MainPanel.Width:=WizardForm.MainPanel.Width + WidthOffset;

WizardForm.BeveledLabel.Width:=WizardForm.BeveledLabel.Width + WidthOffset;

WizardForm.Center;

 

{ /// --- Раскомментировать при желании ---- ///

WizardForm.WelcomeLabel1.Hide;

WizardForm.WelcomeLabel2.Hide;

WizardForm.FinishedLabel.Hide;

WizardForm.FinishedHeadingLabel.Hide;

WizardForm.WizardBitmapImage.Width:=600;

WizardForm.WizardBitmapImage.Height:=400;

WizardForm.WizardBitmapImage2.Width:=600;

WizardForm.WizardBitmapImage2.Height:=400;

WizardForm.PageNameLabel.Hide;

WizardForm.PageDescriptionLabel.Hide;

WizardForm.WizardSmallBitmapImage.Top:=0;

WizardForm.WizardSmallBitmapImage.Left:=0;

WizardForm.WizardSmallBitmapImage.Width:=WizardForm.Width;

WizardForm.WizardSmallBitmapImage.Height:=58;

/// --- Конец ---- ///

}

WizardForm.WelcomeLabel1.Hide;

WizardForm.WelcomeLabel2.Hide;

WizardForm.WizardBitmapImage.Width:=697;

WizardForm.WizardBitmapImage.Height:=483;

 

WizardForm.FinishedHeadingLabel.Hide;

WizardForm.FinishedLabel.Hide;

WizardForm.YesRadio.Hide;

WizardForm.NoRadio.Hide;

WizardForm.WizardBitmapImage2.Width:=697;

WizardForm.WizardBitmapImage2.Height:=483;

 

WizardForm.PageNameLabel.Hide;

WizardForm.PageDescriptionLabel.Hide;

WizardForm.WizardSmallBitmapImage.Top:=0;

WizardForm.WizardSmallBitmapImage.Left:=0;

WizardForm.WizardSmallBitmapImage.Width:=697;

WizardForm.WizardSmallBitmapImage.Height:=58;

 

WizardForm.WelcomeLabel1.Width:=WizardForm.WelcomeLabel1.Width + WidthOffset;

WizardForm.WelcomeLabel1.Height:=WizardForm.WelcomeLabel1.Height + HeightOffset;

WizardForm.WelcomeLabel1.Width:=WizardForm.WelcomeLabel1.Width + WidthOffset;

 

WizardForm.WelcomeLabel2.Width:=WizardForm.WelcomeLabel2.Width + WidthOffset;

WizardForm.WelcomeLabel2.Height:=WizardForm.WelcomeLabel2.Height + HeightOffset;

WizardForm.WelcomeLabel2.Width:=WizardForm.WelcomeLabel2.Width + WidthOffset;

 

 

WizardForm.LicenseLabel1.Width:=WizardForm.LicenseLabel1.Width + WidthOffset;

WizardForm.LicenseMemo.Height:=WizardForm.LicenseMemo.Height + HeightOffset;

WizardForm.LicenseMemo.Width:=WizardForm.LicenseMemo.Width + WidthOffset;

WizardForm.LicenseNotAcceptedRadio.Top:=WizardForm.LicenseNotAcceptedRadio.Top + HeightOffset;

WizardForm.LicenseAcceptedRadio.Top:=WizardForm.LicenseAcceptedRadio.Top + HeightOffset;

 

WizardForm.InfoBeforeClickLabel.Width:=WizardForm.InfoBeforeClickLabel.Width + WidthOffset;

WizardForm.InfoBeforeMemo.Height:=WizardForm.InfoBeforeMemo.Height + HeightOffset;

WizardForm.InfoBeforeMemo.Width:=WizardForm.InfoBeforeMemo.Width + WidthOffset;

 

WizardForm.SelectDirLabel.Width:=WizardForm.SelectDirLabel.Width + WidthOffset;

WizardForm.SelectDirBrowseLabel.Width:=WizardForm.SelectDirBrowseLabel.Width + WidthOffset;

WizardForm.DiskSpaceLabel.Top:=WizardForm.DiskSpaceLabel.Top + HeightOffset;

WizardForm.DirBrowseButton.Left:=WizardForm.DirBrowseButton.Left + HeightOffset;

WizardForm.DirEdit.Width:=WizardForm.DirEdit.Width + HeightOffset;

 

WizardForm.ComponentsDiskSpaceLabel.Top:=WizardForm.ComponentsDiskSpaceLabel.Top + HeightOffset;

WizardForm.SelectComponentsLabel.Width:=WizardForm.SelectComponentsLabel.Width + WidthOffset;

WizardForm.ComponentsList.Height:=WizardForm.ComponentsList.Height + HeightOffset;

WizardForm.ComponentsList.Width:=WizardForm.ComponentsList.Width + WidthOffset;

 

WizardForm.ReadyLabel.Width:=WizardForm.ReadyLabel.Width + WidthOffset;

WizardForm.ReadyMemo.Height:=WizardForm.ReadyMemo.Height + HeightOffset;

WizardForm.ReadyMemo.Width:=WizardForm.ReadyMemo.Width + WidthOffset;

 

WizardForm.ProgressGauge.Width:=WizardForm.ProgressGauge.Width + HeightOffset;

WizardForm.FilenameLabel.Width:=WizardForm.FilenameLabel.Width + HeightOffset;

WizardForm.StatusLabel.Width:=WizardForm.StatusLabel.Width + HeightOffset;

end;

 

/// --- /// --- /// --- /// --- /// --- /// --- /// --- /// --- /// --- /// --- /// --- ///

 

type

TComponentDesc = record

Description: String;

ImageName: String;

Index: Integer;

end;

 

var

CompDescs: array of TComponentDesc;

CompDescPanel, CompDescImgPanel: TPanel;

CompDescText: array[1..2] of TLabel;

CompIndex, LastIndex: Integer;

CompDescImg: TBitmapImage;

 

procedure ShowCompDescription(Sender: TObject; X, Y, Index: Integer; Area: TItemArea);

var

i: Integer;

begin

if Index = LastIndex then Exit;

CompIndex := -1;

for i := 0 to GetArrayLength(CompDescs) -1 do

begin

if (CompDescs[i].Index = Index) then

begin

CompIndex := i;

Break;

end;

end;

if (CompIndex >= 0) and (Area = iaItem) then

begin

if not FileExists(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName) then

ExtractTemporaryFile(CompDescs[CompIndex].ImageName);

CompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName);

CompDescImg.Show;

 

CompDescText[2].Caption := CompDescs[CompIndex].Description;

CompDescText[2].Enabled := True;

end else

begin

CompDescText[2].Caption := CustomMessage('ComponentsInfo');

CompDescText[2].Enabled := False;

CompDescImg.Hide;

end;

LastIndex := Index;

end;

 

procedure CompListMouseLeave(Sender: TObject);

begin

CompDescImg.Hide;

CompDescText[2].Caption := CustomMessage('ComponentsInfo');

CompDescText[2].Enabled := False;

LastIndex := -1;

end;

 

procedure AddCompDescription(AIndex: Integer; ADescription: String; AImageName: String);

var

i: Integer;

begin

i := GetArrayLength(CompDescs);

SetArrayLength(CompDescs, i + 1);

CompDescs[i].Description := ADescription;

CompDescs[i].ImageName := AImageName;

CompDescs[i].Index := AIndex - 1

end;

procedure InitializeWizard();

begin

RedesignWizardForm;

InitializeWizard1(); {из BackUpPage.iss}

RedesignWizardForm2;

RedesignWizardForm3;

WindowResize();

 

ExtractTemporaryFile('Splash.png');

ShowSplashScreen(WizardForm.Handle, ExpandConstant('{tmp}\Splash.png'), 1500, 2500, 1500, 0, 255, True, $FFFFFF, 10);

 

begin

WizardForm.SelectComponentsLabel.Hide;

WizardForm.TypesCombo.Hide;

WizardForm.ComponentsList.SetBounds(ScaleX(260), ScaleY(20), ScaleX(357), ScaleY(333));

WizardForm.ComponentsList.OnItemMouseMove:= @ShowCompDescription;

WizardForm.ComponentsList.OnMouseLeave := @CompListMouseLeave;

 

CompDescImgPanel := TPanel.Create(WizardForm);

with CompDescImgPanel do

begin

Parent := WizardForm.SelectComponentsPage;

SetBounds(ScaleX(0), ScaleY(20), ScaleX(253), ScaleY(203)); //рамка картинки

BevelInner := bvLowered;

end;

 

CompDescText[1] := TLabel.Create(WizardForm);

with CompDescText[1] do

begin

Parent := CompDescImgPanel;

SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));

AutoSize := False;

WordWrap := True;

Enabled := False;

Font.Color :=clBlack;

Caption := CustomMessage('ComponentsImgInfo');

end;

 

CompDescImg := TBitmapImage.Create(WizardForm);

with CompDescImg do

begin

Parent := CompDescImgPanel;

SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));

Stretch := True;

Hide;

end;

 

CompDescPanel := TPanel.Create(WizardForm);

with CompDescPanel do

begin

Parent := WizardForm.SelectComponentsPage;

SetBounds(ScaleX(0), ScaleY(230), ScaleX(253), ScaleY(123)); //Нижния рамка

BevelInner := bvLowered;

end;

 

 

 

CompDescText[2] := TLabel.Create(WizardForm);

with CompDescText[2] do

begin

Parent := CompDescPanel;

SetBounds(ScaleX(5), ScaleY(5), CompDescPanel.Width - ScaleX(10), CompDescPanel.Height - ScaleY(10));

AutoSize :=False;

WordWrap := True;

Enabled := False;

Font.Color :=clBlack;

Caption := CustomMessage('ComponentsInfo');

end;

 

AddCompDescription(1, CustomMessage('CompDesc1'), 'CompDescImg1.bmp');

AddCompDescription(2, CustomMessage('CompDesc2'), 'CompDescImg2.bmp');

AddCompDescription(3, CustomMessage('CompDesc3'), 'CompDescImg3.bmp');

AddCompDescription(4, CustomMessage('CompDesc4'), 'CompDescImg4.bmp');

 

 

 

end;

end;

Share this post


Link to post

Short link
Share on other sites

Я не знаю как прикреплять файлы на форуме

Нажми кнопку "Дополнительно".

 

Scipt.rar (не проверял).

Share this post


Link to post

Short link
Share on other sites

@Shpyrny, type и всё, что в нём объявляется, поставь перед var.

Edited by Kotyarko_O
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

 

 

type и всё, что в нём объявляется поставь перед var

Это заместь type  ставить var, не чего не меняеться, ставил перед ошибкой var нечего не меняеться можешь показать на примере, потому что я не догоняю, пример маленький в пару строк.. 

Share this post


Link to post

Short link
Share on other sites

Это заместь type  ставить var, не чего не меняеться, ставил перед ошибкой var нечего не меняеться можешь показать на примере, потому что я не догоняю, пример маленький в пару строк.. 

type
TComponentDesc = record
Description: String;
ImageName: String;
Index: Integer;
end;

var
OldEvent_LicenseAcceptedRadioClick: TNotifyEvent;
CompDescs: array of TComponentDesc;
CompDescPanel, CompDescImgPanel: TPanel;
CompDescText: array[1..2] of TLabel;
CompIndex, LastIndex: Integer;
CompDescImg: TBitmapImage;

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

 

 

Это заместь type  ставить var, не чего не меняется, ставил перед ошибкой var нечего не меняеться можешь показать на примере, потому что я не догоняю, пример маленький в пару строк.. 

Как это делать я не могу понять, но код как то не помог картинок как не было так и нет, появляются только при наведении..
Мне нужно было что бы, картинка изначально была там, а при наведении на мод она менялась,  на ту что закреплена за ним, с прозрачным фоном как то не очень смотрится,  жалко что скрипт не подошел, а тебе огромное спасибо, за всю твою помощь, и за попытку научить меня днину...

Share this post


Link to post

Short link
Share on other sites

@Shpyrny, так просто можно картинку туда изначально пихнуть. А изображения компонентов будут поверх отображаться.

Я думал, что ты хоть что-то знаешь.

В шапке темы есть куча примеров от меня. Скачай, смотри, жуй.

Edited by Kotyarko_O

Share this post


Link to post

Short link
Share on other sites

 

 

Я думал, что ты хоть что-то знаешь. В шапке темы есть куча примеров от меня. Скачай, смотри, жуй.

Прости только начал, не знаю почти не  чего...
Спасибо еще раз за помощь)

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...