- set_color(get_resources()->popup_title_text);
- int offset = 0;
- if(status == BUTTON_DN)
- offset = 1;
- if(!icon)
- {
- set_font(MEDIUMFONT);
- char truncated[BCTEXTLEN];
- int available_w = get_w() - margin * 2 - resources->popupmenu_triangle_margin;
- truncate_text(truncated, text, available_w);
+ if( color < 0 ) color = get_resources()->popup_title_text;
+ set_color(color);
+
+ int offset = status == BUTTON_DN ? 1 : 0;
+ int available_w = get_w() - calculate_w(margin, 0, use_title);