ui/widgets.cpp: Use a smooter, symmetrical highlight texture (MT09095).

This commit is contained in:
Vas Crabb 2025-01-23 05:00:31 +11:00
parent 866f1cb7b7
commit 21f5106955
2 changed files with 4 additions and 4 deletions

View File

@ -24,7 +24,7 @@ namespace ui {
//-------------------------------------------------
widgets_manager::widgets_manager(running_machine &machine)
: m_hilight_bitmap(std::make_unique<bitmap_argb32>(256, 1))
: m_hilight_bitmap(std::make_unique<bitmap_argb32>(512, 1))
, m_hilight_texture(nullptr, machine.render())
, m_hilight_main_bitmap(std::make_unique<bitmap_argb32>(1, 128))
, m_hilight_main_texture(nullptr, machine.render())
@ -33,9 +33,9 @@ widgets_manager::widgets_manager(running_machine &machine)
render_manager &render(machine.render());
// create a texture for hilighting items
for (unsigned x = 0; x < 256; ++x)
for (unsigned x = 0; x < 512; ++x)
{
unsigned const alpha((x < 25) ? (0xff * x / 25) : (x >(256 - 25)) ? (0xff * (255 - x) / 25) : 0xff);
unsigned const alpha((x < 50) ? ((x + 1) * 5) : (x > (511 - 50)) ? ((512 - x) * 5) : 0xff);
m_hilight_bitmap->pix(0, x) = rgb_t(alpha, 0xff, 0xff, 0xff);
}
m_hilight_texture.reset(render.texture_alloc());

View File

@ -7267,7 +7267,7 @@ static INPUT_PORTS_START( hginga )
PORT_DIPNAME( 0x20, 0x20, "Hanaroku Hopper" ) PORT_DIPLOCATION("SW3:6") // 花六ホッパー
PORT_DIPSETTING( 0x20, "Manual" ) // 手動
PORT_DIPSETTING( 0x00, "Automatic" ) // 自動
PORT_DIPNAME( 0xc0, 0xc0, "Gokou/Shikou Generation Interval" ) PORT_DIPLOCATION("SW3:7,8") // 五光、四光発生間
PORT_DIPNAME( 0xc0, 0xc0, "Gokou/Shikou Generation Interval" ) PORT_DIPLOCATION("SW3:7,8") // 五光、四光発生間
PORT_DIPSETTING( 0xc0, "Short" ) // せまい
PORT_DIPSETTING( 0x80, "A Little Short" ) // ややせまい
PORT_DIPSETTING( 0x40, "A Little Long" ) // ややひろい