Andrew_Dark Posted June 5, 2014 Share Posted June 5, 2014 Здравствуйте, уважаемые пользователи форума, долго мучаясь, пришёл к выводу, что сделать инсталлятор для модов у меня не получается, поэтому прошу оказать помощь вас... Моды у меня разпиханы по папкам, друг с другом не конфликтуют при установке "сверху", но есть некоторые "но", которые должны быть соблюдены: 1) В инсталляторе должен быть список выбора модов типа 1, 1.1, 1.2, 2, 2.1 и тд. 2) Добавлены готовые картинки лого (есть в наличии). (картинки к самим модам могу запилить, если нужно и сможете запихнуть в модпак). 3) Готовый модпак не должен занимать много места (не более 1ГБ). Исходные файлы модов имеют размер до 1.2 ГБ. (если настроите копирование озвучки с папки res, с добавлением файлов озвучки екипажа и "лампочки" "сверху", то размер будет наполовину меньше). 4) Модпак должен удалять по запросу пользователя все моды с папки с модами (или оставлять всё как есть). В модпаке будет указан ваш ник или имя (по вашему желанию) как создателя модпака, список модов и сами моды, в разделе faq. Данную помощь прошу сделать бесплатно, так как ясейчас пока студент:) и немного на мели:) Но со своей стороны могу помочь вам и вашим знакомым в: настройке и ускорении работы ПК (результат гарантирую), удалении вирусов при невозможности удаления вашим антивирусом (у вас должно быть подключение к интернету), исправлении некоректной работы драйверов, их настройка внутри системы, и тд. Кто может помочь, пишите тут или в скайп kozyrniy2. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Kotyarko_O Posted June 5, 2014 Share Posted June 5, 2014 @Darksoul, тут есть готовые примеры. @ Quote Link to comment Short link Share on other sites More sharing options...
Andrew_Dark Posted June 5, 2014 Author Share Posted June 5, 2014 Знаю, пробовал сделать, у меня не выходит, поэтому и прошу помощи:( Я не знаю как сделать, чтобы правильно его скомпилировать:) @ Quote Link to comment Short link Share on other sites More sharing options...
Vupu Posted June 5, 2014 Share Posted June 5, 2014 используй мастер и скачай примеры почитай эту тему и вникни 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Andrew_Dark Posted June 5, 2014 Author Share Posted June 5, 2014 (edited) да я пробовал, написал же об этом выше... Edited June 6, 2014 by Darksoul @ Quote Link to comment Short link Share on other sites More sharing options...
Andrew_Dark Posted June 7, 2014 Author Share Posted June 7, 2014 Чё все такие добрые, помочь нет желания? @ Quote Link to comment Short link Share on other sites More sharing options...
Azbuka Posted June 7, 2014 Share Posted June 7, 2014 помочь нет желания?Вам уже помогли - дали тему с кучей примеров, вики с основами.За вас никто ничего делать не будет. "Если хочешь помочь голодному - дай ему семян, а не хлеб" 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Andrew_Dark Posted June 7, 2014 Author Share Posted June 7, 2014 дали тему с кучей примеров, вики с основами. За это спасибо конечно, уже замутил модпак, но пока только однофайловый, будем пробовать, просто не понимаю такую штуку, допустим я создал 3 папки из 3 разных модов, прописал откуда их брать в основной скрипт, но как сделать что был выбор этих компонентов при установке я никак не пойму. @ Quote Link to comment Short link Share on other sites More sharing options...
Vupu Posted June 8, 2014 Share Posted June 8, 2014 скачал пример там есть кампонент лист вот и прописывай их там 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Andrew_Dark Posted June 8, 2014 Author Share Posted June 8, 2014 (edited) Так, всем кто советовал тему с инструкциями выше, после 7 раза немного дошло, единственное что осталось выяснить, это как прописать фон для инсталлятора в самом скрипте, чтобы заменить фон на странице с списком модов. и ещё что я тут в коде напартачил? стараюсь прицепить фон кнопок. вот кусок кода: 'Развернуть' procedure RedesignWizardForm;beginwith WizardForm dobeginAutoScroll := False;end;end;constUNDEF_INDEX = -777;function GetCursorPos(var lpPoint: TPoint): BOOL; external '[email protected] stdcall';varInfoPic: TBitmapImage;LastIndex: Integer;TempPath: String;procedure ShowPicHint(const PicFilePath: String);varpt: TPoint;beginif not GetCursorPos(pt) then Exit;InfoPic.Bitmap.LoadFromFile(PicFilePath);InfoPic.SetBounds(ScaleX(1), ScaleY(41), ScaleX(250), ScaleY(200)); // êàðòèíêàInfoPic.Show;end;procedure CompOnItemMouseMove(Sender: TObject; X, Y: Integer; Index: Integer; Area: TItemArea);varUndefPic: String;beginif Index = -1 then Exit;if Index = LastIndex then Exit;trycase TNewCheckListBox(Sender).ItemCaption[index] of//-----------------------ÊÀÐÒÈÍÊÈ----------------------------\\'1. Êîìïëåêñíûé ìîä XVM v2.1': UndefPic := '1.bmp'; // ïèøåì òî÷íî òàê æå, êàê ïðîïèñàíî â êîìïîíåíòàõ'1.2 Èêîíêè òàíêîâ.': UndefPic := '2.bmp';elsebeginLastIndex := UNDEF_INDEX;InfoPic.Hide;Exit;end;end;if not FileExists(TempPath + UndefPic) then ExtractTemporaryFile(UndefPic);ShowPicHint(TempPath + UndefPic);finallyLastIndex := Index;end;end;procedure CompOnMouseLeave(Sender: TObject);beginInfoPic.Hide;LastIndex := -1;end;procedure InitInfo();beginWizardForm.TypesCombo.Hide;WizardForm.ComponentsList.SetBounds(ScaleX(260), ScaleY(40), ScaleX(155), ScaleY(153));WizardForm.ComponentsList.OnItemMouseMove := @CompOnItemMouseMove;WizardForm.ComponentsList.OnMouseLeave := @CompOnMouseLeave;TempPath := AddBackslash(ExpandConstant('{tmp}'));LastIndex := UNDEF_INDEX;with TBevel.Create(WizardForm) dobeginParent := WizardForm.SelectComponentsPage;SetBounds(ScaleX(0), ScaleY(40), ScaleX(253), ScaleY(203)); //ðàìêà êàðòèíêèShape := bsFrame;end;with TBevel.Create(WizardForm) dobeginParent := WizardForm.SelectComponentsPage;SetBounds(ScaleX(0), ScaleY(250), ScaleX(253), ScaleY(113)); //Íèæíèÿ ðàìêàShape := bsFrame;end;InfoPic := TBitmapImage.Create(WizardForm)with InfoPic dobeginParent := WizardForm.SelectComponentsPage;SetBounds(ScaleX(1), ScaleY(251), ScaleX(250), ScaleY(110));ExtractTemporaryFile('WizardForm.BitmapImage1.bmp');Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage1.bmp'));end;end;procedure InitializeWizard();beginInitializeWizard1(); {èç BackUpPage.iss, åñëè ÷òî}RedesignWizardForm;InitInfo();beginWindowResize();end;end;procedure ButtonLabelClick(Sender: TObject);varButton: TButton;ButtonPanel: array [0..4] of TPanel;ButtonImage: array [0..4] of TBitmapImage;ButtonLabel: array [0..4] of TLabel;beginwith WizardForm dobegincase TLabel(Sender).Tag of0: Button := BackButton;1: Button := NextButton;2: Button := CancelButton;3: Button := DirBrowseButton;4: Button := GroupBrowseButton;else exitend;end;Button.OnClick(Button);end;procedure ButtonLabelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);beginButtonImage[TLabel(Sender).Tag].Left:= -ScaleX({#ButtonWidth});end;procedure ButtonLabelMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);beginButtonImage[TLabel(Sender).Tag].Left := ScaleX(0);end;procedure LoadButtonImage(AButton: TButton; AButtonIndex: integer);varImage: TBitmapImage;Panel: TPanel;Labl: TLabel;beginPanel:=TPanel.Create(WizardForm)with Panel dobeginSetBounds(AButton.Left,AButton.Top,AButton.Width,AButton.Height);Tag := AButtonIndex;Parent := AButton.Parent;end;ButtonPanel[AButtonIndex] := Panel;Image:=TBitmapImage.Create(WizardForm)with Image dobeginWidth := ScaleX({#TextureWidth});Height := ScaleY({#TextureHeight});Enabled := False;Bitmap.LoadFromResourceName(HInstance, '_IS_BUTTON');Parent := Panel;end;ButtonImage[AButtonIndex]:=Image;with TLabel.Create(WizardForm) dobeginTag := AButtonIndex;Parent := Panel;Width := Panel.Width;Height := Panel.Height;Transparent := True;OnClick := @ButtonLabelClick;OnDblClick := @ButtonLabelClick;OnMouseDown := @ButtonLabelMouseDown;OnMouseUp := @ButtonLabelMouseUp;end;Labl:=TLabel.Create(WizardForm)with Labl dobeginAutosize := True;Alignment := taCenter;Tag := AButtonIndex;Transparent := True;Font.Color := {#ButtonFontColor};Caption := AButton.Caption;OnClick := @ButtonLabelClick;OnMouseDown := @ButtonLabelMouseDown;OnMouseUp := @ButtonLabelMouseUp;OnDblClick := @ButtonLabelClick;Parent := Panel;end;ButtonLabel[AButtonIndex]:= Labl;end;procedure UpdateButton(AButton: TButton;AButtonIndex: integer);beginButtonPanel[AButtonIndex].Visible := AButton.Visible;with ButtonLabel[AButtonIndex] dobeginCaption := AButton.Caption;Left := ButtonPanel[AButtonIndex].Width div 2 - ButtonLabel[AButtonIndex].Width div 2;Top := ButtonPanel[AButtonIndex].Height div 2 - ButtonLabel[AButtonIndex].Height div 2;end;end;procedure InitializeWizard();beginwith WizardForm dobeginBackButton.Width:={#ButtonWidth};BackButton.Height:={#ButtonHeight};NextButton.Width:={#ButtonWidth};NextButton.Height:={#ButtonHeight};CancelButton.Width:={#ButtonWidth};CancelButton.Height:={#ButtonHeight};DirBrowseButton.Width:={#ButtonWidth};DirBrowseButton.Height:={#ButtonHeight};GroupBrowseButton.Width:={#ButtonWidth};GroupBrowseButton.Height:={#ButtonHeight};LoadButtonImage(BackButton,0);LoadButtonImage(NextButton,1);LoadButtonImage(CancelButton,2);LoadButtonImage(DirBrowseButton,3);LoadButtonImage(GroupBrowseButton,4);end;end;procedure CurPageChanged(CurPageID: Integer);beginUpdateButton(WizardForm.BackButton,0);UpdateButton(WizardForm.NextButton,1);UpdateButton(WizardForm.CancelButton,2);UpdateButton(WizardForm.DirBrowseButton,3);UpdateButton(WizardForm.GroupBrowseButton,4);end; А вот остальной код, так сказать фулл версия:) 'Развернуть' #define MyAppName "Mod-Pack îò Darksoul" ;Íàçâàíèå èíñòàëëÿòîðà#define MyInfoVer "10.1" ;Âåðñèÿ èíñòàëëÿòîðà#define MyAppVer "10.1" ;Âåðñèÿ èãðû#define Patch "0.9.1" ;âåðñèÿ ïàò÷à (÷òîáû íå ìåíÿòü ïîñëå êàæäîãî ïàò÷à ÷èñëà â ñêðèïòå, ìîæíî èñïîëüçîâàòü ýòî)#define MyAppPublisher "Darksoul" ;Èìÿ êîìïàíèè èëè ÷åëîâåêà êòî äåëàë#define MyAppURL "http://www.oceansoft.at.ua" ;Ññûëêà äëÿ ëîãî#define ButtonWidth "80" ; øèðèíà êíîïêè#define ButtonHeight "23" ; âûñîòà#define ButtonFontColor "clWhite" ;öâåò øðèôòà êíîïîê#define TextureWidth "160" ;øèðèíà êàðòèíêè-òåêñòóðû#define TextureHeight "23" ;âûñîòà#include "Components.iss" ;Êîìïàíåíòû, îíè æå ìîäû#include "Messages.iss" ;Ñîîáùåíèå, íàäïèñè íà êíîïêàõ è ò.ä.#include "BackUpPage.iss" ;Ðåçåðíîå êîïèðîâàíèå èëè óäàëåíèå res_mods#define ButtonWidth "80" ; øèðèíà êíîïêè#define ButtonHeight "23" ; âûñîòà[setup]AppName={#MyAppName}AppVersion={#MyAppVer}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}AppendDefaultDirName=noDirExistsWarning=noCreateUninstallRegKey=noUninstallable=yes//====={ Êàðòèíêè }=====\\SetupIconFile=Files\wot_ico.icoWizardImageFile=Files\img3.bmpWizardSmallImageFile=Files\Small2.bmpBitmapResource=button:Files\button.bmp//====={ Îòêëþ÷åíèå ñòðîíèö }=====\\DisableProgramGroupPage=yes//====={ Ëèöåíçèÿ è Ôàê }=====\\LicenseFile=licensia.rtfInfoBeforeFile=faq.rtf//====={ Ñæàòèå ñåòàïà }=====\\InternalCompressLevel=maxCompression=lzma2/max[Files]//------- âàøè êàðòèíêè ------------:Source: image\1.bmp; Flags: dontcopy nocompressionSource: image\2.bmp; Flags: dontcopy nocompressionDestName: WizardForm.BitmapImage1.bmp; Source: Files\img123.bmp; Flags: dontcopy solidbreak function WindowResize(): Boolean;varHeightOffset, WidthOffset: Integer;beginHeightOffset:=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;/// --- /// --- /// --- /// --- /// --- /// --- /// --- /// --- /// --- /// --- /// --- ///procedure RedesignWizardForm;beginwith WizardForm dobeginAutoScroll := False;end;end;constUNDEF_INDEX = -777;function GetCursorPos(var lpPoint: TPoint): BOOL; external '[email protected] stdcall';varInfoPic: TBitmapImage;LastIndex: Integer;TempPath: String;procedure ShowPicHint(const PicFilePath: String);varpt: TPoint;beginif not GetCursorPos(pt) then Exit;InfoPic.Bitmap.LoadFromFile(PicFilePath);InfoPic.SetBounds(ScaleX(1), ScaleY(41), ScaleX(250), ScaleY(200)); // êàðòèíêàInfoPic.Show;end;procedure CompOnItemMouseMove(Sender: TObject; X, Y: Integer; Index: Integer; Area: TItemArea);varUndefPic: String;beginif Index = -1 then Exit;if Index = LastIndex then Exit;trycase TNewCheckListBox(Sender).ItemCaption[index] of//-----------------------ÊÀÐÒÈÍÊÈ----------------------------\\'1. Êîìïëåêñíûé ìîä XVM v2.1': UndefPic := '1.bmp'; // ïèøåì òî÷íî òàê æå, êàê ïðîïèñàíî â êîìïîíåíòàõ'1.2 Èêîíêè òàíêîâ.': UndefPic := '2.bmp';elsebeginLastIndex := UNDEF_INDEX;InfoPic.Hide;Exit;end;end;if not FileExists(TempPath + UndefPic) then ExtractTemporaryFile(UndefPic);ShowPicHint(TempPath + UndefPic);finallyLastIndex := Index;end;end;procedure CompOnMouseLeave(Sender: TObject);beginInfoPic.Hide;LastIndex := -1;end;procedure InitInfo();beginWizardForm.TypesCombo.Hide;WizardForm.ComponentsList.SetBounds(ScaleX(260), ScaleY(40), ScaleX(155), ScaleY(153));WizardForm.ComponentsList.OnItemMouseMove := @CompOnItemMouseMove;WizardForm.ComponentsList.OnMouseLeave := @CompOnMouseLeave;TempPath := AddBackslash(ExpandConstant('{tmp}'));LastIndex := UNDEF_INDEX;with TBevel.Create(WizardForm) dobeginParent := WizardForm.SelectComponentsPage;SetBounds(ScaleX(0), ScaleY(40), ScaleX(253), ScaleY(203)); //ðàìêà êàðòèíêèShape := bsFrame;end;with TBevel.Create(WizardForm) dobeginParent := WizardForm.SelectComponentsPage;SetBounds(ScaleX(0), ScaleY(250), ScaleX(253), ScaleY(113)); //Íèæíèÿ ðàìêàShape := bsFrame;end;InfoPic := TBitmapImage.Create(WizardForm)with InfoPic dobeginParent := WizardForm.SelectComponentsPage;SetBounds(ScaleX(1), ScaleY(251), ScaleX(250), ScaleY(110));ExtractTemporaryFile('WizardForm.BitmapImage1.bmp');Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage1.bmp'));end;end;procedure InitializeWizard();beginInitializeWizard1(); {èç BackUpPage.iss, åñëè ÷òî}RedesignWizardForm;InitInfo();beginWindowResize();end;end;procedure ButtonLabelClick(Sender: TObject);varButton: TButton;ButtonPanel: array [0..4] of TPanel;ButtonImage: array [0..4] of TBitmapImage;ButtonLabel: array [0..4] of TLabel;beginwith WizardForm dobegincase TLabel(Sender).Tag of0: Button := BackButton;1: Button := NextButton;2: Button := CancelButton;3: Button := DirBrowseButton;4: Button := GroupBrowseButton;else exitend;end;Button.OnClick(Button);end;procedure ButtonLabelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);beginButtonImage[TLabel(Sender).Tag].Left:= -ScaleX({#ButtonWidth});end;procedure ButtonLabelMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);beginButtonImage[TLabel(Sender).Tag].Left := ScaleX(0);end;procedure LoadButtonImage(AButton: TButton; AButtonIndex: integer);varImage: TBitmapImage;Panel: TPanel;Labl: TLabel;beginPanel:=TPanel.Create(WizardForm)with Panel dobeginSetBounds(AButton.Left,AButton.Top,AButton.Width,AButton.Height);Tag := AButtonIndex;Parent := AButton.Parent;end;ButtonPanel[AButtonIndex] := Panel;Image:=TBitmapImage.Create(WizardForm)with Image dobeginWidth := ScaleX({#TextureWidth});Height := ScaleY({#TextureHeight});Enabled := False;Bitmap.LoadFromResourceName(HInstance, '_IS_BUTTON');Parent := Panel;end;ButtonImage[AButtonIndex]:=Image;with TLabel.Create(WizardForm) dobeginTag := AButtonIndex;Parent := Panel;Width := Panel.Width;Height := Panel.Height;Transparent := True;OnClick := @ButtonLabelClick;OnDblClick := @ButtonLabelClick;OnMouseDown := @ButtonLabelMouseDown;OnMouseUp := @ButtonLabelMouseUp;end;Labl:=TLabel.Create(WizardForm)with Labl dobeginAutosize := True;Alignment := taCenter;Tag := AButtonIndex;Transparent := True;Font.Color := {#ButtonFontColor};Caption := AButton.Caption;OnClick := @ButtonLabelClick;OnMouseDown := @ButtonLabelMouseDown;OnMouseUp := @ButtonLabelMouseUp;OnDblClick := @ButtonLabelClick;Parent := Panel;end;ButtonLabel[AButtonIndex]:= Labl;end;procedure UpdateButton(AButton: TButton;AButtonIndex: integer);beginButtonPanel[AButtonIndex].Visible := AButton.Visible;with ButtonLabel[AButtonIndex] dobeginCaption := AButton.Caption;Left := ButtonPanel[AButtonIndex].Width div 2 - ButtonLabel[AButtonIndex].Width div 2;Top := ButtonPanel[AButtonIndex].Height div 2 - ButtonLabel[AButtonIndex].Height div 2;end;end;procedure InitializeWizard();beginwith WizardForm dobeginBackButton.Width:={#ButtonWidth};BackButton.Height:={#ButtonHeight};NextButton.Width:={#ButtonWidth};NextButton.Height:={#ButtonHeight};CancelButton.Width:={#ButtonWidth};CancelButton.Height:={#ButtonHeight};DirBrowseButton.Width:={#ButtonWidth};DirBrowseButton.Height:={#ButtonHeight};GroupBrowseButton.Width:={#ButtonWidth};GroupBrowseButton.Height:={#ButtonHeight};LoadButtonImage(BackButton,0);LoadButtonImage(NextButton,1);LoadButtonImage(CancelButton,2);LoadButtonImage(DirBrowseButton,3);LoadButtonImage(GroupBrowseButton,4);end;end;procedure CurPageChanged(CurPageID: Integer);beginUpdateButton(WizardForm.BackButton,0);UpdateButton(WizardForm.NextButton,1);UpdateButton(WizardForm.CancelButton,2);UpdateButton(WizardForm.DirBrowseButton,3);UpdateButton(WizardForm.GroupBrowseButton,4);end; Edited June 8, 2014 by Darksoul @ Quote Link to comment Short link Share on other sites More sharing options...
Andrew_Dark Posted June 8, 2014 Author Share Posted June 8, 2014 всё, скрины рабочего модпака в теме, которую мне предложили, нашлись люди, которые помогли, спасибо им, да вообще всем спасибо, тему можно закрывать. @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
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.