#define MICROLABEL_IMPORTED_BY_HEAD 6
#define MICROLABEL_IMPORTED_BY 7
-static int getMaxTextLength(struct MenuPosInfo *pos, int font_nr)
+static int getMaxTextLength(struct TextPosInfo *pos, int font_nr)
{
int max_text_width = SXSIZE;
int font_width = getFontWidth(font_nr);
static void DrawPreviewLevelLabelExt(int mode)
{
- struct MenuPosInfo *pos = &menu.main.text.level_info_2;
+ struct TextPosInfo *pos = &menu.main.text.level_info_2;
char label_text[MAX_OUTPUT_LINESIZE + 1];
int max_len_label_text;
int font_nr = FONT_TEXT_2;
max_len_label_text = SXSIZE / getFontWidth(font_nr);
#endif
+#if 1
+ if (pos->chars != -1)
+ max_len_label_text = pos->chars;
+#endif
+
for (i = 0; i < max_len_label_text; i++)
label_text[i] = ' ';
label_text[max_len_label_text] = '\0';
if (leveldir_current->name)
{
- struct MenuPosInfo *pos = &menu.main.text.level_info_1;
+ struct TextPosInfo *pos = &menu.main.text.level_info_1;
char label_text[MAX_OUTPUT_LINESIZE + 1];
int font_nr = FONT_TEXT_1;
#if 1
int lxpos, lypos;
#endif
+#if 1
+ if (pos->chars != -1)
+ max_len_label_text = pos->chars;
+#endif
+
strncpy(label_text, leveldir_current->name, max_len_label_text);
label_text[max_len_label_text] = '\0';