X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Feditor.c;h=091b01867134e0e49f0ed38b05e2feb9fc6d6679;hb=c21cf4c301f745142f3cbb4987efe6446a3a8c4e;hp=fd269219d59235b586518822b4a5cc2218f3eb19;hpb=4c8c9d74169f09d9b21e3ea0d826b60cda37caaa;p=rocksndiamonds.git diff --git a/src/editor.c b/src/editor.c index fd269219..091b0186 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);