[Help] Getting Text Color from INI
i have the following data stored in a ini file ( for custom style colors )
[Loading]
Break=,
Title_Color_Test_1=255,255,255
Title_Color_Test_2=RGB(255,255,255)
Title_Color_Test_3_1=255
Title_Color_Test_3_2=255
Title_Color_Test_3_3=255
Now when i try to use
Set font color to GroupItemValue( "style.ini", "Loading", "Title_Color_Test_1")
It goes red which is 255,0,0 which means it couldnt read the , so i tried setting it to
Set font color to GroupItemValue( "style.ini", "Loading", "Title_Color_Test_2")
This was a long shot but still did not work so my final try was
Set font color to GroupItemValue( "style.ini", "Loading", "Title_Color_Test_3_1") + GroupItemValue( "style.ini", "Loading", "Break") + GroupItemValue( "style.ini", "Loading", "Title_Color_Test_3_2") + GroupItemValue( "style.ini", "Loading", "Break") + GroupItemValue( "style.ini", "Loading", "Title_Color_Test_3_3")
However none of these work, can anyone please provide some assistace as the color has to come from the ini.
Im using the latest build of mmf2dev
Thank You
EDIT: This may be a bug in mmf2, if it is then is there any work-around for this ?
Re: [Help] Getting Text Color from INI
You could try storing the values as RGB, instead of comma-seperating. Either that or you could set font colour:
Code:
RGB(GroupItemValue( "style.ini", "Loading", "Title_Color_Test_3_1") , GroupItemValue( "style.ini", "Loading", "Title_Color_Test_3_2") , GroupItemValue( "style.ini", "Loading", "Title_Color_Test_3_3"))
Re: [Help] Getting Text Color from INI
I found somthing interesting, these can be used.
This is a list of the colors i found out.
BLACK = 0
BLUE = 8388608
GREEN = 32768
CYAN = 8421376
RED = 128
MAGENTA = 8388736
BROWN = 32896
LIGHT GREY = 8421504
LIGHT BLUE = 16711680
LIGHT GREEN = 65280
LIGHT CYAN = 16776960
LIGHT RED = 255
MAGENTA = 16711935
YELLOW = 65535
LIGHT WHITE = 16777215
Re: [Help] Getting Text Color from INI
those are the values that result from GetRGB(), since it's calculated by Red + Blue * 256 + Green * 65536