Add dividing line to bgfx slider list where applicable, nw

This commit is contained in:
therealmogminer@gmail.com 2016-04-10 13:13:10 +02:00
parent 5a1a3afc81
commit fa92550ddb
2 changed files with 11 additions and 8 deletions

View File

@ -158,7 +158,11 @@ void ui_menu_sliders::populate()
std::vector<slider_state *> osd_sliders = machine().osd().get_slider_list();
for (slider_state* slider : osd_sliders)
{
if (slider == nullptr)
{
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
continue;
}
INT32 curval = (*slider->update)(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
UINT32 flags = 0;
if (curval > slider->minval)

View File

@ -207,14 +207,13 @@ void chain_manager::load_chains()
void chain_manager::destroy_chains()
{
int index = 0;
for (bgfx_chain* chain : m_screen_chains)
for (size_t index = 0; index < m_screen_chains.size(); index++)
{
if (chain != nullptr)
if (m_screen_chains[index] != nullptr)
{
delete chain;
delete m_screen_chains[index];
m_screen_chains[index] = nullptr;
}
index++;
}
}
@ -445,9 +444,9 @@ std::vector<slider_state*> chain_manager::get_slider_list()
sliders.push_back(slider->core_slider());
}
if (sliders.size() > 0)
if (chain_sliders.size() > 0)
{
// TODO: Put dividing line
sliders.push_back(nullptr);
}
}