fixed bug with broken text area content when editing envelope text
[rocksndiamonds.git] / src / libgame / gadgets.c
index a8d3e55c35460abe482e076e4e165a2a5915b7a4..fcfd235e509fa07a37a8ade24c17a3e2e6c90f81 100644 (file)
@@ -423,9 +423,9 @@ static void DrawGadget(struct GadgetInfo *gi, boolean pressed, boolean direct)
                                   gi->height - 2 * border_y);
 
        // gadget text value
-       DrawTextBuffer(gi->x + border_x, gi->y + border_y, gi->textarea.value,
-                      font_nr, gi->textarea.xsize, -1, gi->textarea.ysize, 0,
-                      BLIT_ON_BACKGROUND, FALSE, FALSE, FALSE);
+       DrawTextArea(gi->x + border_x, gi->y + border_y, gi->textarea.value,
+                    font_nr, gi->textarea.xsize, -1, gi->textarea.ysize, 0,
+                    BLIT_ON_BACKGROUND, FALSE, FALSE, FALSE);
 
        cursor_letter = gi->textarea.value[gi->textarea.cursor_position];
        cursor_string[0] = (cursor_letter != '\0' ? cursor_letter : ' ');