13.08.2015, 14:33
(
Последний раз редактировалось buburuzu19; 13.08.2015 в 16:31.
)
Solved.
Hello guys, i can't figure out how to convert hex to ARGB.
I need this for SetObjectMaterialText , the colors of the font must be 0xFFFFFFFF and i am getting them from my database as HEX like FF0000. I tried to get them as ARGB from the mysql database (0xFFFFFFFF) but the text won't appear because i get them as string. (VARCHAR in the database) Can someone help? Thanks ! |
stock addAlpha(&basecolor, amount)
return (basecolor<<8)+amount;
new hex = 0xFF0000;
printf("Before: %x after: %x", hex, addAlpha(hex, 255));
Before: FF0000 after: FF0000FF
SetObjectMaterialText requires me to use 0xFFFFFFFF colors.
Give me an example of how to use all your code in SetObjectMaterialText and how should i store the color in the mysql database. Thanks. EDIT: My variable for colors is CarInfo[i][ttColor] |