diff --git a/src/FUNKTION.cpp b/src/FUNKTION.cpp index 6552b94..07a798d 100644 --- a/src/FUNKTION.cpp +++ b/src/FUNKTION.cpp @@ -122,9 +122,8 @@ struct FUNKTIONDisplay : TransparentWidget { void drawLayer(const DrawArgs &args, int layer) override { if (layer ==1) { shared_ptr font = APP->window->loadFont(asset::plugin(pluginInstance, "res/LEDCalculator.ttf")); -std::string fD= module ? module->fctDesc : "sin"; - std::string to_display = ""; - for (int i=0; i<14; i++) to_display = to_display + fD[i]; +std::string to_display= module ? module->fctDesc : "sin"; + to_display.resize(14); nvgFontSize(args.vg, 24); nvgFontFaceId(args.vg, font->handle); nvgTextLetterSpacing(args.vg, 0); diff --git a/src/LABEL.cpp b/src/LABEL.cpp index 713b8b4..a318a0a 100644 --- a/src/LABEL.cpp +++ b/src/LABEL.cpp @@ -21,7 +21,7 @@ struct LABEL : Module { }; - std::string fileDesc = "Right clic to write"; + std::string fileDesc = "Right click to write"; @@ -71,9 +71,8 @@ struct LABELDisplay : TransparentWidget { void drawLayer(const DrawArgs &args, int layer) override { if (layer ==1) { shared_ptr font = APP->window->loadFont(asset::plugin(pluginInstance, "res/LEDCalculator.ttf")); -std::string fD= module ? module->fileDesc : "Right clic to write"; - std::string to_display = ""; - for (int i=0; i<20; i++) to_display = to_display + fD[i]; +std::string to_display= module ? module->fileDesc : "Right click to write"; + to_display.resize(20); nvgFontSize(args.vg, 24); nvgFontFaceId(args.vg, font->handle); nvgTextLetterSpacing(args.vg, 0); diff --git a/src/PLAY.cpp b/src/PLAY.cpp index 44f9f51..fe15255 100644 --- a/src/PLAY.cpp +++ b/src/PLAY.cpp @@ -249,9 +249,8 @@ struct PLAYDisplay : TransparentWidget { void drawLayer(const DrawArgs &args, int layer) override { if (layer ==1) { shared_ptr font = APP->window->loadFont(asset::plugin(pluginInstance, "res/LEDCalculator.ttf")); -std::string fD= module ? module->fileDesc : "load sample"; - std::string to_display = ""; - for (int i=0; i<14; i++) to_display = to_display + fD[i]; +std::string to_display= module ? module->fileDesc : "load sample"; + to_display.resize(14); nvgFontSize(args.vg, 24); nvgFontFaceId(args.vg, font->handle); nvgTextLetterSpacing(args.vg, 0);