iPlug2 Forum

CreateTextEntry - input transparent background

We have simple ITextControl to enter a new value but the background white color. I saw a few plugins which can make transparent back.

GetUI()->CreateTextEntry(*this, mText, mRECT, std::to_string(GetParam()->Value()).c_str());

I found some code for a set color and etc.

void PromptUserInput()
{ // note: base should make this virtual
if (mParamIdx >= 0 && !mDisablePrompt) {
IColor saveColor = mText.mTextEntryBGColor;
mText.mTextEntryBGColor = COLOR_YELLOW;
mPlug->GetGUI()->PromptUserInput(this, mPlug->GetParam(mParamIdx), &mRECT);
mText.mTextEntryBGColor = saveColor;
Redraw();
}
}

What should I do? Deactivation of the color you must specify without color or just set the property, then which one.

I use it for mac and it works but I have black BG on Windows…

mText.mTextEntryFGColor = COLOR_LIGHT_GRAY;
mText.mTextEntryBGColor = COLOR_TRANSPARENT;

You might want to investigate the IGraphics text entry, which is a text entry that we draw inside the plugin UI, not using a native widget.

pGraphics->AttachTextEntryControl();