| View previous topic :: View next topic |
| Author |
Message |
ZxPwds Advanced Cheater
Reputation: 0
Joined: 27 Oct 2015 Posts: 59
|
Posted: Sat Jul 11, 2020 10:14 pm Post subject: [HELP] Rollover image |
|
|
I've tried the following but it doesn't work
I'm creating a rollover image button using two different images
On mouse enter and Mouse leave
Normal state:
Rollover state:
| Code: | function launcherGUI_btnActivateNormalMouseEnter(sender)
launcherGUI.btnActivateRollover.visable = true;
launcherGUI.btnActivateNormal.visable = false;
print "Mouse Enter";
end
function launcherGUI_btnActivateNormalMouseLeave(sender)
launcherGUI.btnActivateRollover.visable = false;
launcherGUI.btnActivateNormal.visable = true;
print "Mouse Leave";
end |
Last edited by ZxPwds on Sun Jul 12, 2020 11:36 am; edited 2 times in total |
|
| Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Sun Jul 12, 2020 1:14 am Post subject: |
|
|
You need more specific. What is 'rollover image' means or actions?
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
| Back to top |
|
 |
ZxPwds Advanced Cheater
Reputation: 0
Joined: 27 Oct 2015 Posts: 59
|
Posted: Sun Jul 12, 2020 11:32 am Post subject: |
|
|
| Well I mean it's exactly what it is, I did use the correct term. Basically I'm I want to create an image button. So that when my mouse hovers over the image it will show a second image. It's pretty simple stuff in any programming language but I've tried with cheat engines lua im just unsuccessful.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25837 Location: The netherlands
|
Posted: Sun Jul 12, 2020 11:35 am Post subject: |
|
|
it's visible not visable
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
ZxPwds Advanced Cheater
Reputation: 0
Joined: 27 Oct 2015 Posts: 59
|
Posted: Sun Jul 12, 2020 11:38 am Post subject: |
|
|
| Dark Byte wrote: | | it's visible not visable |
Wow Dark Byte, I actually feel pretty dumb right now. I apologize about that. I cannot believe miss spelled visible.
However it has worked. But I was wondering if there was a different way of doing this without having to put the two images in the same position. In visual basic we would do this
otherwise from what I just saw it glitches a lot
as you can see below the image gitters a lot because it doesn't allow me the
change to let my mouse leave the image before it trys to make the other
image visible = false
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25837 Location: The netherlands
|
Posted: Sun Jul 12, 2020 1:48 pm Post subject: |
|
|
Is btnActivateRollover a button or an image
If image you can also just change Picture property of the control instead (make sure to have a copy of BOTH active and inactive invisible somewhere else you will overwrite the picture of the original)
Anyhow, the flashing is because btnActivateNormal OnExit triggers because it's invisible now
The restoring code should be under the exit of btnActivateRollover
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
ZxPwds Advanced Cheater
Reputation: 0
Joined: 27 Oct 2015 Posts: 59
|
Posted: Sun Jul 12, 2020 9:40 pm Post subject: |
|
|
Yes they are both images, I will provide the CT so you can visually see it.
I'm not understanding too much what you mean by this
| Quote: | If image you can also just change Picture property of the control instead (make sure to have a copy of BOTH active and inactive invisible somewhere else you will overwrite the picture of the original)
|
would you show an example with my CT if possible?
File Attachment is 8MB so i had to upload to a filehost
My .CT download is here
https://gofile.io/d/pdZUhF
EDITED AND
_______________________________________________
-- RESOLVED
------------------------------------------------------------------
I was able to get the effect I been trying to obtain with the following
code:
| Code: | function launcherGUI_btnActivateNormalMouseEnter(sender)
--real pos: left: 520 top: 226
launcherGUI.btnActivateNormal.left = 804;
launcherGUI.btnActivateRollover.left = 520;
end
function launcherGUI_btnActivateRolloverMouseLeave(sender)
launcherGUI.btnActivateNormal.left = 520;
launcherGUI.btnActivateRollover.left = 804;
end
function launcherGUI_btnActivateRolloverMouseDown(sender, button, x, y)
launcherGUI.btnActivateNormal.left = 804;
launcherGUI.btnActivateRollover.left = 804;
launcherGUI.btnActivateDown.left = 520;
end
function launcherGUI_btnActivateRolloverMouseUp(sender, button, x, y)
launcherGUI.btnActivateNormal.left = 804;
launcherGUI.btnActivateRollover.left = 520;
launcherGUI.btnActivateDown.left = 1022;
end |
Results:
|
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1535
|
Posted: Mon Jul 13, 2020 3:45 am Post subject: |
|
|
I believe that he could not solve the "Visible" issue.
There is an example below.
Note: In case of a change of function code, open and close "Form Designer" once.
| Code: | launcherGUI.btnActivateNormal.OnClick=function()
launcherGUI.btnActivateNormal.visible = false;
launcherGUI.btnActivateRollover.visible = true;
print "Normal Enter";
end
--launcherGUI.btnActivateNormal.OnMouseLeave=function()
--launcherGUI.btnActivateRollover.visible = false;
--launcherGUI.btnActivateNormal.visible = true;
--print "Mouse Leave";
--end
launcherGUI.btnActivateRollover.OnClick=function()
launcherGUI.btnActivateNormal.visible = true;
launcherGUI.btnActivateRollover.visible = false;
print "Rollover Enter";
end |
_________________
|
|
| Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Mon Jul 13, 2020 5:49 am Post subject: |
|
|
Another alternative:
| Code: | if fm then fm.Destroy() fm = nil end
fm = createForm()
b1 = createImage(fm)
b1.setSize(200,40)
b1.setPosition(60,80)
b1.Stretch = true
-- The picture is load from your CT and add to this CT table file
-- and I give name as btn1.png
b1.Picture.loadFromStream(findTableFile('btn1.png').Stream)
b1.Visible = true
b2 = createImage(fm)
b2.setSize(200,40)
b2.setPosition(60,80)
b2.Stretch = true
-- The picture is load from your CT and add to this CT table file
-- and I give name as btn2.png
b2.Picture.loadFromStream(findTableFile('btn2.png').Stream)
b2.Visible = false
function ro()
if b1.Visible == true then
b1.Visible = false
b2.Top = b2.Top - 5
b2.Left = b2.Left - 5
b2.Width = b2.Width + 10
b2.Height = b2.Height + 10
b2.Visible = true
else
b1.Visible = true
b2.Top = b2.Top + 5
b2.Left = b2.Left + 5
b2.Width = b2.Width - 10
b2.Height = b2.Height - 10
b2.Visible = false
end
end
b1.OnMouseEnter = ro
b2.OnMouseEnter = ro
b1.OnMouseLeave = ro
b2.OnMouseLeave = ro |
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
| Back to top |
|
 |
|