mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
Changing maximum width specified in mame_ui_manager::draw_text_box() to allow for the border
This commit is contained in:
parent
bfe2cc4213
commit
1e99aca3c3
@ -584,8 +584,11 @@ void mame_ui_manager::draw_text_full(render_container *container, const char *or
|
||||
|
||||
void mame_ui_manager::draw_text_box(render_container *container, const char *text, ui::text_layout::text_justify justify, float xpos, float ypos, rgb_t backcolor)
|
||||
{
|
||||
// cap the maximum width
|
||||
float maximum_width = 1.0f - UI_BOX_LR_BORDER * 2;
|
||||
|
||||
// create a layout
|
||||
ui::text_layout layout = create_layout(container, 1.0f, justify);
|
||||
ui::text_layout layout = create_layout(container, maximum_width, justify);
|
||||
|
||||
// add text to it
|
||||
layout.add_text(text);
|
||||
|
Loading…
Reference in New Issue
Block a user