X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Feditor.c;h=9396d5eff13053a7a27003c8b14be530745224c0;hp=2bf5543c8314fa4f345ebc88a4a2968a2141e9cd;hb=b77c449c5eb0d244bd0367746ce45da07b89e38a;hpb=150e2c478051926d16763c247f76291f81d248cb diff --git a/src/editor.c b/src/editor.c index 2bf5543c..9396d5ef 100644 --- a/src/editor.c +++ b/src/editor.c @@ -7146,7 +7146,10 @@ void CreateLevelEditorGadgets(void) right_gadget_border = checked_calloc(num_editor_gadgets * sizeof(int)); - editor_el_empty = checked_calloc(ED_NUM_ELEMENTLIST_BUTTONS * sizeof(int)); + // set number of empty (padding) element buttons to maximum number of buttons + num_editor_el_empty = ED_NUM_ELEMENTLIST_BUTTONS; + + editor_el_empty = checked_calloc(num_editor_el_empty * sizeof(int)); editor_el_empty_ptr = editor_el_empty; use_permanent_palette = !editor.palette.show_as_separate_screen; @@ -12376,6 +12379,8 @@ static int DrawLevelText(int sx, int sy, char letter, int mode) case TEXT_SETCURSOR: DrawEditorElement(last_sx, last_sy, Feld[lx][ly]); DrawAreaBorder(sx, sy, sx, sy); + StartTextInput(SX + sx * ed_tilesize, SY + sy * ed_tilesize, + ed_tilesize, ed_tilesize); last_sx = sx; last_sy = sy; break; @@ -12420,6 +12425,7 @@ static int DrawLevelText(int sx, int sy, char letter, int mode) case TEXT_END: CopyLevelToUndoBuffer(UNDO_IMMEDIATE); DrawEditorElement(sx, sy, Feld[lx][ly]); + StopTextInput(); typing = FALSE; break;