
15-09-2023, 05:29
|
 |
Registered User
|
|
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
|
|
Quote:
Originally Posted by audiofeel
@BLACKFIRE69 How to avoid animation jerks when pointing the pointer at different objects with the same task? I didn't come up with anything better, as in the code below. Everything goes smoothly but with only one object (animation).
Code:
TObject(PanelBtnClick[1].GetObject), TObject(PanelBtnClick[2].GetObject), TObject(PanelBtnClick[3].GetObject),
TObject(PanelBtnClick[4].GetObject), TObject(PanelBtnClick[5].GetObject), TObject(LeftPanel.GetObject):
begin
FMXForm.AnimateFloatDelay(LeftPanel.Handle, 'Width', NSX(280), 0.5, 0.2,
atInOut, itBack);
end;
If you make an array as in the example below, there will still be jerks between objects (animation).
Code:
procedure CommonMouseEnter(Sender: TObject);
var
i: Integer;
begin
i := -1;
case Sender of
TObject(Btn[1].GetObject): i := 1;
TObject(Btn[2].GetObject): i := 2;
TObject(Btn[3].GetObject): i := 3;
TObject(Btn[4].GetObject): i := 4;
TObject(Btn[5].GetObject): i := 5;
end;
if i <> -1 then
Btn[i].FontSetting('{#MyFont2Name}', NS(52), VCLColorToFMXColor($EEEE00));
end;
|
i'm not sure. could you provide an example or explain further?
|