src/mess/filemngr.c
| r3033 | r3034 | |
| 124 | 124 | |
| 125 | 125 | static void extra_text_draw_box(float origx1, float origx2, float origy, float yspan, const char *text, int direction) |
| 126 | 126 | { |
| 127 | | float width, maxwidth, height; |
| 127 | float text_width, text_height; |
| 128 | float width, maxwidth; |
| 128 | 129 | float x1, y1, x2, y2, temp; |
| 129 | 130 | |
| 130 | 131 | /* get the size of the text */ |
| 131 | | ui_draw_text_full(text, 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, |
| 132 | | DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, &height); |
| 133 | | width += 2 * UI_BOX_LR_BORDER; |
| 132 | ui_draw_text_full(text, 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_WORD, |
| 133 | DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &text_width, &text_height); |
| 134 | width = text_width + (2 * UI_BOX_LR_BORDER); |
| 134 | 135 | maxwidth = MAX(width, origx2 - origx1); |
| 135 | 136 | |
| 136 | 137 | /* compute our bounds */ |
| r3033 | r3034 | |
| 156 | 157 | y2 -= UI_BOX_TB_BORDER; |
| 157 | 158 | |
| 158 | 159 | /* draw the text within it */ |
| 159 | | ui_draw_text_full(text, x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, |
| 160 | ui_draw_text_full(text, x1, y1, text_width, JUSTIFY_LEFT, WRAP_WORD, |
| 160 | 161 | DRAW_NORMAL, ARGB_WHITE, ARGB_BLACK, NULL, NULL); |
| 161 | 162 | } |
| 162 | 163 | |