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 


Color of ToggleBox

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

Joined: 02 Aug 2018
Posts: 2

PostPosted: Thu Aug 16, 2018 6:59 am    Post subject: Color of ToggleBox Reply with quote

Hi,

is there a possibility of changing color of ToggleBox or color of it's caption? I tried everything I found here and nothing is working.
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: Thu Aug 16, 2018 7:27 am    Post subject: Re: Color of ToggleBox Reply with quote

Dran wrote:
Hi,

is there a possibility of changing color of ToggleBox or color of it's caption? I tried everything I found here and nothing is working.


You can make your own ToggleBox using A Panel with colors and code it.

EDIT :

here is the example (Press CTRL + ALT + L to see the code)

http://www.mediafire.com/file/877z4kh00036n24/custom%20toggbox.CT

_________________
my english is bad
discord : rynx#9828
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Thu Aug 16, 2018 7:01 pm    Post subject: Reply with quote

Since not found way to change togglebox face and font color, use label with color to manipulating togglebox on/off as example below :

Code:
red="0x000000FF"
black="0x00999999"

f = createForm()
f.width = 100
f.height = 70

tb = createToggleBox(f)
tb.top = 10
tb.left = 10
tb.width = 40
tb.height = 40
tb.Caption = 'OFF'

l = createLabel(f)
l.top = 20
l.left = 60

function tbChange(sender)
 if (checkbox_getState(tb) == 1) then
  --print('Hack enable')  --- your hack code here
  l.Font.Color = red
  l.Caption = 'LIVE'
  tb.Caption = 'ON'
 else
  --print('Hack disable') --- your hack code here
  l.Font.Color = black
  l.Caption = 'DIE'
  tb.Caption = 'OFF'
 end
end

tb.onChange = tbChange
f.show()

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25288
Location: The netherlands

PostPosted: Thu Aug 16, 2018 11:41 pm    Post subject: Reply with quote

a togglebox is a windows component and can only change it's color if the windows style changes.

use a paintbox and render the box yourself using the canvas if you need something more colorful

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Fri Aug 17, 2018 8:29 am    Post subject: Reply with quote

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

Joined: 02 Aug 2018
Posts: 2

PostPosted: Fri Aug 17, 2018 1:39 pm    Post subject: Reply with quote

Thank you all. The first solution seems to be the best. Its only downside is that button/togglebox created this way is not possible to activate by keyboard.
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