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 


Tut. About window. Dynamic titles

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> LUA Tutorials
View previous topic :: View next topic  
Author Message
GH*master
Expert Cheater
Reputation: 8

Joined: 10 Jan 2008
Posts: 159

PostPosted: Wed Oct 05, 2011 6:11 am    Post subject: Tut. About window. Dynamic titles Reply with quote

I'll show you how to create dynamic titles for yours trainers.



Don't forget to change music path:

Code:
xmplayer_playXM('C:\\Users\\master\\Desktop\\Gamehack\\CE\\CETrainer\\TrainerTest\\Trainer_GameHackLab[RU]\\GameHackLab[RU]_Trainers\\Resources(v1.0)\\musics\\SnD - Ahead DVD Ripper 2.4.1 kg.xm')


Ok. Lets go..

Code:
formInfo = nil

function OnMusicStopAndExit(sender)

    if (xmplayer_isPlaying()) then
        xmplayer_pause()
    else
        xmplayer_resume()
    end
        form_hide(formInfo)

end

deltaAboutY = 0

function timerGUIAboutLabel()

    if deltaAboutY < -50*15 then
        formInfoWidth, formInfoHeight = control_getSize(formInfo)
        deltaAboutY = formInfoHeight + 10
    else
        deltaAboutY = deltaAboutY - 1
    end

    control_setPosition(AboutLbl, 40, deltaAboutY)
end

function ShowFormInfo()

    formInfo = createForm(true)
    control_setCaption(formInfo, "About Trainer")
    form_onClose(formInfo, OnMusicStopAndExit)

    formInfoWidth, formInfoHeight = control_getSize(formInfo)

    aboutPanel = createPanel(formInfo)
    control_setPosition(aboutPanel, 10, 10)
    control_setSize(aboutPanel, formInfoWidth - 20, formInfoHeight - 40)

    AboutLbl = createLabel(aboutPanel)

    deltaAboutY = formInfoHeight+20
    control_setPosition(AboutLbl, 40, formInfoHeight+20)
    baseString = " BLA .. BLA ... BLA ... BLA .. BLA ... BLA\n\r"

    for    i=1, 50 do
        baseString = baseString..i..")" .." BLA .. BLA ... BLA ... BLA .. BLA ... BLA\n" --i .. ") ".. baseString
    end

    control_setCaption(AboutLbl, baseString)

    btnAboutExit = createButton(formInfo)
    control_setCaption(btnAboutExit,"Exit")
    btnAboutExitWidth, btnAboutExitHeight = control_getSize(btnAboutExit)
    control_setPosition(btnAboutExit, formInfoWidth - 3 - btnAboutExitWidth, formInfoHeight - 3 - btnAboutExitHeight)
    control_onClick(btnAboutExit, OnMusicStopAndExit)

    form_centerScreen(formInfo)

    xmplayer_playXM('C:\\Users\\master\\Desktop\\Gamehack\\CE\\CETrainer\\TrainerTest\\Trainer_GameHackLab[RU]\\GameHackLab[RU]_Trainers\\Resources(v1.0)\\musics\\SnD - Ahead DVD Ripper 2.4.1 kg.xm')

        if      timerGUIAbout == nil then
                timerGUIAbout = createTimer(formInfo,false)
                timer_setInterval(timerGUIAbout, 20)
                timer_onTimer(timerGUIAbout, timerGUIAboutLabel)
        end
        timer_setEnabled(timerGUIAbout, true)
end

ShowFormInfo()


------------------
If you try, you can do some more examples:

When I make trainer, then let you know ...
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