mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +03:00
Proper placement of toolbar icons. (nw)
This commit is contained in:
parent
1c3a6595ff
commit
badb709503
@ -2274,9 +2274,9 @@ void menu::draw_toolbar(float x1, float y1, float x2, float y2, bool software)
|
|||||||
for (auto & e : t_bitmap)
|
for (auto & e : t_bitmap)
|
||||||
if (e->valid()) m_valid++;
|
if (e->valid()) m_valid++;
|
||||||
|
|
||||||
float space_x = (y2 - y1) * container->manager().ui_aspect();
|
float space_x = (y2 - y1) * container->manager().ui_aspect(container);
|
||||||
float total = (m_valid * space_x) + ((m_valid - 1) * 0.001f);
|
auto total = (float)(m_valid * space_x) + ((float)(m_valid - 1) * 0.001f);
|
||||||
x1 = ((x2 - x1) * 0.5f) - (total / 2);
|
x1 += (x2 - x1) * 0.5f - total * 0.5f;
|
||||||
x2 = x1 + space_x;
|
x2 = x1 + space_x;
|
||||||
|
|
||||||
for (int z = 0; z < UI_TOOLBAR_BUTTONS; ++z)
|
for (int z = 0; z < UI_TOOLBAR_BUTTONS; ++z)
|
||||||
|
Loading…
Reference in New Issue
Block a user