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 


About the change of iconfont color

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
.lua
Expert Cheater
Reputation: 1

Joined: 13 Sep 2018
Posts: 202

PostPosted: Sat Oct 19, 2019 11:57 pm    Post subject: About the change of iconfont color Reply with quote

bmp,jpg,png,tif,gif,pcx,tga,exif,fpx,svg,psd,cdr,pcd,dxf,ufo,eps,ai,raw,WMF,webp
What formats of images can the cheating engine modify in color?
Do you have a color code to change the color of the icon or image format above



iconfont.png
 Description:
 Filesize:  22.13 KB
 Viewed:  4116 Time(s)

iconfont.png


Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1522

PostPosted: Sun Oct 20, 2019 5:47 pm    Post subject: Reply with quote

Although it does not reflect exactly what it tells;
Superficial and simple coding available.
You can develop this idea for yourself.

Code:
function RGBToHex(red, green, blue)
 if(red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) then
 return nil
 end
 return string.format("0x%.2X%.2X%.2X", red,green,blue)
end
function test()
 local color = getPixel(getMousePos())
 UDF1.CEPanel1.Color = color
 if UDF1.CEPanel1.Color==color then
  c = UDF1.CEPanel1.Color
  local r,g,b = c & 0xff, c >> 8 & 0xff, c >> 16 & 0xff
  rgbstr = tostring(r)..','..tostring(g)..','..tostring(b)
  rgbhex = tostring(RGBToHex(r,g,b))
 local color = getPixel(getMousePos())
end
end

function text()
UDF1.CEPanel2.Color = (c)
 UDF1.CEEdit1.Text = (c)
 UDF1.CEEdit2.Text = rgbhex
end

UDF1.CEImage1.onMouseDown = text
UDF1.CEImage1.onMouseMove = test
--------------------------------


UDF1.CEComboBox1.caption=""
UDF1.CEComboBox1.clear()
UDF1.CEComboBox1.Items.Add("180")
UDF1.CEComboBox1.Items.Add('200')
UDF1.CEComboBox1.Items.Add('220')
UDF1.CEComboBox1.Items.Add('150')
UDF1.CEComboBox1.Items.Add('100')
UDF1.CEComboBox1.Items.Add('75')
UDF1.CEComboBox1.Items.Add('50')
UDF1.CEComboBox1.Items.Add("25")
UDF1.CEComboBox1.ItemIndex="0"

function CEComboBox1Change(sender)
local index = UDF1.CEComboBox1.Text
if index then
control_setSize(UDF1.CEPanel2, index,index)
control_setSize(UDF1.CEImage2, index,index)
end
end

function CEButton1Click(sender)
if UDF1.CEEdit2.Text=="" then
showMessage("Please enter a valid color code ..!")
else
UDF1.CEPanel3.color = UDF1.CEEdit3.Text
end
end


And for color coding, a detailed work: by @Corroder.

Color Sniff / Palette Tool (CRDR)



Example_RGB.PNG
 Description:
 Filesize:  35.57 KB
 Viewed:  4080 Time(s)

Example_RGB.PNG



_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
.lua
Expert Cheater
Reputation: 1

Joined: 13 Sep 2018
Posts: 202

PostPosted: Mon Oct 21, 2019 12:07 am    Post subject: Reply with quote

Aylin wrote:
And for color coding, a detailed work: by @Corroder.
I don't want to get the color of the image, but to change the color of the image.


Sketch Map.png
 Description:
 Filesize:  28.36 KB
 Viewed:  4066 Time(s)

Sketch Map.png


Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1522

PostPosted: Mon Oct 21, 2019 5:00 am    Post subject: Reply with quote

What does the above code do.
Here's a video: Watch

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
.lua
Expert Cheater
Reputation: 1

Joined: 13 Sep 2018
Posts: 202

PostPosted: Mon Oct 21, 2019 6:57 am    Post subject: Reply with quote

Aylin wrote:
What does the above code do.
Here's a video: Watch
The above code takes the color of the image and displays it on the panel, but my goal is to change the color of the image
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