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 


Trick To Hi-Lighting Cursor Inside CE Trainer

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> LUA Tutorials
View previous topic :: View next topic  
Author Message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Tue Dec 24, 2019 12:16 am    Post subject: Trick To Hi-Lighting Cursor Inside CE Trainer This post has 1 review(s) Reply with quote

This is about how to 'hi-lighting' mouse cursor when entering a component inside a CE Trainer. Example below :


Code:
--- Define function when the mouse enters a component
--- in this case, is component color

function onEnterLabel(sender)
 sender.Color = 0xFF  -- red color
end

--- Define function when the mouse left a component
--- in this case, is restore component color

function onLeaveLabel(sender)
 sender.Color = 0xFFFFFF  -- white color as default in this example
end

--- Process hack codes

function label_click(sender)
 if sender.Name == 'label1' then
  print('CELabel 1 has been clicked')
 elseif sender.Name == 'label2' then
  print('CELabel 2 has been clicked')
 elseif sender.Name == 'label3' then
  print('CELabel 3 has been clicked')
 elseif sender.Name == 'label4' then
  print('CELabel 4 has been clicked')
 elseif sender.Name == 'label5' then
  print('CELabel 5 has been clicked')
 end
end


--- Create Trainer GUI

f = createForm()
f.Caption = 'Test Label Hi-light'

local label = {};
label[1] = createLabel( f )
label[2] = createLabel( f )
label[3] = createLabel( f )
label[4] = createLabel( f )
label[5] = createLabel( f )


--- Hi-light and access the hack functions

for x = 1, #label do
    label[x].Name = 'label'..x
    label[x].Caption = "This CELabel " .. tostring( x )
    label[x].setPosition(10, x * 20)
    label[x].Color = 0xFFFFFF
    label[x].onMouseEnter = onEnterLabel
    label[x].onMouseLeave = onLeaveLabel
    label[x].onClick = label_click
end

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> LUA Tutorials 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 cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites