View Single Post
  #1  
Old 15-09-2023, 05:29
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
@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?
Reply With Quote
The Following User Says Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (15-09-2023)
Sponsored Links