I am trying to draw colored text with BaseDraw::DrawHUDText().
Using BaseDraw::SetPen() before, has no effect.
Is there any way to draw text with custom color using DrawHUDText funcrtion ?
there's no direct function for that but you can retrieve the color parameter of BaseDraw using GetParameter
An example of a python tag that could display the text: It will work the same with C++.
here I'm not using GetParameter but you get the idea
savedColor = bd[c4d.BASEDRAW_HUD_TEXTCOLOR]
savedBG = bd[c4d.BASEDRAW_HUD_BACKCOLOR]
savedOpacity = bd[c4d.BASEDRAW_HUD_BACKOPACITY]
bd[c4d.BASEDRAW_HUD_BACKOPACITY] = 0.1
bd.DrawHUDText(50, 50, "my text")
bd[c4d.BASEDRAW_HUD_BACKOPACITY] = savedOpacity
pass #put in your code here
you can also have a look at this thread where you will find some useful informations on how to display a texture on the viewport (and some text on it)
Works like a charm!
It's much more flexible than I hoped;)
Thanks a lot!