I have a custom textbox GUI, named gTextBox. The default color for the text in the box is 0 (black). I want to add a high contrast option for those with vision issues (or who prefer a higher contrast). I realized I can't seem to set the gTextbox.TextColor value via script.
Is there any way to programmatically change that value? I have a button set up to toggle back and forth, but it doesn't want to let me...
(https://billandnicole.net/AGS/clips/textcolor.png)
And here is the code from my button on the control panel:
function settingTextColor_OnClick(GUIControl *control, MouseButton button)
{
if (textboxColorDefault == 0){ // Global variable for the color of the textbox
gTextBox.TextColor = 15; // Make text white
textboxColorDefault = 1; // Set global variable to say text is white
settingTextColor.NormalGraphic = 714; // Set the button graphic to show a white text
}
else if (textboxColorDefault == 1){ // Global variable for the color of the textbox
gTextBox.TextColor = 0; // Make text black
textboxColorDefault = 0; // Set global variable to say text is black
settingTextColor.NormalGraphic = 715; // Set button graphic to show black text
}
}
EDIT
Solved the issue myself. Here is the correct script (don't know how I missed it):
gTextBox.AsTextWindow.TextColor = 15;
Thanks,
Bill