+static void setRequestDoorTextProperties(char *text,
+ int text_spacing,
+ int line_spacing,
+ int *set_font_nr,
+ int *set_max_lines,
+ int *set_max_line_length)
+{
+ struct RectWithBorder *vp_door_1 = &viewport.door_1[game_status];
+ struct TextPosInfo *pos = &request.button.confirm;
+ int button_ypos = pos->y;
+ int font_nr = FONT_TEXT_2;
+ int font_width = getFontWidth(font_nr);
+ int font_height = getFontHeight(font_nr);
+ int line_height = font_height + line_spacing;
+ int max_text_width = vp_door_1->width;
+ int max_text_height = button_ypos - 2 * text_spacing;
+ int max_line_length = max_text_width / font_width;
+ int max_lines = max_text_height / line_height;
+
+ if (maxWordLengthInRequestString(text) > max_line_length)
+ {
+ font_nr = FONT_TEXT_1;
+ font_width = getFontWidth(font_nr);
+ max_line_length = max_text_width / font_width;
+ }
+
+ *set_font_nr = font_nr;
+ *set_max_lines = max_lines;
+ *set_max_line_length = max_line_length;
+}
+