|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Sat Jan 07, 2017 8:43 am Post subject: CheckBox Logic |
|
|
Hi guys,
Code: | function change()
fnC= getProperty(UDF1.CELabel1 , "Font")
if checkbox_getState(UDF1.CECheckbox1)== 1 then
setProperty(fnC, "Style", "[fsItalic]")
else
setProperty(fnC , "Style", "[]")
end
return true
end
UDF1.CECheckbox1.onChange = change
|
With function above :
-- checkbox checked --> Font on CELabel1 style go to ITALIC
-- checkbox unchecked --> Font on CELabel1 style go normal
Now :
Code: | function change()
fnC= getProperty(UDF1.CELabel1 , "Font")
if checkbox_getState(UDF1.CECheckbox1)== 1 then
setProperty(fnC, "Style", "[fsItalic]")
else
setProperty(fnC , "Style", "[]")
end
return true
end
function change1()
fnD= getProperty(UDF1.CELabel1 , "Font")
if checkbox_getState(UDF1.CECheckbox2)== 1 then
setProperty(fnD, "Style", "[fsBold]")
else
setProperty(fnD , "Style", "[]")
end
return true
end
UDF1.CECheckbox1.onChange = change
UDF1.CECheckbox2.onChange = change1
|
when two checkBox checked or unchecked, it's make CELabel1 font style going to BOLD, no ITALIC.
How to make CELabel1 font style ITALIC and or BOLD as like on/off function with correct order when check boxes check / uncheck ?
Thank you for helps...
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Jan 07, 2017 9:37 am Post subject: |
|
|
Let Dark Byte worry about his own crummy string format.
Code: | function CECheckbox1Click(sender)
local font = UDF1.CELabel1.Font
if sender.Checked then
font.Style = font.Style .. "fsBold"
else
font.Style = string.gsub(font.Style, "fsBold", "")
end
end
function CECheckbox2Click(sender)
local font = UDF1.CELabel1.Font
if sender.Checked then
font.Style = font.Style .. "fsItalic"
else
font.Style = string.gsub(font.Style, "fsItalic", "")
end
end |
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Sat Jan 07, 2017 7:55 pm Post subject: |
|
|
Hehehe...Thank Zanzer, Sir....
for DB crummy string format.....
|
|
Back to top |
|
|
|
|
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
|
|