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 


Sliding Text In Form

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

Joined: 30 Jun 2018
Posts: 9

PostPosted: Sat Jul 28, 2018 4:42 am    Post subject: Sliding Text In Form Reply with quote

Hey Guys How to make texts slide in a panel for ex.

ht tp: // prntscr . com/kc2p5y (Just remove the spaces cause i can't post a link)

I want the text to go to the other side. Like Animated Text Moving. So IS there a way i can do that? By Using Timer?. Also Can Give me like example scripts for making the text animated?. any ideas thx Very Happy

_________________
Newbie at Lua Coding! Very Happy
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Sat Jul 28, 2018 5:11 am    Post subject: Reply with quote

something like this ?

example 1 :

Code:
f = createForm()    --- your form
p = createPanel(f)  --- panel
l = createLabel(p)  --- create a label on your form
l.top = 10          --- label position on top of form
l.left = 10         --- label position on top of form
l.font.size = 14
l.font.style = 'fsBold'
l.font.color = '0x228B22'   --- green
l.visible = false   --- hiding that label for first time

text = "Blablablabla"
t_index = 1
t=createTimer(nil)
t.Interval=800
t.OnTimer=function(t)
if t_index <= #text then
l.Visible = true
l.Caption = text:sub(1,t_index)
t_index = t_index + 1
else
l.Visible = false
t_index = 1
end
end
t.Enabled=true


another version example :

Code:
f = createForm()    --- your form
p = createPanel(f)  --- panel
p.width = f.width
p.hight = 30
l = createLabel(p)  --- create a label on your form
l.top = 10          --- label position on top of form
l.left = 10         --- label position on top of form
l.font.size = 14
l.font.style = 'fsBold'
l.font.color = '0x228B22'   --- green

index = 0
spaces = 40
step = 1
values = {}
for i=0,spaces do
  local text = "Blablablabla"
  for j=0,i do
    text = " " .. text
  end
  values[i] = text
end

timer=createTimer(nil, false)
timer.Interval=1000
timer.OnTimer=function(timer)
  if index >= spaces then
    step = -1
  elseif index <= 0 then
    step = 1
  end
  index = index + step
  l.Caption = values[index]
--  local color = 0
--   for i=0,3 do
--    color = color * 10 + math.random(255)
--  end
--  l.Font.Color = color
end
timer.Enabled=true

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
GlitchedError
How do I cheat?
Reputation: 0

Joined: 30 Jun 2018
Posts: 9

PostPosted: Sat Jul 28, 2018 5:16 am    Post subject: Reply with quote

Yes That's What I want. Instead I want the text to go to the other side and coming out to the other side. So my main question is how do i do it in my trainer? How to Make The Script That You Made? Also. I want like 2 texts so how can i put them together moving?
_________________
Newbie at Lua Coding! Very Happy
Back to top
View user's profile Send private message
Lynxz Gaming
Expert Cheater
Reputation: 4

Joined: 01 Jul 2017
Posts: 208
Location: help

PostPosted: Sat Jul 28, 2018 5:44 am    Post subject: Reply with quote

GlitchedError wrote:
Yes That's What I want. Instead I want the text to go to the other side and coming out to the other side. So my main question is how do i do it in my trainer? How to Make The Script That You Made? Also. I want like 2 texts so how can i put them together moving?


Code:

UDF1.CETimer1.Interval = 1
function CETimer1Timer(sender)
if UDF1.CELabel1.Left ~= UDF1.Width + UDF1.CELabel1.Width then
UDF1.CELabel1.Left = UDF1.CELabel1.Left + 1
else
UDF1.CELabel1.Left = 0 - UDF1.CELabel1.Width
end
end

_________________
my english is bad
discord : rynx#9828
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
GlitchedError
How do I cheat?
Reputation: 0

Joined: 30 Jun 2018
Posts: 9

PostPosted: Sat Jul 28, 2018 5:55 am    Post subject: Reply with quote

Thanks, Lynxz Gaming.
_________________
Newbie at Lua Coding! Very Happy
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 Lua Scripting 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