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 


TFontDialog

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

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Fri Oct 09, 2020 11:31 pm    Post subject: TFontDialog Reply with quote

Is any chance to register TFontDialog component class to CE?
So we can handle font at the runtime

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Mon Oct 12, 2020 3:30 pm    Post subject: Reply with quote

Ok. I have add lazarus TFontDialog and add register the component to ceguicomponents.pas (Tried on CE 7.0 source code and recompile CE 7.0 source).

The font dialog able to use to change font properties at the run time on the form, as attached image.

So, DB would you make that lazarus TFontDialog permanent on next CE Version by register it on ceguicomponents.pas?.

But I failed to add LCL TBitBtn to ceguicomponent Very Happy



Capture1.JPG
 Description:
 Filesize:  96.96 KB
 Viewed:  1925 Time(s)

Capture1.JPG



_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Tue Oct 13, 2020 2:22 am    Post subject: Reply with quote

It's Okay. I have recompile CE 7.1 source with add TFontDialog and TSpeedButton.

Code:
function createFontDialog(Parent)
local fd = createComponentClass('TFontDialog', Parent)
 fd.Parent = Parent
 return fd
end

function createSpeedButton(Parent)
local bt = createComponentClass('TSpeedButton', Parent)
 bt.Parent = Parent
 return bt
end

if f then f.Destroy() end
f = createForm()
f.Position = 'poScreenCenter'
f.Height = 100
f.Caption = 'FontDialog / SpeedButton'
b = createButton(f)
b.Caption = 'Choose Font'
l = createLabel(f)
l.Top = 40
l.Caption = 'Cheat Engine'
fd = createFontDialog(f)
sb = createSpeedButton(f)
sb.setPosition(150,0)
sb.setSize(100,30)
sb.Caption = 'Speed Button'
sb.Glyph.loadFromStream(findTableFile('save.bmp').Stream)

function testDialog()
 if fd.Execute() then
    l.Font = fd.Font
 end
end

function sbClick()
 sb.Enabled = not sb.Enabled
 showMessage('You has been clicked speed button')
 sb.Enabled = not sb.Enabled
end

b.OnClick = testDialog
sb.OnClick = sbClick



Capture1.JPG
 Description:
 Filesize:  18.56 KB
 Viewed:  1903 Time(s)

Capture1.JPG



_________________
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 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