for (ent = entries; ent->name; ent++)\r
{\r
const char **names;\r
- int len;\r
+ int len, leftname_end = 0;\r
\r
if (!ent->enabled)\r
continue;\r
if (ent->generate_name)\r
name = ent->generate_name(ent->id, &offs);\r
}\r
- if (name != NULL)\r
+ if (name != NULL) {\r
text_out16(x, y, name);\r
+ leftname_end = x + (strlen(name) + 1) * me_mfont_w;\r
+ }\r
\r
switch (ent->beh) {\r
case MB_NONE:\r
break;\r
case MB_OPT_ENUM:\r
names = (const char **)ent->data;\r
- offs = 0;\r
for (i = 0; names[i] != NULL; i++) {\r
+ offs = x + col2_offs;\r
len = strlen(names[i]);\r
if (len > 10)\r
- offs = 10 - len - 2;\r
+ offs += (10 - len - 2) * me_mfont_w;\r
+ if (offs < leftname_end)\r
+ offs = leftname_end;\r
if (i == *(unsigned char *)ent->var) {\r
- text_out16(x + col2_offs + offs * me_mfont_w, y, "%s", names[i]);\r
+ text_out16(offs, y, "%s", names[i]);\r
break;\r
}\r
}\r