summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/dirmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/ui/dirmenu.cpp')
-rw-r--r--src/frontend/mame/ui/dirmenu.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/frontend/mame/ui/dirmenu.cpp b/src/frontend/mame/ui/dirmenu.cpp
index 5e377d4e474..040ecf9a826 100644
--- a/src/frontend/mame/ui/dirmenu.cpp
+++ b/src/frontend/mame/ui/dirmenu.cpp
@@ -71,7 +71,7 @@ static const folders_entry s_folders[] =
// ctor / dtor
//-------------------------------------------------
-menu_directory::menu_directory(mame_ui_manager &mui, render_container *container) : menu(mui, container)
+menu_directory::menu_directory(mame_ui_manager &mui, render_container &container) : menu(mui, container)
{
}
@@ -92,7 +92,7 @@ void menu_directory::handle()
const event *menu_event = process(0);
if (menu_event != nullptr && menu_event->itemref != nullptr && menu_event->iptkey == IPT_UI_SELECT)
- menu::stack_push<menu_display_actual>(ui(), container, selected);
+ menu::stack_push<menu_display_actual>(ui(), container(), selected);
}
//-------------------------------------------------
@@ -117,7 +117,7 @@ void menu_directory::custom_render(void *selectedref, float top, float bottom, f
float width;
// get the size of the text
- ui().draw_text_full(container, _("Folders Setup"), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
+ ui().draw_text_full(container(), _("Folders Setup"), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr);
width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
float maxwidth = MAX(width, origx2 - origx1);
@@ -129,7 +129,7 @@ void menu_directory::custom_render(void *selectedref, float top, float bottom, f
float y2 = origy1 - UI_BOX_TB_BORDER;
// draw a box
- ui().draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
+ ui().draw_outlined_box(container(), x1, y1, x2, y2, UI_GREEN_COLOR);
// take off the borders
x1 += UI_BOX_LR_BORDER;
@@ -137,7 +137,7 @@ void menu_directory::custom_render(void *selectedref, float top, float bottom, f
y1 += UI_BOX_TB_BORDER;
// draw the text within it
- ui().draw_text_full(container, _("Folders Setup"), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
+ ui().draw_text_full(container(), _("Folders Setup"), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
}
@@ -148,7 +148,7 @@ void menu_directory::custom_render(void *selectedref, float top, float bottom, f
// ctor / dtor
//-------------------------------------------------
-menu_display_actual::menu_display_actual(mame_ui_manager &mui, render_container *container, int ref)
+menu_display_actual::menu_display_actual(mame_ui_manager &mui, render_container &container, int ref)
: menu(mui, container), m_ref(ref)
{
}
@@ -169,11 +169,11 @@ void menu_display_actual::handle()
switch ((FPTR)menu_event->itemref)
{
case REMOVE:
- menu::stack_push<menu_remove_folder>(ui(), container, m_ref);
+ menu::stack_push<menu_remove_folder>(ui(), container(), m_ref);
break;
case ADD_CHANGE:
- menu::stack_push<menu_add_change_folder>(ui(), container, m_ref);
+ menu::stack_push<menu_add_change_folder>(ui(), container(), m_ref);
break;
}
}
@@ -216,13 +216,13 @@ void menu_display_actual::custom_render(void *selectedref, float top, float bott
for (auto & elem : m_folders)
{
- ui().draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::LEFT, ui::text_layout::TRUNCATE, mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr);
+ ui().draw_text_full(container(), elem.c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::LEFT, ui::text_layout::TRUNCATE, mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr);
width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
maxwidth = MAX(maxwidth, width);
}
// get the size of the text
- ui().draw_text_full(container, m_tempbuf.c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::TRUNCATE, mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr);
+ ui().draw_text_full(container(), m_tempbuf.c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::TRUNCATE, mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr);
width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
maxwidth = MAX(width, maxwidth);
@@ -233,7 +233,7 @@ void menu_display_actual::custom_render(void *selectedref, float top, float bott
float y2 = y1 + lineh + 2.0f * UI_BOX_TB_BORDER;
// draw a box
- ui().draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
+ ui().draw_outlined_box(container(), x1, y1, x2, y2, UI_GREEN_COLOR);
// take off the borders
x1 += UI_BOX_LR_BORDER;
@@ -241,7 +241,7 @@ void menu_display_actual::custom_render(void *selectedref, float top, float bott
y1 += UI_BOX_TB_BORDER;
// draw the text within it
- ui().draw_text_full(container, m_tempbuf.c_str(), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
+ ui().draw_text_full(container(), m_tempbuf.c_str(), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
// compute our bounds
@@ -251,7 +251,7 @@ void menu_display_actual::custom_render(void *selectedref, float top, float bott
y2 = origy1 - UI_BOX_TB_BORDER;
// draw a box
- ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
+ ui().draw_outlined_box(container(), x1, y1, x2, y2, UI_BACKGROUND_COLOR);
// take off the borders
x1 += UI_BOX_LR_BORDER;
@@ -261,7 +261,7 @@ void menu_display_actual::custom_render(void *selectedref, float top, float bott
// draw the text within it
for (auto & elem : m_folders)
{
- ui().draw_text_full(container, elem.c_str(), x1, y1, x2 - x1, ui::text_layout::LEFT, ui::text_layout::TRUNCATE,
+ ui().draw_text_full(container(), elem.c_str(), x1, y1, x2 - x1, ui::text_layout::LEFT, ui::text_layout::TRUNCATE,
mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
y1 += lineh;
}
@@ -275,7 +275,7 @@ MENU ADD FOLDER
// ctor / dtor
//-------------------------------------------------
-menu_add_change_folder::menu_add_change_folder(mame_ui_manager &mui, render_container *container, int ref) : menu(mui, container)
+menu_add_change_folder::menu_add_change_folder(mame_ui_manager &mui, render_container &container, int ref) : menu(mui, container)
{
m_ref = ref;
m_change = (s_folders[ref].action == CHANGE);
@@ -505,7 +505,7 @@ void menu_add_change_folder::custom_render(void *selectedref, float top, float b
// get the size of the text
for (auto & elem : tempbuf)
{
- ui().draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::NEVER,
+ ui().draw_text_full(container(), elem.c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::NEVER,
mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr);
width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
maxwidth = MAX(width, maxwidth);
@@ -518,7 +518,7 @@ void menu_add_change_folder::custom_render(void *selectedref, float top, float b
float y2 = origy1 - UI_BOX_TB_BORDER;
// draw a box
- ui().draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
+ ui().draw_outlined_box(container(), x1, y1, x2, y2, UI_GREEN_COLOR);
// take off the borders
x1 += UI_BOX_LR_BORDER;
@@ -528,7 +528,7 @@ void menu_add_change_folder::custom_render(void *selectedref, float top, float b
// draw the text within it
for (auto & elem : tempbuf)
{
- ui().draw_text_full(container, elem.c_str(), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::NEVER,
+ ui().draw_text_full(container(), elem.c_str(), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::NEVER,
mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
y1 = y1 + ui().get_line_height();
}
@@ -536,7 +536,7 @@ void menu_add_change_folder::custom_render(void *selectedref, float top, float b
// bottom text
tempbuf[0] = _("Press TAB to set");
- ui().draw_text_full(container, tempbuf[0].c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
+ ui().draw_text_full(container(), tempbuf[0].c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr);
width += 2 * UI_BOX_LR_BORDER;
maxwidth = MAX(maxwidth, width);
@@ -548,7 +548,7 @@ void menu_add_change_folder::custom_render(void *selectedref, float top, float b
y2 = origy2 + bottom;
// draw a box
- ui().draw_outlined_box(container, x1, y1, x2, y2, UI_RED_COLOR);
+ ui().draw_outlined_box(container(), x1, y1, x2, y2, UI_RED_COLOR);
// take off the borders
x1 += UI_BOX_LR_BORDER;
@@ -556,7 +556,7 @@ void menu_add_change_folder::custom_render(void *selectedref, float top, float b
y1 += UI_BOX_TB_BORDER;
// draw the text within it
- ui().draw_text_full(container, tempbuf[0].c_str(), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
+ ui().draw_text_full(container(), tempbuf[0].c_str(), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
}
@@ -568,7 +568,7 @@ void menu_add_change_folder::custom_render(void *selectedref, float top, float b
// ctor / dtor
//-------------------------------------------------
-menu_remove_folder::menu_remove_folder(mame_ui_manager &mui, render_container *container, int ref) : menu(mui, container)
+menu_remove_folder::menu_remove_folder(mame_ui_manager &mui, render_container &container, int ref) : menu(mui, container)
{
m_ref = ref;
if (mui.options().exists(s_folders[m_ref].option))
@@ -642,7 +642,7 @@ void menu_remove_folder::custom_render(void *selectedref, float top, float botto
std::string tempbuf = string_format(_("Remove %1$s Folder"), _(s_folders[m_ref].name));
// get the size of the text
- ui().draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::NEVER, mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr);
+ ui().draw_text_full(container(), tempbuf.c_str(), 0.0f, 0.0f, 1.0f, ui::text_layout::CENTER, ui::text_layout::NEVER, mame_ui_manager::NONE, rgb_t::white, rgb_t::black, &width, nullptr);
width += (2.0f * UI_BOX_LR_BORDER) + 0.01f;
float maxwidth = MAX(width, origx2 - origx1);
@@ -653,7 +653,7 @@ void menu_remove_folder::custom_render(void *selectedref, float top, float botto
float y2 = origy1 - UI_BOX_TB_BORDER;
// draw a box
- ui().draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR);
+ ui().draw_outlined_box(container(), x1, y1, x2, y2, UI_GREEN_COLOR);
// take off the borders
x1 += UI_BOX_LR_BORDER;
@@ -661,7 +661,7 @@ void menu_remove_folder::custom_render(void *selectedref, float top, float botto
y1 += UI_BOX_TB_BORDER;
// draw the text within it
- ui().draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::NEVER, mame_ui_manager::NORMAL,
+ ui().draw_text_full(container(), tempbuf.c_str(), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::NEVER, mame_ui_manager::NORMAL,
UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
}