 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
paul44 Expert Cheater
Reputation: 2
Joined: 20 Jul 2017 Posts: 189
|
Posted: Tue Mar 11, 2025 7:48 am Post subject: REQ: Form: define own color_codes |
|
|
I.e just like in [defines.lua], I'd like to add my own color_code (enum ?) which can then be selected when choosing the color for a specific element/object.
=> prerequisite: it should - per definition - be "defineable per form/table".
(iow i do not want to ask users to edit 'defines.lua' or similar/related CE config_file or registry; and/or add such a file to their CE installment)
> Reason: while it is reasonably easy to change colors (on-the-fly) via lua, you still need to parcour each of them objects to get them colors changed. If one can define/add his/her own customcodes, then one only needs to change the color_value for that particular custom_code.
Eg: instead of 'clDefault' for all [TCEPanel]s, you'll define a 'clMyPanel1' (and ofc a specific color_code). So one only has to change that particular color_code to update all panels accordingly...
ps: tried adding it to 'defines.lua' but no cigar...
=> which is NOT the way I'd like it see working btw, since i want to avoid possible conflicts with other tables (mine or others)
|
|
Back to top |
|
 |
Csimbi I post too much
Reputation: 97
Joined: 14 Jul 2007 Posts: 3282
|
Posted: Tue Mar 11, 2025 3:45 pm Post subject: |
|
|
Also, - to improve readability - is there a way to "automate" picking the right scheme based on the theme?
For example, define colours for a) normal mode, b) dark mode and CE would pick the "right set" based on whichever setting is active at the moment.
Thanks!
|
|
Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 34
Joined: 16 Feb 2017 Posts: 1465
|
Posted: Tue Mar 11, 2025 9:01 pm Post subject: |
|
|
In this case, my idea is;
@paul44: Out
@Csimbi: In
Adding such a preset for the form designer (in a global sense, the kind that comes with the installation) seems like a debatable situation in terms of necessity.
Moreover; There is no such example among its peers and "Defaults" have always been used and since it is already "Designer Mode", somehow users shape it according to their own wishes.
Also, a local "Automatic command" code can be written for those who use this feature "frequently". It does not have to be valid for everyone, after all, the Form Designer will make the necessary records and apply it.
The other suggestion, "CE Visual Mode", is at the forefront in terms of necessity.
Especially considering that users who look at the screen a lot today have different eye sensitivities compared to each other;
It seems that "Normal Mode" or "Dark Mode" with white exploding in black does not provide a sufficient solution.
I am not authorized to talk about the general addition that comes with the installation, as I think it would be possible to code locally and each form, including the main CE form, could be customized in terms of "Color" and "Font Color".
The problem is; There are so many forms and if most of them have "Default" color assignments in them, it can be a pain to break and change them.
The good thing is; I will try this.
_________________
|
|
Back to top |
|
 |
