mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
ui: Fixed image sizing in right panel to vertical orientation. (nw)
This commit is contained in:
parent
f07d5bf4bd
commit
1174225fcb
@ -180,14 +180,13 @@ void ui_menu_dats_view::custom_render(void *selectedref, float top, float bottom
|
||||
x1 += space;
|
||||
rgb_t fcolor = (m_actual == x) ? rgb_t(0xff, 0xff, 0xff, 0x00) : UI_TEXT_COLOR;
|
||||
rgb_t bcolor = (m_actual == x) ? rgb_t(0xff, 0xff, 0xff, 0xff) : UI_TEXT_BG_COLOR;
|
||||
mui.draw_text_full(container, elem.label.c_str(), x1, y1, 1.0f, JUSTIFY_LEFT, WRAP_NEVER,
|
||||
DRAW_NONE, fcolor, bcolor, &width, nullptr);
|
||||
mui.draw_text_full(container, elem.label.c_str(), x1, y1, 1.0f, JUSTIFY_LEFT, WRAP_NEVER, DRAW_NONE, fcolor, bcolor, &width, nullptr);
|
||||
|
||||
if (bcolor != UI_TEXT_BG_COLOR)
|
||||
mui.draw_textured_box(container, x1 - (space / 2), y1, x1 + width + (space / 2), y2, bcolor, rgb_t(255, 43, 43, 43),
|
||||
hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
|
||||
|
||||
mui.draw_text_full(container, elem.label.c_str(), x1, y1, 1.0f, JUSTIFY_LEFT, WRAP_NEVER,
|
||||
DRAW_NORMAL, fcolor, bcolor, &width, nullptr);
|
||||
mui.draw_text_full(container, elem.label.c_str(), x1, y1, 1.0f, JUSTIFY_LEFT, WRAP_NEVER, DRAW_NORMAL, fcolor, bcolor, &width, nullptr);
|
||||
x1 += width + space;
|
||||
++x;
|
||||
}
|
||||
@ -195,8 +194,7 @@ void ui_menu_dats_view::custom_render(void *selectedref, float top, float bottom
|
||||
// bottom
|
||||
std::string revision;
|
||||
revision.assign(_("Revision: ")).append(m_items_list[m_actual].revision);
|
||||
mui.draw_text_full(container, revision.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
|
||||
DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
|
||||
mui.draw_text_full(container, revision.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
|
||||
width += 2 * UI_BOX_LR_BORDER;
|
||||
maxwidth = MAX(origx2 - origx1, width);
|
||||
|
||||
|
@ -2287,6 +2287,11 @@ void ui_menu::arts_render_images(bitmap_argb32 *tmp_bitmap, float origx1, float
|
||||
float panel_height = origy2 - origy1 - 0.02f - (2.0f * UI_BOX_TB_BORDER) - (2.0f * line_height);
|
||||
int screen_width = machine().render().ui_target().width();
|
||||
int screen_height = machine().render().ui_target().height();
|
||||
|
||||
int rot = machine().render().ui_target().orientation();
|
||||
if (rot == ROT90 || rot == ROT270)
|
||||
std::swap(screen_height, screen_width);
|
||||
|
||||
int panel_width_pixel = panel_width * screen_width;
|
||||
int panel_height_pixel = panel_height * screen_height;
|
||||
float ratio = 0.0f;
|
||||
|
Loading…
Reference in New Issue
Block a user