summaryrefslogtreecommitdiffstats
path: root/src/tk/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tk/text.c')
-rw-r--r--src/tk/text.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tk/text.c b/src/tk/text.c
index 76bb27a..7401777 100644
--- a/src/tk/text.c
+++ b/src/tk/text.c
@@ -266,6 +266,22 @@ _mftk_text_render(struct mftk_widget *w, SDL_Renderer *renderer, int x, int y)
return -1;
}
+ if (t->editable == SDL_TRUE) {
+ rect.x = x;
+ rect.y = y;
+ rect.w = w->w;
+ rect.h = w->h;
+ if (SDL_SetRenderDrawColor(renderer,
+ MFTK_COLOR_BACK_R, MFTK_COLOR_BACK_G,
+ MFTK_COLOR_BACK_B, MFTK_COLOR_BACK_A) <
+ 0 || SDL_RenderFillRect(renderer, &rect) < 0) {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
+ "Couldn't render widget: %s",
+ SDL_GetError());
+ return -1;
+ }
+ }
+
rect.x = x;
rect.y = t->y + y;
rect.w = t->w;