paul44 Expert Cheater
Reputation: 2
Joined: 20 Jul 2017 Posts: 189
|
Posted: Wed Mar 12, 2025 1:36 am Post subject: interested to see what you'll cook up... |
|
|
^ just to be clear: "instead of 'clDefault'" means: i do NOT want to replace this option in any way, just ADD an additional color_code/string/enum; which i can then use in my table/form. Iow in any other table, this "color_code" would - per definition - not exist (sort of speak)... (although can/could be)
ps: not sure what you mean with "Out" ? like in: 'not possible ?' in that case: "ooooooohhh"
ps2: by now i got most in place to update objects such as panels, listbox, etc ("main" visual objects"; but obvioiusly i have to parkour each and everyone of them (if you get my drift)
ps3: if darkmode would not exist, we would not be talking here either
(not a fan at all btw; of darkb... mode, i mean )
|
|
Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 34
Joined: 16 Feb 2017 Posts: 1465
|
Posted: Wed Mar 12, 2025 3:52 pm Post subject: |
|
|
"In", "Out", only in terms of my opinion; It reflects my observations on whether the situation can be handled or not (with excessive requests or feature requests..).
Actually, my opinion does not matter for the result. (Just because it is my personal opinion.)
Of course, the final decision to evaluate, queue, implement or not implement this suggestion for the development of CE belongs to @DarkByte and I think he will observe a little more and measure the interest in the feature request.
Before "Dark Mode", we were using it by coloring certain sections in CE, adding pictures and happily abusing the feature of being "Open Source".
Yes, although it seems "Cool" to many people, I also do not like "Dark Mode" because it gives me the feeling and perspective that "I do not have full control of the application", that I am missing something.
On the other hand, I am giving up on this "Mod" customization topic that I said I would be interested in because it would affect too many forms and controls related to these forms, or I am thinking of writing a mod limited to only "MainForm".
Ah.. I have already published a similar article because I think I can edit and update it.
Ok. In your case, this request is just a matter of gathering the necessary majority, increasing interest and demand.
I hope the best for CE.
_________________
|
|
Back to top |
|
 |
paul44 Expert Cheater
Reputation: 2
Joined: 20 Jul 2017 Posts: 189
|
Posted: Sat Mar 15, 2025 9:21 am Post subject: or... |
|
|
another option might be: is it possible to edit/change the colorvalue of a particular/predefined color_code (without having it edited in the defines.lua first ofc) ?
=> eg: use clCream in your form, but upon loading you change its initial colorvalue - 0xF0FBFF - to whatever you'd prefer ?
(still limited but it'll open some perspective)
|
|
Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 34
Joined: 16 Feb 2017 Posts: 1465
|
Posted: Sat Mar 15, 2025 12:26 pm Post subject: |
|
|
Still, it is necessary to process the new usage of the idea globally (in the Loading and CE main code).
Because you may want to do this in a local setting differently.
(Since I did not code this extensively, I am just presenting the idea.)
Base on "clDefault", even make this color user-defined and keep it the same if it is not edited (if a new color is not assigned).
Since every control comes with "clDefault", a scope like this can be created;
Control:
>> If "TCEPanel"
>>> Control.Color If "clDefault"
>>> If a new color is selected for "TCEPanel"
>>> Control.Color=selected color,
>>> Control.Font.Color=selected font color. Last.
>>> If not, ignore it.
I think the Form Designer will save the new color given by this algorithm and reflect it to the user.
In this case, there will be no need to write an additional color algorithm to the user (in the Lua Script).
Just tell the user whether the idea is suitable for the desired feature or not.
We have already done coding in the past that manipulates the Form Designer (adds new and different features). We can try this too.
_________________
|
|
Back to top |
|
 |
paul44 Expert Cheater
Reputation: 2
Joined: 20 Jul 2017 Posts: 189
|
Posted: Sun Mar 16, 2025 5:36 am Post subject: just to be sure |
|
|
just to be sure that we are on the same wavelength here:
> see images here [ https://ibb.co/album/KbLrG4 ] & in Darkmode: [ https://ibb.co/twzX4rft ] (oopsie daisy ~ can now be changed in most part)
a. white background: default colors
b. "reddish' bckgr: colors toggled
c. part of the 'toggle' btn code
=> as you can "see", I need to parkour each and every object that needs a color_change. normally, these are set 'clDefault' (or something), but i might have changed these to 'clWhite' by now). and basically, every table/array here corresponds with a particular color: in this case, the elements in 'aPanels' all receive that "reddish" color here...
=> as you explained earlier, this can "easily" be coded. But indeed, one needs to parkour each and everyone of them objects.
Hence my request: if one can define a new color_code (or alter an existing color_code), then the "only" thing you'll need to do i(logically ?) s set - for example - your TCEPanel objects to 'clMyColor' (or 'clCream' for that matter) once. (which - per definition - is something you'll need to do/check anyways)
=> in that case, the "only" code you'll need to write is just update the hexvalue of that color_code (and no need to worry about the panel_objects at all)...
ps: I DO assume it is not doable atm - hence REQ - so I'll have to do that coding anyways. I just came to this "idea" while evaluating them labels (not to mention them fields), because there are plenty ! (sure: doable but a pain Smile)
|
|
Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 34
Joined: 16 Feb 2017 Posts: 1465
|
Posted: Sun Mar 16, 2025 6:35 pm Post subject: |
|
|
I coded a code that only covers the controls in the table and is only used in the Form Designer, and a color palette where you can select new colors.
I created a surprisingly complex coded result that works by selecting the control, changing its color and font color, saving it, and using the colors you saved the next time you open the Form Designer.
I will open a new article in the Lua section tomorrow and share this code.
You can use the entire code or just the parts that are useful to you.
Code: | local controlTable = {
TCELabel = { color = clDefault, fontColor = clBlack },
TCEPanel = { color = clDefault, fontColor = clBlack },
TCEMemo = { color = clDefault, fontColor = clBlack },
TCEEdit = { color = clDefault, fontColor = clBlack },
TCEGroupBox = { color = clDefault, fontColor = clBlack },
TCERadioGroup = { color = clDefault, fontColor = clBlack },
TCEListBox = { color = clDefault, fontColor = clBlack },
TCheckListBox = { color = clDefault, fontColor = clBlack },
TCEComboBox = { color = clDefault, fontColor = clBlack },
TCETreeview = { color = clDefault, fontColor = clBlack },
TCEListView = { color = clDefault, fontColor = clBlack },
TCEPageControl = { color = clDefault, fontColor = clBlack },
TScrollBox = { color = clDefault, fontColor = clBlack }
} |
Color Save Palette:
_________________
|
|
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
|
|