Lom 48 #405182 Posted September 25, 2017 1 час назад, Kotyarko_O сказал: WizardForm.ComponentsList - тот же класс, что и твой ComponentsList2, только в составе класса-родителя. Если к событиям визардского ты обращаешься так: WizardForm.ComponentsList.OnItemMouseMove, то к кастомному ты должен обращаться точно так же: ComponentsList2.OnItemMouseMove. ну я вроде уже делал так же. конечно если я правильно понял. компилит но при открытии ошибка... если честно мне хотелось в этом коде решить именно вот этот вопрос... как в мой код припаять такое? Quote Share this post Link to post Short link Share on other sites
sergy2010 24 #405187 Posted September 25, 2017 (edited) вопросик как сделать прозрачным DirEdit пример тот же самый что выше на скрине Edited September 25, 2017 by sergy2010 1 Quote Share this post Link to post Short link Share on other sites
Lom 48 #405190 Posted September 25, 2017 11 минуту назад, sergy2010 сказал: вопросик как сделать прозрачным DirEdit пример тот же самый что выше на скрине вот это пробуй WizardForm.DirEdit.AutoSelect := False; Quote Share this post Link to post Short link Share on other sites
Kotyarko_O 1,906 #405191 Posted September 25, 2017 1 hour ago, ЛОМ said: ну я вроде уже делал так же. конечно если я правильно понял. компилит но при открытии ошибка... С последовательностью проблемы. Вызываешь переменную раньше её инициализации. Quote Share this post Link to post Short link Share on other sites
Lom 48 #405192 Posted September 25, 2017 17 минут назад, Kotyarko_O сказал: С последовательностью проблемы. Вызываешь переменную раньше её инициализации. да так и есть. ComponentsForm2 просто нужно было переставить. теперь на всех трёх страницах есть картинки. спасибо))) а вот это всё таки как завести? ))) понимаю что достаю но всё же ))) Quote Share this post Link to post Short link Share on other sites
sergy2010 24 #405193 Posted September 25, 2017 (edited) компонент лист 2.iss эт ищешь так я тебе в скайпе говорил что дам комп лист с картинками Edited September 25, 2017 by sergy2010 Quote Share this post Link to post Short link Share on other sites
Lom 48 #405194 Posted September 25, 2017 (edited) ну это как я и написал решилось.( мне нужно было именно чтобы завелось с моим кодом а у тебя он чуток другой ) с этим вопрос решен )) теперь нужно чтобы всплывалась картинка как на скрине выше. ))) Edited September 25, 2017 by ЛОМ Quote Share this post Link to post Short link Share on other sites
Kotyarko_O 1,906 #405195 Posted September 25, 2017 1 minute ago, ЛОМ said: а вот это всё таки как завести? ))) понимаю что достаю но всё же ))) Конкретно тут используется тот же checkListBox. Если делать так как на скрине - то используй тот же способ отображения изображений. Но вообще, это можно сделать и с другими контролами. Например, обычный checkBox тоже имеет свойство OnMouseMove. Quote Share this post Link to post Short link Share on other sites
sergy2010 24 #405196 Posted September 25, 2017 Димон ты свою обновлялку модпака в ангаре не восстанавливал или времени нету Quote Share this post Link to post Short link Share on other sites
Lom 48 #405197 Posted September 25, 2017 1 минуту назад, Kotyarko_O сказал: Конкретно тут используется тот же checkListBox. Если делать так как на скрине - то используй тот же способ отображения изображений. Но вообще, это можно сделать и с другими контролами. Например, обычный checkBox тоже имеет свойство OnMouseMove. а вот именно с моим кодом его можно как то завести? если да, то подскажи как))) Quote Share this post Link to post Short link Share on other sites
sergy2010 24 #405198 Posted September 25, 2017 (edited) русь конкретней пиши что к бекапу как прикрутить Edited September 25, 2017 by sergy2010 Quote Share this post Link to post Short link Share on other sites
Kotyarko_O 1,906 #405199 Posted September 25, 2017 (edited) 5 minutes ago, sergy2010 said: Димон ты свою обновлялку модпака в ангаре не восстанавливал или времени нету Игрового клиента нет, чтобы адаптировать. 5 minutes ago, ЛОМ said: а вот именно с моим кодом его можно как то завести? если да, то подскажи как) Твоим - это каким? Edited September 25, 2017 by Kotyarko_O Quote Share this post Link to post Short link Share on other sites
sergy2010 24 #405200 Posted September 25, 2017 Только что, Kotyarko_O сказал: Игрового клиента нет, чтобы обновить. И судя пока у тебя настроения нет этим заниматься Quote Share this post Link to post Short link Share on other sites
Lom 48 #405201 Posted September 25, 2017 (edited) 7 минут назад, Kotyarko_O сказал: Твоим - это каким? ну тем же котором мы выше крутили )) вот ... в этот же код можно это как то приладить? #ifdef UNICODE #define A "W" #else #define A "A" #endif const UNDEF_INDEX = -777; ALPHA_BLEND_LEVEL = 128; // max=Byte=255 WS_EX_LAYERED = $80000; WS_EX_TRANSPARENT = $20; LWA_COLORKEY = 1; LWA_ALPHA = 2; GWL_EXSTYLE = (-20); var InfoPic: TBitmapImage; LastIndex: Integer; TempPath: String; PicForm: TForm; type COLORREF = DWORD; function GetCursorPos(var lpPoint: TPoint): BOOL; external '[email protected] stdcall'; function SetLayeredWindowAttributes(Hwnd: THandle; crKey: COLORREF; bAlpha: Byte; dwFlags: DWORD): Boolean; external '[email protected] stdcall'; function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external 'GetWindowLong{#A}@user32.dll stdcall'; function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; external 'SetWindowLong{#A}@user32.dll stdcall'; function SetFocus(hWnd: HWND): HWND; external '[email protected] stdcall'; procedure ShowPicHint(const PicFilePath: String); var pt: TPoint; begin if not GetCursorPos(pt) then Exit; InfoPic.Bitmap.LoadFromFile(PicFilePath); try with PicForm do begin SetBounds(ScaleX(pt.x + 16), ScaleY(pt.y + 7), InfoPic.Width, InfoPic.Height); Show; end; finally SetFocus(WizardForm.Handle); end; end; procedure CompOnItemMouseMove(Sender: TObject; X, Y: Integer; Index: Integer; Area: TItemArea); var UndefPic: String; begin if Index = -1 then Exit; if Index = LastIndex then Exit; try case TNewCheckListBox(Sender).ItemCaption[Index] of '. Анимированная лампочка 10сек.': UndefPic := 'анимированная лампочка.bmp'; '. Белые трупы танков и белые гусеницы': UndefPic := 'белые трупы.bmp'; '. небо звездное': UndefPic := 'звездное небо.bmp'; '. Новый интерфейс ангара': UndefPic := 'кр.bmp'; '. Мод тень от Polar Fox (модель танка)': UndefPic := 'Мод Тень.bmp'; '. Панель счета c HP команд + лог урона': UndefPic := 'панель ХП.bmp'; '. прицел - Jimbo': UndefPic := 'прицел джимбо.bmp'; '. Круги сведения с пробитием (31 вариант)-(копируется на рабочий стол)': UndefPic := 'сведения.bmp'; '. статистика за сессию SeVeRRR': UndefPic := 'статистика SeVeRRR.bmp'; 'ОЛЕНЬ': UndefPic := 'ХВМ.bmp'; '. цветные пробития': UndefPic := 'цветные пробития.bmp'; '. прицел - Желтый': UndefPic := 'прицел желтый.bmp'; '. панель повреждений с таймером ремонта от Andre_V \ GambitER': UndefPic := 'панель GambitER.bmp'; '. Менеджер аккаунтов': UndefPic := 'Менеджер аккаунтов.bmp'; '. P-MoD = сервер + лампа 10 сек + ком.камера + зум60х': UndefPic := 'п мод.bmp'; '. Отображения установленного оборудования на танках': UndefPic := 'показ оборудования.bmp'; '. мод тылы, разноцветный индикатор ближайших врагов': UndefPic := 'тылы мод.bmp'; '. прицел L - MS': UndefPic := 'прицел L - MS.bmp'; '. прицел от Andr': UndefPic := 'прицел от Andr.bmp'; else begin LastIndex := UNDEF_INDEX; PicForm.Hide; Exit; end; end; if not FileExists(TempPath + UndefPic) then ExtractTemporaryFile(UndefPic); ShowPicHint(TempPath + UndefPic); finally LastIndex := Index; end; end; procedure CompOnMouseLeave(Sender: TObject); begin PicForm.Hide; LastIndex := -1; end; procedure InitInfo(); begin WizardForm.ComponentsList.OnItemMouseMove := @CompOnItemMouseMove; WizardForm.ComponentsList.OnMouseLeave := @CompOnMouseLeave; TempPath := AddBackslash(ExpandConstant('{tmp}')); LastIndex := UNDEF_INDEX; PicForm := TForm.Create(WizardForm) with PicForm do begin BorderStyle := bsNone; FormStyle := fsStayOnTop; InfoPic := TBitmapImage.Create(PicForm) with InfoPic do begin Parent := PicForm; AutoSize := True; end; end; SetWindowLong(PicForm.Handle, GWL_EXSTYLE, GetWindowLong(PicForm.Handle, GWL_EXSTYLE) or WS_EX_LAYERED); SetLayeredWindowAttributes(PicForm.Handle, 0, ALPHA_BLEND_LEVEL, LWA_ALPHA); end; procedure InitializeWizard(); begin InitInfo(); end; Edited September 25, 2017 by ЛОМ Quote Share this post Link to post Short link Share on other sites
Kotyarko_O 1,906 #405202 Posted September 25, 2017 1 minute ago, ЛОМ said: в этот же код можно это как то приладить? Если функции бекапа у тебя будут укутаны в checkListBox, то можно. Если будут, например, checkBox`ы, то нужно оформлять по другому событию, схожему. Quote Share this post Link to post Short link Share on other sites
Lom 48 #405203 Posted September 25, 2017 (edited) 4 минуты назад, Kotyarko_O сказал: Если функции бекапа у тебя будут укутаны в checkListBox, то можно. Если будут, например, checkBox`ы, то нужно оформлять по другому событию, схожему. вот как у меня бекап... //----------------------------------------------------------------ОЧИСТКА РЕСМОДС МОДС И ТД---------------------------------------- var DeleteRadioButton, MoveRadioButton, NoneRadioButton: TRadioButton; DeleteCashAndLogsCheckBox: TCheckBox; const DeleteDescText = ''; MoveDescText = ''; NoneDescText = ''; function BackupCheck_1(): Boolean; var DeleteDescLabel, MoveDescLabel, NoneDescLabel: TLabel; begin DeleteRadioButton:=TRadioButton.Create(WizardForm); DeleteRadioButton.SetBounds(290, 170, WizardForm.RunList.Width, 20) DeleteRadioButton.Checked:=True; DeleteRadioButton.Caption:='Очистить папки res_mods и mods'; DeleteRadioButton.Font.Size := 12; DeleteRadioButton.Font.Name := 'WarHeliosCondCBold'; DeleteRadioButton.Parent:=WizardForm.SelectDirPage; DeleteDescLabel:=TLabel.Create(WizardForm); DeleteDescLabel.Parent:=WizardForm.SelectDirPage; DeleteDescLabel.Left:=290; DeleteDescLabel.Top:=DeleteRadioButton.Top + DeleteRadioButton.Height; DeleteDescLabel.Width:=WizardForm.SelectDirPage; DeleteDescLabel.Height:=20; DeleteDescLabel.AutoSize:=False; DeleteDescLabel.Wordwrap:=True; DeleteDescLabel.Caption:=DeleteDescText; MoveRadioButton:=TRadioButton.Create(WizardForm); MoveRadioButton.SetBounds(290, 210, WizardForm.RunList.Width, 20) MoveRadioButton.Checked:=False; MoveRadioButton.Caption:='Сделать резервную копию файлов'; MoveRadioButton.Font.Size:=12; MoveRadioButton.Font.Name := 'WarHeliosCondCBold'; MoveRadioButton.Parent:=WizardForm.SelectDirPage; MoveDescLabel:=TLabel.Create(WizardForm); MoveDescLabel.Parent:=WizardForm.SelectDirPage; MoveDescLabel.Left:=290; MoveDescLabel.Top:=MoveRadioButton.Top + MoveRadioButton.Height; MoveDescLabel.Width:=WizardForm.SelectDirPage; MoveDescLabel.Height:=20; MoveDescLabel.AutoSize:=False; MoveDescLabel.Wordwrap:=True; MoveDescLabel.Caption:=MoveDescText; NoneRadioButton:=TRadioButton.Create(WizardForm); NoneRadioButton.SetBounds(290, 250, WizardForm.RunList.Width, 20) NoneRadioButton.Checked:=False; NoneRadioButton.Caption:='Ничего не будем трогать'; NoneRadioButton.Font.Size:=12; NoneRadioButton.Font.Name := 'WarHeliosCondCBold'; NoneRadioButton.Parent:=WizardForm.SelectDirPage; NoneDescLabel:=TLabel.Create(WizardForm); NoneDescLabel.Parent:=WizardForm.SelectDirPage; NoneDescLabel.Left:=290; NoneDescLabel.Top:=NoneRadioButton.Top + NoneRadioButton.Height; NoneDescLabel.Width:=WizardForm.SelectDirPage; NoneDescLabel.Height:=20; NoneDescLabel.AutoSize:=False; NoneDescLabel.Wordwrap:=True; NoneDescLabel.Caption:=NoneDescText; DeleteCashAndLogsCheckBox:=TCheckBox.Create(WizardForm); DeleteCashAndLogsCheckBox.SetBounds(292, 290, WizardForm.RunList.Width, 20) DeleteCashAndLogsCheckBox.Checked:=True; DeleteCashAndLogsCheckBox.Caption:='Очистить кеш игры'; DeleteCashAndLogsCheckBox.Font.Size:=12; DeleteCashAndLogsCheckBox.Font.Name := 'WarHeliosCondCBold'; DeleteCashAndLogsCheckBox.Parent:=WizardForm.SelectDirPage; end; procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); begin if CurUninstallStep = usPostUninstall then begin DelTree(ExpandConstant('{app}\res_mods'), True, True, True); DelTree(ExpandConstant('{app}\mods'), True, True, True); ForceDirectories(ExpandConstant('{app}\res_mods\{#Patch}')); ForceDirectories(ExpandConstant('{app}\mods\{#Patch}')); DelTree(ExpandConstant('{app}\ХХХ-удалить'), True, True, True); DelTree(ExpandConstant('{app}\mod_config'), True, True, True); end; end; function BackupCheck_2(): Boolean; begin If DeleteRadioButton.Checked then begin DelTree(ExpandConstant('{app}\res_mods\'), True, True, True); ForceDirectories(ExpandConstant('{app}\res_mods\{#Patch}')); DelTree(ExpandConstant('{app}\mod_config'), True, True, True); DelTree(ExpandConstant('{app}\mods\'), True, True, True); ForceDirectories(ExpandConstant('{app}\mods\{#Patch}')); end; end; function BackupCheck_3(): Boolean; begin If MoveRadioButton.Checked then begin MoveDir(ExpandConstant('{app}\res_mods\'),ExpandConstant('{app}\res_mods\backup\res_mods')); CreateDir(ExpandConstant('{app}\res_mods\{#Patch}')); MoveDir(ExpandConstant('{app}\mods\'),ExpandConstant('{app}\mods\backup\mods')); CreateDir(ExpandConstant('{app}\mods\{#Patch}')); end; end; function BackupCheck_4(): Boolean; begin If DeleteCashAndLogsCheckBox.Checked then begin DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\account_caches\'), True, True, True); DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\battle_results\'), True, True, True); DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\clan_cache\'), True, True, True); DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\custom_data\'), True, True, True); DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\dossier_cache\'), True, True, True); DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\messenger_cache\'), True, True, True); DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\pmod\'), True, True, True); DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\tutorial_cache\'), True, True, True); DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\veh_cmp_cache\'), True, True, True); end; end; Edited September 25, 2017 by ЛОМ Quote Share this post Link to post Short link Share on other sites
sergy2010 24 #405204 Posted September 25, 2017 (edited) не там в буттонах ели только бутоны сделать чекбоксы типа видимо бутоны переиминовать RadioButton CheckBox Edited September 25, 2017 by sergy2010 1 Quote Share this post Link to post Short link Share on other sites
Kotyarko_O 1,906 #405205 Posted September 25, 2017 Just now, sergy2010 said: не там в буттонах ели только бутоны сделать чекбоксы С TRadioButton тоже можно. 2 minutes ago, ЛОМ said: вот как у меня бекап... Ну и всё: DeleteRadioButton.OnMouseMove\OnMouseLeave Quote Share this post Link to post Short link Share on other sites
sergy2010 24 #405206 Posted September 25, 2017 Голова 1 Quote Share this post Link to post Short link Share on other sites
Lom 48 #405207 Posted September 25, 2017 (edited) 7 минут назад, Kotyarko_O сказал: Ну и всё: DeleteRadioButton.OnMouseMove\OnMouseLeave Ну так я уже пробовал... не выходит.. и на всякий случай так тоже проверил)) не пашет WizardForm.DeleteRadioButton.OnItemMouseMove := @CompOnItemMouseMove Edited September 25, 2017 by ЛОМ Quote Share this post Link to post Short link Share on other sites