Hi, I want my buttons to be white. I'm assuming that I could just use "/0" as the text and then draw some black text on top of them, but before I put forth that effort I wanted to ask:
Does anyone know if it is possible to change the text color of Buttons to black instead of the default white?
EVE2 - Button Text color besides White
Moderator: Mods
-
- Matrix Orbital
- Posts: 247
- Joined: Thu Sep 24, 2015 9:38 am
Re: EVE2 - Button Text color besides White
Hi Jwizard,
You should be able to configure the color of your buttons using the CMD_FGCOLOR command. The color of your text can be set by using the COLOR_RGB display list/Co-processor command.
Here's an example using our EVE library:
Give it a shot!
Cheers,
Daniel
You should be able to configure the color of your buttons using the CMD_FGCOLOR command. The color of your text can be set by using the COLOR_RGB display list/Co-processor command.
Here's an example using our EVE library:
Code: Select all
Send_CMD(CMD_DLSTART);
Send_CMD(CLEAR_COLOR_RGB(255,255,255));
Send_CMD(CLEAR(1,1,1));
Send_CMD(COLOR_RGB(0, 0, 0));// Change color of following text to black
Cmd_FGcolor(0xFFFFFF); / Change button face color to white
Send_CMD(TAG(1));// Tag the following button as a touch region with a return value of 1
Cmd_Button(100, 125, 120, 48, 28, 0, "Test");//Create a white button with black text
Send_CMD(DISPLAY());
Send_CMD(CMD_SWAP);
UpdateFIFO();// Trigger the CoProcessor to start processing the FIFO
Cheers,
Daniel
Daniel Divino
Technical Support
Matrix Orbital
Technical Support
Matrix Orbital
Re: EVE2 - Button Text color besides White
Thanks, Daniel.
This is exactly what I was missing!
I noticed that using font 22 produced bad results with this method, but font 23 looked good. I am assuming that this is due to properties of the fonts themselves. When 22 is white it looks like it has some black pixels to enhance definition, so turning it black creates some weird artifacts.
I have no need for further assistance, unless you have some insight about the color properties of fonts / know that I am wrong about font 22 and it should look fine.
Many thanks!
This is exactly what I was missing!
I noticed that using font 22 produced bad results with this method, but font 23 looked good. I am assuming that this is due to properties of the fonts themselves. When 22 is white it looks like it has some black pixels to enhance definition, so turning it black creates some weird artifacts.
I have no need for further assistance, unless you have some insight about the color properties of fonts / know that I am wrong about font 22 and it should look fine.
Many thanks!
Re: EVE2 - Button Text color besides White
Can you tell us about your project more?
Henry J.
President
Matrix Orbital
President
Matrix Orbital