summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/sliders.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-04-27 08:13:59 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-04-27 08:13:59 +0200
commitcfee536f22f032c7ead65075f73cc6fd8549e68b (patch)
treef4b4703dd0295571684456c19668f508b3ddcb3a /src/frontend/mame/ui/sliders.cpp
parentbe8159d01eaa7533e7758bf07384501dbc6214f3 (diff)
Cleanups and version bumpmame0173
Diffstat (limited to 'src/frontend/mame/ui/sliders.cpp')
-rw-r--r--src/frontend/mame/ui/sliders.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/frontend/mame/ui/sliders.cpp b/src/frontend/mame/ui/sliders.cpp
index 75d40c2ace3..72fe2398745 100644
--- a/src/frontend/mame/ui/sliders.cpp
+++ b/src/frontend/mame/ui/sliders.cpp
@@ -142,21 +142,21 @@ void ui_menu_sliders::populate()
std::vector<ui_menu_item> ui_sliders = mame_machine_manager::instance()->ui().get_slider_list();
for (ui_menu_item item : ui_sliders)
{
- if (item.type == ui_menu_item_type::SLIDER)
- {
- slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
- INT32 curval = (*slider->update)(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
- UINT32 flags = 0;
- if (curval > slider->minval)
- flags |= MENU_FLAG_LEFT_ARROW;
- if (curval < slider->maxval)
- flags |= MENU_FLAG_RIGHT_ARROW;
- item_append(slider->description, tempstring.c_str(), flags, (void *)slider, ui_menu_item_type::SLIDER);
- }
- else
- {
- item_append(item);
- }
+ if (item.type == ui_menu_item_type::SLIDER)
+ {
+ slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
+ INT32 curval = (*slider->update)(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
+ UINT32 flags = 0;
+ if (curval > slider->minval)
+ flags |= MENU_FLAG_LEFT_ARROW;
+ if (curval < slider->maxval)
+ flags |= MENU_FLAG_RIGHT_ARROW;
+ item_append(slider->description, tempstring.c_str(), flags, (void *)slider, ui_menu_item_type::SLIDER);
+ }
+ else
+ {
+ item_append(item);
+ }
}
item_append(ui_menu_item_type::SEPARATOR);
@@ -165,21 +165,21 @@ void ui_menu_sliders::populate()
std::vector<ui_menu_item> osd_sliders = machine().osd().get_slider_list();
for (ui_menu_item item : osd_sliders)
{
- if (item.type == ui_menu_item_type::SLIDER)
- {
- slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
- INT32 curval = (*slider->update)(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
- UINT32 flags = 0;
- if (curval > slider->minval)
- flags |= MENU_FLAG_LEFT_ARROW;
- if (curval < slider->maxval)
- flags |= MENU_FLAG_RIGHT_ARROW;
- item_append(slider->description, tempstring.c_str(), flags, (void *)slider, ui_menu_item_type::SLIDER);
- }
- else
- {
- item_append(item);
- }
+ if (item.type == ui_menu_item_type::SLIDER)
+ {
+ slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
+ INT32 curval = (*slider->update)(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
+ UINT32 flags = 0;
+ if (curval > slider->minval)
+ flags |= MENU_FLAG_LEFT_ARROW;
+ if (curval < slider->maxval)
+ flags |= MENU_FLAG_RIGHT_ARROW;
+ item_append(slider->description, tempstring.c_str(), flags, (void *)slider, ui_menu_item_type::SLIDER);
+ }
+ else
+ {
+ item_append(item);
+ }
}
custombottom = 2.0f * mame_machine_manager::instance()->ui().get_line_height() + 2.0f * UI_BOX_TB_BORDER;