BC_PopupMenu::BC_PopupMenu(int x, int y, int w, const char *text,
BC_PopupMenu::BC_PopupMenu(int x, int y, int w, const char *text,
- char truncated[BCTEXTLEN];
- truncate_text(truncated, text, available_w);
+ char *truncated = get_truncated_text(MEDIUMFONT, text, available_w);
set_font(MEDIUMFONT);
BC_WindowBase::draw_center_text(
dx + available_w/2 + margin + offset,
(int)((float)get_h()/2 + get_text_ascent(MEDIUMFONT)/2 - 2) + offset,
truncated);
set_font(MEDIUMFONT);
BC_WindowBase::draw_center_text(
dx + available_w/2 + margin + offset,
(int)((float)get_h()/2 + get_text_ascent(MEDIUMFONT)/2 - 2) + offset,
truncated);
- menu_popup->activate_menu(x+3, y+3, w, h, 0, 1);
+ menu_popup->activate_menu(x+xS(3), y+yS(3), w, h, 0, 1);