Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


animating a panel

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
ItsALivng
How do I cheat?
Reputation: 0

Joined: 20 Nov 2019
Posts: 3

PostPosted: Wed Nov 20, 2019 6:51 pm    Post subject: animating a panel Reply with quote

I've been trying for a little bit to figure out how to get something on a trainer to move. like you click a button or panel and a panel move from one location to another

Last edited by ItsALivng on Thu Nov 21, 2019 11:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Thu Nov 21, 2019 1:42 am    Post subject: Reply with quote

You can achieve that by top & left properties to your desired location
Example:
Code:

f = createForm(); -- create window;
p = createPanel(f);
p.width,p.height = f.width//4,f.height//4;

b = createButton(f); -- move panel button;
b.top = f.height - b.height - 5;
b.left = 5;
b.Caption = 'Move panel';

b.onClick = function(sender)
   p.top = math.random(0,sender.top - p.height); -- fit panel between start of the window and the button position;
   p.left = math.random(0,f.width - p.width);
end

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
ItsALivng
How do I cheat?
Reputation: 0

Joined: 20 Nov 2019
Posts: 3

PostPosted: Thu Nov 21, 2019 10:50 pm    Post subject: Reply with quote

Moving a panel from one location without it being jumping is my issue.
I want to put some animation into it and make it look nice
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sat Nov 23, 2019 6:20 pm    Post subject: Reply with quote

ItsALivng wrote:
Moving a panel from one location without it being jumping is my issue.
I want to put some animation into it and make it look nice

Run a timer, incease/decrease it position by a value or modifier until it reaches your desired position.

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites