X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Feditor.c;h=50988c0d88b527cd13e7078b21c36a2bd5151cf3;hb=f5356588a234e34e349c0b1eba02008655fdee87;hp=fd269219d59235b586518822b4a5cc2218f3eb19;hpb=4c8c9d74169f09d9b21e3ea0d826b60cda37caaa;p=rocksndiamonds.git diff --git a/src/editor.c b/src/editor.c index fd269219..50988c0d 100644 --- a/src/editor.c +++ b/src/editor.c @@ -683,7 +683,7 @@ static int ed_fieldx = MAX_ED_FIELDX - 1, ed_fieldy = MAX_ED_FIELDY - 1; /* actual position of level editor drawing area in level playfield */ static int level_xpos = -1, level_ypos = -1; -#define IN_ED_FIELD(x,y) ((x)>=0 && (x)=0 &&(y)=0 && (x)=0 &&(y)= 'A' && key <= 'Z' ? "Shift-" : - gi->custom_id == GADGET_ID_SINGLE_ITEMS ? ".' or '" : ""), - key); + if (gi->custom_id == GADGET_ID_SINGLE_ITEMS) /* special case 1 */ + sprintf(shortcut, " ('.' or '%c')", key); + else if (gi->custom_id == GADGET_ID_TEST) /* special case 2 */ + sprintf(shortcut, " ('Enter' or 'Shift-%c')", key); + else /* normal case */ + sprintf(shortcut, " ('%s%c')", + (key >= 'A' && key <= 'Z' ? "Shift-" : ""), key); if (strlen(infotext) + strlen(shortcut) <= MAX_INFOTEXT_LEN) strcat(infotext, shortcut);