View Single Post
Old 08-08-2017, 11:23 AM   #10
Human being with feelings
Join Date: Jan 2017
Posts: 43

Originally Posted by olilarkin View Post
what operating system are you using? think I have some fixes for coloured text entry boxes

I've noticed the issue in Reaper (64 bit) on both macOS 10.11 and 10.12.

As far as I can tell in my setup:

- The IColor that's supposed to be the text color (COLOR_ORANGE) does nothing.

- The background color works in hosts other than Reaper.

- The foreground color is what the text is actually colored as.

What I've been doing is drawing the background manually and setting the background color alpha to 0, but in Reaper it just defaults to black. I figured out how to detect which host the plugin is running in, so I could just draw everything differently in Reaper, but ideally there's some fix and things could be consistent across hosts.

Any fixes you've figured out would be wonderful!

Just in case I'm doing something stupid (very likely), this is all the relevant parts of my text entry code:
    // TextEntry background color , ICOLOR(A, R, G, B)
    const IColor bgColor = IColor(0, 130, 130, 130);
    // Text color
    const IColor fgColor = IColor(255, 30, 30, 30);
    IText text = IText(21, &COLOR_ORANGE, font, IText::kStyleNormal, IText::kAlignCenter, 0, IText::kQualityAntiAliased, &bgColor, &fgColor);

void OnMouseDown(int x, int y, IMouseMod* pMod){
        if (((x >= entryDrawRectL) && (x <= entryDrawRectL + entryDrawRectW)) && ((y >= entryDrawRectT) && (y <= entryDrawRectT + entryDrawRectH))){
            const char* testText = "";
            mPlug -> GetGUI() -> CreateTextEntry(this, &text, &entryTextRect, testText);
            textEntryClicked = true;

Last edited by MSK; 08-24-2017 at 03:21 PM.
MSK is offline   Reply With Quote