Page 1 of 1
XIDE Plugin for themes
Posted: Tue Dec 10, 2024 12:01 pm
by Irwin
Hi Chris, I would like to create a plugin that makes XIDE to support themes in the editor but I don't know where XIDE loads the editor themes configurations.
Any help would be appreciated.
Thank you!
Re: XIDE Plugin for themes
Posted: Tue Dec 10, 2024 12:22 pm
by Chris
Hi Irwin,
Can you please further explain what you want to be able to change in detail? I will add support for what you need in the plugin system.
Btw, I'll be offline for the next 24 hours, so will get back to you tomorrow!
Re: XIDE Plugin for themes
Posted: Tue Dec 10, 2024 12:36 pm
by Irwin
Chris wrote: ↑Tue Dec 10, 2024 12:22 pm
Hi Irwin,
Can you please further explain what you want to be able to change in detail? I will add support for what you need in the plugin system.
Btw, I'll be offline for the next 24 hours, so will get back to you tomorrow!
As you know, in the Tools->Preferences->Editor->Colors you can change the editor colors. This is ok but if you want to create another colors pallete then you need to restore or change the colors again and loose your previous configuration (theme). I was thinking of creating a Plugin to support themes by creating several versions of the file where XIDE loads the colors from (if it exists of course).
Re: XIDE Plugin for themes
Posted: Tue Dec 10, 2024 12:50 pm
by Chris
Hi Irwin,
Those are saved and loaded from XIDE.cfg, in the section colors:
[Colors]
ColorText=0
ColorReserved=255
The color is specified as an integer (can also be saved in hex format, if prefixed with "0x") in the form required by the WinAPI CreateSolidBrush() that I am using in the editor (see
https://learn.microsoft.com/en-us/windo ... i/colorref).
But I think it's better not to save data directly there, instead I can add methods in the plugin system to get/set the color for each item, then you can save themes as separate files and let the user load/save them as they wish. What do you think?
Re: XIDE Plugin for themes
Posted: Tue Dec 10, 2024 12:52 pm
by Irwin
Chris wrote: ↑Tue Dec 10, 2024 12:50 pm
Hi Irwin,
Those are saved and loaded from XIDE.cfg, in the section colors:
[Colors]
ColorText=0
ColorReserved=255
The color is specified as an integer (can also be saved in hex format, if prefixed with "0x") in the form required by the WinAPI CreateSolidBrush() that I am using in the editor (see
https://learn.microsoft.com/en-us/windo ... i/colorref).
But I think it's better not to save data directly there, instead I can add methods in the plugin system to get/set the color for each item, then you can save themes as separate files and let the user load/save them as they wish. What do you think?
Hi Chris, that would be great if you add some helpers methods or callbacks for updating the editor colors. That way I could create a more practical plugin to suppor themes.
regards.