Skip to content
Snippets Groups Projects

added width, height to nukleardraw in draw_text

Merged Joakim Borge Hunskår requested to merge adjust-drawtext-function into main
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -261,7 +261,7 @@ void TDT4102::AnimationWindow::draw_text(TDT4102::Point topLeftPoint, std::strin
textWindowCounter++;
std::stringstream windowName;
windowName << "text" << textWindowCounter;
startNuklearDraw(topLeftPoint, windowName.str());
startNuklearDraw(topLeftPoint, windowName.str(), textToShow.size()*fontSize, fontSize);
fontCache.setFont(context, font, fontSize);
nk_color textColour{color.redChannel, color.greenChannel, color.blueChannel, color.alphaChannel};
nk_text_colored(context, textToShow.c_str(), textToShow.size(), NK_TEXT_ALIGN_LEFT, textColour);
Loading