clear the rest of mewui mentioning (nw)
This commit is contained in:
parent
024d67c14f
commit
a95c4619c6
@ -370,8 +370,6 @@ enum ioport_type
|
||||
IPT_UI_LOAD_STATE,
|
||||
IPT_UI_TAPE_START,
|
||||
IPT_UI_TAPE_STOP,
|
||||
|
||||
// additional MEWUI options
|
||||
IPT_UI_HISTORY,
|
||||
IPT_UI_MAMEINFO,
|
||||
IPT_UI_COMMAND,
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "ui/auditmenu.h"
|
||||
#include <algorithm>
|
||||
|
||||
extern const char MEWUI_VERSION_TAG[];
|
||||
extern const char UI_VERSION_TAG[];
|
||||
|
||||
//-------------------------------------------------
|
||||
// sort
|
||||
@ -173,11 +173,11 @@ void ui_menu_audit::populate()
|
||||
void ui_menu_audit::save_available_machines()
|
||||
{
|
||||
// attempt to open the output file
|
||||
emu_file file(machine().options().mewui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
||||
emu_file file(machine().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
||||
if (file.open(emulator_info::get_configname(), "_avail.ini") == FILERR_NONE)
|
||||
{
|
||||
// generate header
|
||||
std::string buffer = std::string("#\n").append(MEWUI_VERSION_TAG).append(bare_build_version).append("\n#\n\n");
|
||||
std::string buffer = std::string("#\n").append(UI_VERSION_TAG).append(bare_build_version).append("\n#\n\n");
|
||||
strcatprintf(buffer, "%d\n", (int)m_availablesorted.size());
|
||||
strcatprintf(buffer, "%d\n", (int)m_unavailablesorted.size());
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
ui/cmdrender.h
|
||||
|
||||
MEWUI rendfont.
|
||||
UI rendfont.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
@ -272,7 +272,7 @@ void ui_menu_custom_filter::custom_render(void *selectedref, float top, float bo
|
||||
void ui_menu_custom_filter::save_custom_filters()
|
||||
{
|
||||
// attempt to open the output file
|
||||
emu_file file(machine().options().mewui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
||||
emu_file file(machine().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
||||
if (file.open("custom_", emulator_info::get_configname(), "_filter.ini") == FILERR_NONE)
|
||||
{
|
||||
// generate custom filters info
|
||||
@ -338,7 +338,7 @@ void ui_menu_swcustom_filter::handle()
|
||||
if (m_event->iptkey == IPT_UI_SELECT)
|
||||
{
|
||||
sw_custfltr::numother++;
|
||||
sw_custfltr::other[sw_custfltr::numother] = MEWUI_SW_UNAVAILABLE + 1;
|
||||
sw_custfltr::other[sw_custfltr::numother] = UI_SW_UNAVAILABLE + 1;
|
||||
m_added = true;
|
||||
}
|
||||
break;
|
||||
@ -346,7 +346,7 @@ void ui_menu_swcustom_filter::handle()
|
||||
case REMOVE_FILTER:
|
||||
if (m_event->iptkey == IPT_UI_SELECT)
|
||||
{
|
||||
sw_custfltr::other[sw_custfltr::numother] = MEWUI_SW_UNAVAILABLE + 1;
|
||||
sw_custfltr::other[sw_custfltr::numother] = UI_SW_UNAVAILABLE + 1;
|
||||
sw_custfltr::numother--;
|
||||
changed = true;
|
||||
}
|
||||
@ -356,12 +356,12 @@ void ui_menu_swcustom_filter::handle()
|
||||
if ((FPTR)m_event->itemref >= OTHER_FILTER && (FPTR)m_event->itemref < OTHER_FILTER + MAX_CUST_FILTER)
|
||||
{
|
||||
int pos = (int)((FPTR)m_event->itemref - OTHER_FILTER);
|
||||
if (m_event->iptkey == IPT_UI_LEFT && sw_custfltr::other[pos] > MEWUI_SW_UNAVAILABLE + 1)
|
||||
if (m_event->iptkey == IPT_UI_LEFT && sw_custfltr::other[pos] > UI_SW_UNAVAILABLE + 1)
|
||||
{
|
||||
sw_custfltr::other[pos]--;
|
||||
changed = true;
|
||||
}
|
||||
else if (m_event->iptkey == IPT_UI_RIGHT && sw_custfltr::other[pos] < MEWUI_SW_LAST - 1)
|
||||
else if (m_event->iptkey == IPT_UI_RIGHT && sw_custfltr::other[pos] < UI_SW_LAST - 1)
|
||||
{
|
||||
sw_custfltr::other[pos]++;
|
||||
changed = true;
|
||||
@ -371,7 +371,7 @@ void ui_menu_swcustom_filter::handle()
|
||||
size_t total = sw_filters::length;
|
||||
std::vector<std::string> s_sel(total);
|
||||
for (size_t index = 0; index < total; ++index)
|
||||
if (index <= MEWUI_SW_UNAVAILABLE|| index == MEWUI_SW_CUSTOM)
|
||||
if (index <= UI_SW_UNAVAILABLE|| index == UI_SW_CUSTOM)
|
||||
s_sel[index] = "_skip_";
|
||||
else
|
||||
s_sel[index] = sw_filters::text[index];
|
||||
@ -473,7 +473,7 @@ void ui_menu_swcustom_filter::handle()
|
||||
void ui_menu_swcustom_filter::populate()
|
||||
{
|
||||
// add main filter
|
||||
UINT32 arrow_flags = get_arrow_flags((int)MEWUI_SW_ALL, (int)MEWUI_SW_UNAVAILABLE, sw_custfltr::main);
|
||||
UINT32 arrow_flags = get_arrow_flags((int)UI_SW_ALL, (int)UI_SW_UNAVAILABLE, sw_custfltr::main);
|
||||
item_append("Main filter", sw_filters::text[sw_custfltr::main], arrow_flags, (void *)(FPTR)MAIN_FILTER);
|
||||
|
||||
// add other filters
|
||||
@ -482,14 +482,14 @@ void ui_menu_swcustom_filter::populate()
|
||||
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
|
||||
|
||||
// add filter items
|
||||
arrow_flags = get_arrow_flags((int)MEWUI_SW_UNAVAILABLE + 1, (int)MEWUI_SW_LAST - 1, sw_custfltr::other[x]);
|
||||
arrow_flags = get_arrow_flags((int)UI_SW_UNAVAILABLE + 1, (int)UI_SW_LAST - 1, sw_custfltr::other[x]);
|
||||
item_append("Other filter", sw_filters::text[sw_custfltr::other[x]], arrow_flags, (void *)(FPTR)(OTHER_FILTER + x));
|
||||
|
||||
if (m_added)
|
||||
selected = item.size() - 2;
|
||||
|
||||
// add publisher subitem
|
||||
if (sw_custfltr::other[x] == MEWUI_SW_PUBLISHERS && m_filter.publisher.ui.size() > 0)
|
||||
if (sw_custfltr::other[x] == UI_SW_PUBLISHERS && m_filter.publisher.ui.size() > 0)
|
||||
{
|
||||
arrow_flags = get_arrow_flags(0, m_filter.publisher.ui.size() - 1, sw_custfltr::mnfct[x]);
|
||||
std::string fbuff("^!Publisher");
|
||||
@ -498,7 +498,7 @@ void ui_menu_swcustom_filter::populate()
|
||||
}
|
||||
|
||||
// add year subitem
|
||||
else if (sw_custfltr::other[x] == MEWUI_SW_YEARS && m_filter.year.ui.size() > 0)
|
||||
else if (sw_custfltr::other[x] == UI_SW_YEARS && m_filter.year.ui.size() > 0)
|
||||
{
|
||||
arrow_flags = get_arrow_flags(0, m_filter.year.ui.size() - 1, sw_custfltr::year[x]);
|
||||
std::string fbuff("^!Year");
|
||||
@ -507,7 +507,7 @@ void ui_menu_swcustom_filter::populate()
|
||||
}
|
||||
|
||||
// add year subitem
|
||||
else if (sw_custfltr::other[x] == MEWUI_SW_LIST && m_filter.swlist.name.size() > 0)
|
||||
else if (sw_custfltr::other[x] == UI_SW_LIST && m_filter.swlist.name.size() > 0)
|
||||
{
|
||||
arrow_flags = get_arrow_flags(0, m_filter.swlist.name.size() - 1, sw_custfltr::list[x]);
|
||||
std::string fbuff("^!Software List");
|
||||
@ -516,7 +516,7 @@ void ui_menu_swcustom_filter::populate()
|
||||
}
|
||||
|
||||
// add device type subitem
|
||||
else if (sw_custfltr::other[x] == MEWUI_SW_TYPE && m_filter.type.ui.size() > 0)
|
||||
else if (sw_custfltr::other[x] == UI_SW_TYPE && m_filter.type.ui.size() > 0)
|
||||
{
|
||||
arrow_flags = get_arrow_flags(0, m_filter.type.ui.size() - 1, sw_custfltr::type[x]);
|
||||
std::string fbuff("^!Device type");
|
||||
@ -525,7 +525,7 @@ void ui_menu_swcustom_filter::populate()
|
||||
}
|
||||
|
||||
// add region subitem
|
||||
else if (sw_custfltr::other[x] == MEWUI_SW_REGION && m_filter.region.ui.size() > 0)
|
||||
else if (sw_custfltr::other[x] == UI_SW_REGION && m_filter.region.ui.size() > 0)
|
||||
{
|
||||
arrow_flags = get_arrow_flags(0, m_filter.region.ui.size() - 1, sw_custfltr::region[x]);
|
||||
std::string fbuff("^!Region");
|
||||
@ -587,7 +587,7 @@ void ui_menu_swcustom_filter::custom_render(void *selectedref, float top, float
|
||||
void ui_menu_swcustom_filter::save_sw_custom_filters()
|
||||
{
|
||||
// attempt to open the output file
|
||||
emu_file file(machine().options().mewui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
||||
emu_file file(machine().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
||||
if (file.open("custom_", m_driver->name, "_filter.ini") == FILERR_NONE)
|
||||
{
|
||||
// generate custom filters info
|
||||
@ -598,15 +598,15 @@ void ui_menu_swcustom_filter::save_sw_custom_filters()
|
||||
for (int x = 1; x <= sw_custfltr::numother; x++)
|
||||
{
|
||||
cinfo.append("Other filter = ").append(sw_filters::text[sw_custfltr::other[x]]).append("\n");
|
||||
if (sw_custfltr::other[x] == MEWUI_SW_PUBLISHERS)
|
||||
if (sw_custfltr::other[x] == UI_SW_PUBLISHERS)
|
||||
cinfo.append(" Manufacturer filter = ").append(m_filter.publisher.ui[sw_custfltr::mnfct[x]]).append("\n");
|
||||
else if (sw_custfltr::other[x] == MEWUI_SW_LIST)
|
||||
else if (sw_custfltr::other[x] == UI_SW_LIST)
|
||||
cinfo.append(" Software List filter = ").append(m_filter.swlist.name[sw_custfltr::list[x]]).append("\n");
|
||||
else if (sw_custfltr::other[x] == MEWUI_SW_YEARS)
|
||||
else if (sw_custfltr::other[x] == UI_SW_YEARS)
|
||||
cinfo.append(" Year filter = ").append(m_filter.year.ui[sw_custfltr::year[x]]).append("\n");
|
||||
else if (sw_custfltr::other[x] == MEWUI_SW_TYPE)
|
||||
else if (sw_custfltr::other[x] == UI_SW_TYPE)
|
||||
cinfo.append(" Type filter = ").append(m_filter.type.ui[sw_custfltr::type[x]]).append("\n");
|
||||
else if (sw_custfltr::other[x] == MEWUI_SW_REGION)
|
||||
else if (sw_custfltr::other[x] == UI_SW_REGION)
|
||||
cinfo.append(" Region filter = ").append(m_filter.region.ui[sw_custfltr::region[x]]).append("\n");
|
||||
}
|
||||
file.puts(cinfo.c_str());
|
||||
|
@ -1016,7 +1016,7 @@ ui_menu_palette_sel::~ui_menu_palette_sel()
|
||||
void ui_menu_palette_sel::handle()
|
||||
{
|
||||
// process the menu
|
||||
const ui_menu_event *m_event = process(MENU_FLAG_MEWUI_PALETTE);
|
||||
const ui_menu_event *m_event = process(MENU_FLAG_UI_PALETTE);
|
||||
if (m_event != nullptr && m_event->itemref != nullptr)
|
||||
{
|
||||
if (m_event->iptkey == IPT_UI_SELECT)
|
||||
@ -1035,7 +1035,7 @@ void ui_menu_palette_sel::handle()
|
||||
void ui_menu_palette_sel::populate()
|
||||
{
|
||||
for (int x = 0; x < ARRAY_LENGTH(m_palette); ++x)
|
||||
item_append(m_palette[x].name, m_palette[x].argb, MENU_FLAG_MEWUI_PALETTE, (void *)(FPTR)(x + 1));
|
||||
item_append(m_palette[x].name, m_palette[x].argb, MENU_FLAG_UI_PALETTE, (void *)(FPTR)(x + 1));
|
||||
|
||||
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
ui/datfile.cpp
|
||||
|
||||
MEWUI DATs manager.
|
||||
UI DATs manager.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -215,29 +215,29 @@ void datfile_manager::load_data_info(const game_driver *drv, std::string &buffer
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case MEWUI_HISTORY_LOAD:
|
||||
case UI_HISTORY_LOAD:
|
||||
filename = "history.dat";
|
||||
tag = TAG_BIO;
|
||||
index_idx = m_histidx;
|
||||
break;
|
||||
case MEWUI_MAMEINFO_LOAD:
|
||||
case UI_MAMEINFO_LOAD:
|
||||
filename = "mameinfo.dat";
|
||||
tag = TAG_MAME;
|
||||
index_idx = m_mameidx;
|
||||
driver_idx = m_drvidx;
|
||||
break;
|
||||
case MEWUI_SYSINFO_LOAD:
|
||||
case UI_SYSINFO_LOAD:
|
||||
filename = "sysinfo.dat";
|
||||
tag = TAG_BIO;
|
||||
index_idx = m_sysidx;
|
||||
break;
|
||||
case MEWUI_MESSINFO_LOAD:
|
||||
case UI_MESSINFO_LOAD:
|
||||
filename = "messinfo.dat";
|
||||
tag = TAG_MAME;
|
||||
index_idx = m_messidx;
|
||||
driver_idx = m_messdrvidx;
|
||||
break;
|
||||
case MEWUI_STORY_LOAD:
|
||||
case UI_STORY_LOAD:
|
||||
filename = "story.dat";
|
||||
tag = TAG_STORY;
|
||||
index_idx = m_storyidx;
|
||||
@ -253,7 +253,7 @@ void datfile_manager::load_data_info(const game_driver *drv, std::string &buffer
|
||||
load_driver_text(drv, buffer, driver_idx, TAG_DRIVER);
|
||||
|
||||
// cleanup mameinfo and sysinfo double line spacing
|
||||
if (tag == TAG_MAME || type == MEWUI_SYSINFO_LOAD)
|
||||
if (tag == TAG_MAME || type == UI_SYSINFO_LOAD)
|
||||
strreplace(buffer, "\n\n", "\n");
|
||||
|
||||
parseclose();
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
ui/datfile.h
|
||||
|
||||
MEWUI DATs manager.
|
||||
UI DATs manager.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
@ -161,10 +161,10 @@ void ui_menu_command_content::populate()
|
||||
std::string first_part(tempbuf.substr(0, first_dspace));
|
||||
std::string last_part(tempbuf.substr(first_dspace));
|
||||
strtrimspace(last_part);
|
||||
item_append(first_part.c_str(), last_part.c_str(), MENU_FLAG_MEWUI_HISTORY, nullptr);
|
||||
item_append(first_part.c_str(), last_part.c_str(), MENU_FLAG_UI_HISTORY, nullptr);
|
||||
}
|
||||
else
|
||||
item_append(tempbuf.c_str(), nullptr, MENU_FLAG_MEWUI_HISTORY, nullptr);
|
||||
item_append(tempbuf.c_str(), nullptr, MENU_FLAG_UI_HISTORY, nullptr);
|
||||
}
|
||||
item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
|
||||
}
|
||||
@ -302,7 +302,7 @@ void ui_menu_history_sw::populate()
|
||||
for (int r = 0; r < total_lines; r++)
|
||||
{
|
||||
std::string tempbuf(buffer.substr(xstart[r], xend[r] - xstart[r]));
|
||||
item_append(tempbuf.c_str(), nullptr, MENU_FLAG_MEWUI_HISTORY, nullptr);
|
||||
item_append(tempbuf.c_str(), nullptr, MENU_FLAG_UI_HISTORY, nullptr);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -410,28 +410,28 @@ void ui_menu_dats::populate()
|
||||
machine().pause();
|
||||
switch (m_flags)
|
||||
{
|
||||
case MEWUI_HISTORY_LOAD:
|
||||
case UI_HISTORY_LOAD:
|
||||
if (!get_data(m_driver, m_flags))
|
||||
item_append("No available History for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr);
|
||||
break;
|
||||
|
||||
case MEWUI_MAMEINFO_LOAD:
|
||||
case UI_MAMEINFO_LOAD:
|
||||
if (!get_data(m_driver, m_flags))
|
||||
item_append("No available MameInfo for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr);
|
||||
break;
|
||||
|
||||
case MEWUI_MESSINFO_LOAD:
|
||||
case UI_MESSINFO_LOAD:
|
||||
if (!get_data(m_driver, m_flags))
|
||||
item_append("No available MessInfo for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr);
|
||||
break;
|
||||
|
||||
case MEWUI_STORY_LOAD:
|
||||
if (!get_data(m_driver, MEWUI_STORY_LOAD))
|
||||
case UI_STORY_LOAD:
|
||||
if (!get_data(m_driver, UI_STORY_LOAD))
|
||||
item_append("No available Mamescore for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr);
|
||||
break;
|
||||
|
||||
case MEWUI_SYSINFO_LOAD:
|
||||
if (!get_data(m_driver, MEWUI_SYSINFO_LOAD))
|
||||
case UI_SYSINFO_LOAD:
|
||||
if (!get_data(m_driver, UI_SYSINFO_LOAD))
|
||||
item_append("No available Sysinfo for this machine.", nullptr, MENU_FLAG_DISABLE, nullptr);
|
||||
break;
|
||||
}
|
||||
@ -454,27 +454,27 @@ void ui_menu_dats::custom_render(void *selectedref, float top, float bottom, flo
|
||||
|
||||
switch (m_flags)
|
||||
{
|
||||
case MEWUI_HISTORY_LOAD:
|
||||
case UI_HISTORY_LOAD:
|
||||
tempbuf.assign("History - Game / System: ").append(m_driver->description);
|
||||
revision.assign("History.dat Revision: ").append(datfile.rev_history());
|
||||
break;
|
||||
|
||||
case MEWUI_MESSINFO_LOAD:
|
||||
case UI_MESSINFO_LOAD:
|
||||
tempbuf.assign("MessInfo - System: ").append(m_driver->description);
|
||||
revision.assign("Messinfo.dat Revision: ").append(datfile.rev_messinfo());
|
||||
break;
|
||||
|
||||
case MEWUI_MAMEINFO_LOAD:
|
||||
case UI_MAMEINFO_LOAD:
|
||||
tempbuf.assign("MameInfo - Game: ").append(m_driver->description);
|
||||
revision.assign("Mameinfo.dat Revision: ").append(datfile.rev_mameinfo());
|
||||
break;
|
||||
|
||||
case MEWUI_SYSINFO_LOAD:
|
||||
case UI_SYSINFO_LOAD:
|
||||
tempbuf.assign("Sysinfo - System: ").append(m_driver->description);
|
||||
revision.assign("Sysinfo.dat Revision: ").append(datfile.rev_sysinfo());
|
||||
break;
|
||||
|
||||
case MEWUI_STORY_LOAD:
|
||||
case UI_STORY_LOAD:
|
||||
tempbuf.assign("MAMESCORE - Game: ").append(m_driver->description);
|
||||
revision.assign("Story.dat Revision: ").append(machine().datfile().rev_storyinfo());
|
||||
break;
|
||||
@ -552,7 +552,7 @@ bool ui_menu_dats::get_data(const game_driver *driver, int flags)
|
||||
{
|
||||
std::string tempbuf(buffer.substr(xstart[r], xend[r] - xstart[r]));
|
||||
// special case for mamescore
|
||||
if (flags == MEWUI_STORY_LOAD)
|
||||
if (flags == UI_STORY_LOAD)
|
||||
{
|
||||
size_t last_underscore = tempbuf.find_last_of('_');
|
||||
if (last_underscore != std::string::npos)
|
||||
@ -560,11 +560,11 @@ bool ui_menu_dats::get_data(const game_driver *driver, int flags)
|
||||
std::string last_part(tempbuf.substr(last_underscore + 1));
|
||||
int primary = tempbuf.find("___");
|
||||
std::string first_part(tempbuf.substr(0, primary));
|
||||
item_append(first_part.c_str(), last_part.c_str(), MENU_FLAG_MEWUI_HISTORY, nullptr);
|
||||
item_append(first_part.c_str(), last_part.c_str(), MENU_FLAG_UI_HISTORY, nullptr);
|
||||
}
|
||||
}
|
||||
else
|
||||
item_append(tempbuf.c_str(), nullptr, MENU_FLAG_MEWUI_HISTORY, nullptr);
|
||||
item_append(tempbuf.c_str(), nullptr, MENU_FLAG_UI_HISTORY, nullptr);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ struct folders_entry
|
||||
static const folders_entry s_folders_entry[] =
|
||||
{
|
||||
{ "ROMs", OPTION_MEDIAPATH },
|
||||
{ "MEWUI", OPTION_MEWUI_PATH },
|
||||
{ "UI", OPTION_UI_PATH },
|
||||
{ "Samples", OPTION_SAMPLEPATH },
|
||||
{ "DATs", OPTION_HISTORY_PATH },
|
||||
{ "INIs", OPTION_INIPATH },
|
||||
@ -342,7 +342,7 @@ void ui_menu_directory::handle()
|
||||
if (m_event != nullptr && m_event->itemref != nullptr && m_event->iptkey == IPT_UI_SELECT)
|
||||
{
|
||||
int ref = (FPTR)m_event->itemref;
|
||||
bool change = (ref == HISTORY_FOLDERS || ref == EXTRAINI_FOLDERS || ref == MEWUI_FOLDERS);
|
||||
bool change = (ref == HISTORY_FOLDERS || ref == EXTRAINI_FOLDERS || ref == UI_FOLDERS);
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_display_actual>(machine(), container, ref, change));
|
||||
}
|
||||
}
|
||||
@ -354,7 +354,7 @@ void ui_menu_directory::handle()
|
||||
void ui_menu_directory::populate()
|
||||
{
|
||||
item_append("Roms", nullptr, 0, (void *)(FPTR)ROM_FOLDERS);
|
||||
item_append("MEWUI", nullptr, 0, (void *)(FPTR)MEWUI_FOLDERS);
|
||||
item_append("UI", nullptr, 0, (void *)(FPTR)UI_FOLDERS);
|
||||
item_append("Samples", nullptr, 0, (void *)(FPTR)SAMPLE_FOLDERS);
|
||||
item_append("INIs", nullptr, 0, (void *)(FPTR)INI_FOLDERS);
|
||||
item_append("Artwork", nullptr, 0, (void *)(FPTR)ARTWORK_FOLDERS);
|
||||
|
@ -30,7 +30,7 @@ private:
|
||||
enum
|
||||
{
|
||||
ROM_FOLDERS = 1,
|
||||
MEWUI_FOLDERS,
|
||||
UI_FOLDERS,
|
||||
SAMPLE_FOLDERS,
|
||||
HISTORY_FOLDERS,
|
||||
INI_FOLDERS,
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
ui/dsplmenu.cpp
|
||||
|
||||
MEWUI video options menu.
|
||||
UI video options menu.
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
ui/dsplmenu.h
|
||||
|
||||
MEWUI video options menu.
|
||||
UI video options menu.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
@ -9,8 +9,6 @@
|
||||
Original code by Victor Laskin (victor.laskin@gmail.com)
|
||||
http://vitiy.info/Code/ico.cpp
|
||||
|
||||
Revised for MEWUI by dankan1890.
|
||||
|
||||
***************************************************************************/
|
||||
#pragma once
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
ui/inifile.cpp
|
||||
|
||||
MEWUI INIs file manager.
|
||||
UI INIs file manager.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -47,8 +47,8 @@ void inifile_manager::directory_scan()
|
||||
int length = strlen(dir->name);
|
||||
std::string filename(dir->name);
|
||||
|
||||
// skip mewui_favorite file
|
||||
if (!core_stricmp("mewui_favorite.ini", filename.c_str()))
|
||||
// skip ui_favorite file
|
||||
if (!core_stricmp("ui_favorite.ini", filename.c_str()))
|
||||
continue;
|
||||
|
||||
// check .ini file ending
|
||||
@ -357,7 +357,7 @@ bool favorite_manager::isgame_favorite(ui_software_info &swinfo)
|
||||
|
||||
void favorite_manager::parse_favorite()
|
||||
{
|
||||
emu_file file(machine().options().mewui_path(), OPEN_FLAG_READ);
|
||||
emu_file file(machine().options().ui_path(), OPEN_FLAG_READ);
|
||||
if (file.open(favorite_filename) == FILERR_NONE)
|
||||
{
|
||||
char readbuf[1024];
|
||||
@ -416,7 +416,7 @@ void favorite_manager::parse_favorite()
|
||||
void favorite_manager::save_favorite_games()
|
||||
{
|
||||
// attempt to open the output file
|
||||
emu_file file(machine().options().mewui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
||||
emu_file file(machine().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
||||
if (file.open(favorite_filename) == FILERR_NONE)
|
||||
{
|
||||
if (m_list.empty())
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
ui/inifile.h
|
||||
|
||||
MEWUI INIs file manager.
|
||||
UI INIs file manager.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -112,7 +112,7 @@ private:
|
||||
// current
|
||||
int m_current;
|
||||
|
||||
// parse file mewui_favorite
|
||||
// parse file ui_favorite
|
||||
void parse_favorite();
|
||||
|
||||
// internal state
|
||||
|
@ -296,18 +296,18 @@ void ui_menu_main::handle()
|
||||
break;
|
||||
|
||||
case HISTORY:
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, MEWUI_HISTORY_LOAD));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_HISTORY_LOAD));
|
||||
break;
|
||||
|
||||
case MAMEINFO:
|
||||
if ((machine().system().flags & MACHINE_TYPE_ARCADE) != 0)
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, MEWUI_MAMEINFO_LOAD));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_MAMEINFO_LOAD));
|
||||
else
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, MEWUI_MESSINFO_LOAD));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_MESSINFO_LOAD));
|
||||
break;
|
||||
|
||||
case SYSINFO:
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, MEWUI_SYSINFO_LOAD));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_SYSINFO_LOAD));
|
||||
break;
|
||||
|
||||
case COMMAND:
|
||||
@ -315,7 +315,7 @@ void ui_menu_main::handle()
|
||||
break;
|
||||
|
||||
case STORYINFO:
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, MEWUI_STORY_LOAD));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_STORY_LOAD));
|
||||
break;
|
||||
|
||||
case ADD_FAVORITE:
|
||||
|
@ -76,8 +76,8 @@ render_texture *ui_menu::snapx_texture;
|
||||
render_texture *ui_menu::hilight_main_texture;
|
||||
render_texture *ui_menu::bgrnd_texture;
|
||||
render_texture *ui_menu::star_texture;
|
||||
render_texture *ui_menu::toolbar_texture[MEWUI_TOOLBAR_BUTTONS];
|
||||
render_texture *ui_menu::sw_toolbar_texture[MEWUI_TOOLBAR_BUTTONS];
|
||||
render_texture *ui_menu::toolbar_texture[UI_TOOLBAR_BUTTONS];
|
||||
render_texture *ui_menu::sw_toolbar_texture[UI_TOOLBAR_BUTTONS];
|
||||
render_texture *ui_menu::icons_texture[MAX_ICONS_RENDER];
|
||||
std::unique_ptr<bitmap_argb32> ui_menu::snapx_bitmap;
|
||||
std::unique_ptr<bitmap_argb32> ui_menu::no_avail_bitmap;
|
||||
@ -85,8 +85,8 @@ std::unique_ptr<bitmap_argb32> ui_menu::star_bitmap;
|
||||
std::unique_ptr<bitmap_argb32> ui_menu::bgrnd_bitmap;
|
||||
bitmap_argb32 *ui_menu::icons_bitmap[MAX_ICONS_RENDER];
|
||||
std::unique_ptr<bitmap_rgb32> ui_menu::hilight_main_bitmap;
|
||||
bitmap_argb32 *ui_menu::toolbar_bitmap[MEWUI_TOOLBAR_BUTTONS];
|
||||
bitmap_argb32 *ui_menu::sw_toolbar_bitmap[MEWUI_TOOLBAR_BUTTONS];
|
||||
bitmap_argb32 *ui_menu::toolbar_bitmap[UI_TOOLBAR_BUTTONS];
|
||||
bitmap_argb32 *ui_menu::sw_toolbar_bitmap[UI_TOOLBAR_BUTTONS];
|
||||
|
||||
/***************************************************************************
|
||||
INLINE FUNCTIONS
|
||||
@ -149,8 +149,8 @@ void ui_menu::init(running_machine &machine)
|
||||
// create a texture for arrow icons
|
||||
arrow_texture = machine.render().texture_alloc(render_triangle);
|
||||
|
||||
// initialize mewui
|
||||
init_mewui(machine);
|
||||
// initialize ui
|
||||
init_ui(machine);
|
||||
|
||||
// add an exit callback to free memory
|
||||
machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ui_menu::exit), &machine));
|
||||
@ -179,7 +179,7 @@ void ui_menu::exit(running_machine &machine)
|
||||
for (auto & elem : icons_texture)
|
||||
mre.texture_free(elem);
|
||||
|
||||
for (int i = 0; i < MEWUI_TOOLBAR_BUTTONS; i++)
|
||||
for (int i = 0; i < UI_TOOLBAR_BUTTONS; i++)
|
||||
{
|
||||
mre.texture_free(sw_toolbar_texture[i]);
|
||||
mre.texture_free(toolbar_texture[i]);
|
||||
@ -336,9 +336,9 @@ const ui_menu_event *ui_menu::process(UINT32 flags)
|
||||
// draw the menu
|
||||
if (item.size() > 1 && (item[0].flags & MENU_FLAG_MULTILINE) != 0)
|
||||
draw_text_box();
|
||||
else if ((item[0].flags & MENU_FLAG_MEWUI ) != 0 || (item[0].flags & MENU_FLAG_MEWUI_SWLIST ) != 0)
|
||||
else if ((item[0].flags & MENU_FLAG_UI ) != 0 || (item[0].flags & MENU_FLAG_UI_SWLIST ) != 0)
|
||||
draw_select_game(flags & UI_MENU_PROCESS_NOINPUT);
|
||||
else if ((item[0].flags & MENU_FLAG_MEWUI_PALETTE ) != 0)
|
||||
else if ((item[0].flags & MENU_FLAG_UI_PALETTE ) != 0)
|
||||
draw_palette_menu();
|
||||
else
|
||||
draw(flags & UI_MENU_PROCESS_CUSTOM_ONLY, flags & UI_MENU_PROCESS_NOIMAGE, flags & UI_MENU_PROCESS_NOINPUT);
|
||||
@ -347,7 +347,7 @@ const ui_menu_event *ui_menu::process(UINT32 flags)
|
||||
if (!(flags & UI_MENU_PROCESS_NOKEYS) && !(flags & UI_MENU_PROCESS_NOINPUT))
|
||||
{
|
||||
// read events
|
||||
if ((item[0].flags & MENU_FLAG_MEWUI ) != 0 || (item[0].flags & MENU_FLAG_MEWUI_SWLIST ) != 0)
|
||||
if ((item[0].flags & MENU_FLAG_UI ) != 0 || (item[0].flags & MENU_FLAG_UI_SWLIST ) != 0)
|
||||
handle_main_events(flags);
|
||||
else
|
||||
handle_events(flags);
|
||||
@ -355,7 +355,7 @@ const ui_menu_event *ui_menu::process(UINT32 flags)
|
||||
// handle the keys if we don't already have an menu_event
|
||||
if (menu_event.iptkey == IPT_INVALID)
|
||||
{
|
||||
if ((item[0].flags & MENU_FLAG_MEWUI ) != 0 || (item[0].flags & MENU_FLAG_MEWUI_SWLIST ) != 0)
|
||||
if ((item[0].flags & MENU_FLAG_UI ) != 0 || (item[0].flags & MENU_FLAG_UI_SWLIST ) != 0)
|
||||
handle_main_keys(flags);
|
||||
else
|
||||
handle_keys(flags);
|
||||
@ -463,7 +463,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
|
||||
int itemnum, linenum;
|
||||
bool mouse_hit, mouse_button;
|
||||
float mouse_x = -1, mouse_y = -1;
|
||||
bool history_flag = ((item[0].flags & MENU_FLAG_MEWUI_HISTORY) != 0);
|
||||
bool history_flag = ((item[0].flags & MENU_FLAG_UI_HISTORY) != 0);
|
||||
|
||||
if (machine().options().use_background_image() && &machine().system() == &GAME_NAME(___empty) && bgrnd_bitmap->valid() && !noimage)
|
||||
container->add_quad(0.0f, 0.0f, 1.0f, 1.0f, ARGB_WHITE, bgrnd_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
|
||||
@ -575,11 +575,11 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
|
||||
|
||||
// set the hover if this is our item
|
||||
if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable()
|
||||
&& (pitem.flags & MENU_FLAG_MEWUI_HISTORY) == 0)
|
||||
&& (pitem.flags & MENU_FLAG_UI_HISTORY) == 0)
|
||||
hover = itemnum;
|
||||
|
||||
// if we're selected, draw with a different background
|
||||
if (itemnum == selected && (pitem.flags & MENU_FLAG_MEWUI_HISTORY) == 0)
|
||||
if (itemnum == selected && (pitem.flags & MENU_FLAG_UI_HISTORY) == 0)
|
||||
{
|
||||
fgcolor = UI_SELECTED_COLOR;
|
||||
bgcolor = UI_SELECTED_BG_COLOR;
|
||||
@ -588,7 +588,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
|
||||
}
|
||||
|
||||
// else if the mouse is over this item, draw with a different background
|
||||
else if (itemnum == hover && (((pitem.flags & MENU_FLAG_MEWUI_HISTORY) == 0) || (linenum == 0 && top_line != 0)
|
||||
else if (itemnum == hover && (((pitem.flags & MENU_FLAG_UI_HISTORY) == 0) || (linenum == 0 && top_line != 0)
|
||||
|| (linenum == visible_lines - 1 && itemnum != item.size() - 1)))
|
||||
{
|
||||
fgcolor = UI_MOUSEOVER_COLOR;
|
||||
@ -634,7 +634,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput)
|
||||
container->add_line(visible_left, line_y + 0.5f * line_height, visible_left + visible_width, line_y + 0.5f * line_height, UI_LINE_WIDTH, UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
|
||||
|
||||
// draw the subitem left-justified
|
||||
else if (pitem.subtext == nullptr && (pitem.flags & MENU_FLAG_MEWUI_HISTORY) != 0)
|
||||
else if (pitem.subtext == nullptr && (pitem.flags & MENU_FLAG_UI_HISTORY) != 0)
|
||||
machine().ui().draw_text_full(container, itemtext, effective_left, line_y, effective_width,
|
||||
JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
|
||||
|
||||
@ -820,7 +820,7 @@ void ui_menu::handle_events(UINT32 flags)
|
||||
{
|
||||
int stop = FALSE;
|
||||
ui_event local_menu_event;
|
||||
bool historyflag = ((item[0].flags & MENU_FLAG_MEWUI_HISTORY) != 0);
|
||||
bool historyflag = ((item[0].flags & MENU_FLAG_UI_HISTORY) != 0);
|
||||
|
||||
// loop while we have interesting events
|
||||
while (!stop && machine().ui_input().pop_event(&local_menu_event))
|
||||
@ -917,7 +917,7 @@ void ui_menu::handle_keys(UINT32 flags)
|
||||
// bail if no items
|
||||
if (item.empty())
|
||||
return;
|
||||
bool historyflag = ((item[0].flags & MENU_FLAG_MEWUI_HISTORY) != 0);
|
||||
bool historyflag = ((item[0].flags & MENU_FLAG_UI_HISTORY) != 0);
|
||||
|
||||
|
||||
// if we hit select, return TRUE or pop the stack, depending on the item
|
||||
@ -1257,10 +1257,10 @@ void ui_menu::draw_arrow(render_container *container, float x0, float y0, float
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// init - initialize the mewui menu system
|
||||
// init - initialize the ui menu system
|
||||
//-------------------------------------------------
|
||||
|
||||
void ui_menu::init_mewui(running_machine &machine)
|
||||
void ui_menu::init_ui(running_machine &machine)
|
||||
{
|
||||
render_manager &mrender = machine.render();
|
||||
// create a texture for hilighting items in main menu
|
||||
@ -1323,7 +1323,7 @@ void ui_menu::init_mewui(running_machine &machine)
|
||||
bgrnd_bitmap->reset();
|
||||
|
||||
// create a texture for toolbar
|
||||
for (int x = 0; x < MEWUI_TOOLBAR_BUTTONS; ++x)
|
||||
for (int x = 0; x < UI_TOOLBAR_BUTTONS; ++x)
|
||||
{
|
||||
toolbar_bitmap[x] = auto_alloc(machine, bitmap_argb32(32, 32));
|
||||
toolbar_texture[x] = mrender.texture_alloc();
|
||||
@ -1336,7 +1336,7 @@ void ui_menu::init_mewui(running_machine &machine)
|
||||
}
|
||||
|
||||
// create a texture for toolbar
|
||||
for (int x = 0; x < MEWUI_TOOLBAR_BUTTONS; ++x)
|
||||
for (int x = 0; x < UI_TOOLBAR_BUTTONS; ++x)
|
||||
{
|
||||
sw_toolbar_bitmap[x] = auto_alloc(machine, bitmap_argb32(32, 32));
|
||||
sw_toolbar_texture[x] = mrender.texture_alloc();
|
||||
@ -1367,8 +1367,8 @@ void ui_menu::draw_select_game(bool noinput)
|
||||
float visible_width = 1.0f - 4.0f * UI_BOX_LR_BORDER;
|
||||
float primary_left = (1.0f - visible_width) * 0.5f;
|
||||
float primary_width = visible_width;
|
||||
bool is_swlist = ((item[0].flags & MENU_FLAG_MEWUI_SWLIST) != 0);
|
||||
bool is_favorites = ((item[0].flags & MENU_FLAG_MEWUI_FAVORITE) != 0);
|
||||
bool is_swlist = ((item[0].flags & MENU_FLAG_UI_SWLIST) != 0);
|
||||
bool is_favorites = ((item[0].flags & MENU_FLAG_UI_FAVORITE) != 0);
|
||||
ui_manager &mui = machine().ui();
|
||||
|
||||
// draw background image if available
|
||||
@ -2139,7 +2139,7 @@ void ui_menu::draw_toolbar(float x1, float y1, float x2, float y2, bool software
|
||||
bitmap_argb32 **t_bitmap = (software) ? sw_toolbar_bitmap : toolbar_bitmap;
|
||||
|
||||
int m_valid = 0;
|
||||
for (int x = 0; x < MEWUI_TOOLBAR_BUTTONS; ++x)
|
||||
for (int x = 0; x < UI_TOOLBAR_BUTTONS; ++x)
|
||||
if (t_bitmap[x]->valid())
|
||||
m_valid++;
|
||||
|
||||
@ -2148,7 +2148,7 @@ void ui_menu::draw_toolbar(float x1, float y1, float x2, float y2, bool software
|
||||
h_len = (h_len % 2 == 0) ? h_len : h_len - 1;
|
||||
x1 = (x1 + x2) * 0.5f - x_pixel * (m_valid * ((h_len / 2) + 2));
|
||||
|
||||
for (int z = 0; z < MEWUI_TOOLBAR_BUTTONS; ++z)
|
||||
for (int z = 0; z < UI_TOOLBAR_BUTTONS; ++z)
|
||||
{
|
||||
if (t_bitmap[z]->valid())
|
||||
{
|
||||
@ -2543,14 +2543,14 @@ void ui_menu::draw_palette_menu()
|
||||
hover = itemnum;
|
||||
|
||||
// if we're selected, draw with a different background
|
||||
if (itemnum == selected && (pitem.flags & MENU_FLAG_MEWUI_HISTORY) == 0)
|
||||
if (itemnum == selected && (pitem.flags & MENU_FLAG_UI_HISTORY) == 0)
|
||||
{
|
||||
fgcolor = UI_SELECTED_COLOR;
|
||||
bgcolor = UI_SELECTED_BG_COLOR;
|
||||
}
|
||||
|
||||
// else if the mouse is over this item, draw with a different background
|
||||
else if (itemnum == hover && (pitem.flags & MENU_FLAG_MEWUI_HISTORY) == 0)
|
||||
else if (itemnum == hover && (pitem.flags & MENU_FLAG_UI_HISTORY) == 0)
|
||||
{
|
||||
fgcolor = UI_MOUSEOVER_COLOR;
|
||||
bgcolor = UI_MOUSEOVER_BG_COLOR;
|
||||
|
@ -27,11 +27,11 @@
|
||||
#define MENU_FLAG_MULTILINE (1 << 3)
|
||||
#define MENU_FLAG_REDTEXT (1 << 4)
|
||||
#define MENU_FLAG_DISABLE (1 << 5)
|
||||
#define MENU_FLAG_MEWUI (1 << 6)
|
||||
#define MENU_FLAG_MEWUI_HISTORY (1 << 7)
|
||||
#define MENU_FLAG_MEWUI_SWLIST (1 << 8)
|
||||
#define MENU_FLAG_MEWUI_FAVORITE (1 << 9)
|
||||
#define MENU_FLAG_MEWUI_PALETTE (1 << 10)
|
||||
#define MENU_FLAG_UI (1 << 6)
|
||||
#define MENU_FLAG_UI_HISTORY (1 << 7)
|
||||
#define MENU_FLAG_UI_SWLIST (1 << 8)
|
||||
#define MENU_FLAG_UI_FAVORITE (1 << 9)
|
||||
#define MENU_FLAG_UI_PALETTE (1 << 10)
|
||||
|
||||
// special menu item for separators
|
||||
#define MENU_SEPARATOR_ITEM "---"
|
||||
@ -191,9 +191,6 @@ private:
|
||||
static void clear_free_list(running_machine &machine);
|
||||
static void render_triangle(bitmap_argb32 &dest, bitmap_argb32 &source, const rectangle &sbounds, void *param);
|
||||
|
||||
/*****************************************
|
||||
MEWUI SECTION
|
||||
*****************************************/
|
||||
public:
|
||||
int visible_items;
|
||||
bool ui_error;
|
||||
@ -217,7 +214,7 @@ public:
|
||||
void draw_star(float x0, float y0);
|
||||
|
||||
// Global initialization
|
||||
static void init_mewui(running_machine &machine);
|
||||
static void init_ui(running_machine &machine);
|
||||
|
||||
// get arrows status
|
||||
template <typename _T1, typename _T2, typename _T3>
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
ui/moptions.c
|
||||
|
||||
MEWUI main options manager.
|
||||
UI main options manager.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -13,13 +13,13 @@
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// MEWUI EXTRA OPTIONS
|
||||
// UI EXTRA OPTIONS
|
||||
//**************************************************************************
|
||||
|
||||
const options_entry ui_options::s_option_entries[] =
|
||||
{
|
||||
// seach path options
|
||||
{ nullptr, nullptr, OPTION_HEADER, "MEWUI SEARCH PATH OPTIONS" },
|
||||
{ nullptr, nullptr, OPTION_HEADER, "UI SEARCH PATH OPTIONS" },
|
||||
{ OPTION_HISTORY_PATH, "history;dats", OPTION_STRING, "path to history files" },
|
||||
{ OPTION_EXTRAINI_PATH, "folders", OPTION_STRING, "path to extra ini files" },
|
||||
{ OPTION_CABINETS_PATH, "cabinets;cabdevs", OPTION_STRING, "path to cabinets / devices image" },
|
||||
@ -38,10 +38,10 @@ const options_entry ui_options::s_option_entries[] =
|
||||
{ OPTION_HOWTO_PATH, "howto", OPTION_STRING, "path to howto image" },
|
||||
{ OPTION_SELECT_PATH, "select", OPTION_STRING, "path to select image" },
|
||||
{ OPTION_ICONS_PATH, "icons", OPTION_STRING, "path to ICOns image" },
|
||||
{ OPTION_MEWUI_PATH, "mewui", OPTION_STRING, "path to MEWUI files" },
|
||||
{ OPTION_UI_PATH, "ui", OPTION_STRING, "path to UI files" },
|
||||
|
||||
// misc options
|
||||
{ nullptr, nullptr, OPTION_HEADER, "MEWUI MISC OPTIONS" },
|
||||
{ nullptr, nullptr, OPTION_HEADER, "UI MISC OPTIONS" },
|
||||
{ OPTION_DATS_ENABLED, "1", OPTION_BOOLEAN, "enable DATs support" },
|
||||
{ OPTION_REMEMBER_LAST, "1", OPTION_BOOLEAN, "reselect in main menu last played game" },
|
||||
{ OPTION_ENLARGE_SNAPS, "1", OPTION_BOOLEAN, "enlarge arts (snapshot, title, etc...) in right panel (keeping aspect ratio)" },
|
||||
@ -54,7 +54,7 @@ const options_entry ui_options::s_option_entries[] =
|
||||
{ OPTION_INFO_AUTO_AUDIT, "0", OPTION_BOOLEAN, "enable auto audit in the general info panel" },
|
||||
|
||||
// UI options
|
||||
{ nullptr, nullptr, OPTION_HEADER, "MEWUI UI OPTIONS" },
|
||||
{ nullptr, nullptr, OPTION_HEADER, "UI UI OPTIONS" },
|
||||
{ OPTION_INFOS_SIZE "(0.05-1.00)", "0.75", OPTION_FLOAT, "UI right panel infos text size (0.05 - 1.00)" },
|
||||
{ OPTION_FONT_ROWS "(25-40)", "30", OPTION_INTEGER, "UI font text size (25 - 40)" },
|
||||
{ OPTION_HIDE_PANELS "(0-3)", "0", OPTION_INTEGER, "UI hide left/right panel in main view (0 = Show all, 1 = hide left, 2 = hide right, 3 = hide both" },
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
ui/moptions.h
|
||||
|
||||
MEWUI main options manager.
|
||||
UI main options manager.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#define OPTION_HOWTO_PATH "howto_directory"
|
||||
#define OPTION_SELECT_PATH "select_directory"
|
||||
#define OPTION_ICONS_PATH "icons_directory"
|
||||
#define OPTION_MEWUI_PATH "mewui_path"
|
||||
#define OPTION_UI_PATH "ui_path"
|
||||
|
||||
// core misc options
|
||||
#define OPTION_DATS_ENABLED "dats_enabled"
|
||||
@ -95,7 +95,7 @@ public:
|
||||
const char *howto_directory() const { return value(OPTION_HOWTO_PATH); }
|
||||
const char *select_directory() const { return value(OPTION_SELECT_PATH); }
|
||||
const char *icons_directory() const { return value(OPTION_ICONS_PATH); }
|
||||
const char *mewui_path() const { return value(OPTION_MEWUI_PATH); }
|
||||
const char *ui_path() const { return value(OPTION_UI_PATH); }
|
||||
|
||||
// Misc options
|
||||
bool enabled_dats() const { return bool_value(OPTION_DATS_ENABLED); }
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
ui/optsmenu.cpp
|
||||
|
||||
MEWUI main options menu manager.
|
||||
UI main options menu manager.
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
ui/optsmenu.h
|
||||
|
||||
MEWUI main options menu manager.
|
||||
UI main options menu manager.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
ui/selgame.cpp
|
||||
|
||||
Main MEWUI menu.
|
||||
Main UI menu.
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#include "softlist.h"
|
||||
#include <algorithm>
|
||||
|
||||
extern const char MEWUI_VERSION_TAG[];
|
||||
extern const char UI_VERSION_TAG[];
|
||||
|
||||
static bool first_start = true;
|
||||
static const char *dats_info[] = { "General Info", "History", "Mameinfo", "Sysinfo", "Messinfo", "Command", "Mamescore" };
|
||||
@ -170,7 +170,7 @@ ui_menu_select_game::ui_menu_select_game(running_machine &machine, render_contai
|
||||
moptions.set_value(OPTION_SOFTWARENAME, "", OPTION_PRIORITY_CMDLINE, error_string);
|
||||
|
||||
ui_globals::curimage_view = FIRST_VIEW;
|
||||
ui_globals::curdats_view = MEWUI_FIRST_LOAD;
|
||||
ui_globals::curdats_view = UI_FIRST_LOAD;
|
||||
ui_globals::switch_image = false;
|
||||
ui_globals::default_image = true;
|
||||
ui_globals::panels_status = moptions.hide_panels();
|
||||
@ -269,7 +269,7 @@ void ui_menu_select_game::handle()
|
||||
}
|
||||
|
||||
// Infos
|
||||
else if (ui_globals::rpanel == RP_INFOS && ui_globals::curdats_view > MEWUI_FIRST_LOAD)
|
||||
else if (ui_globals::rpanel == RP_INFOS && ui_globals::curdats_view > UI_FIRST_LOAD)
|
||||
{
|
||||
ui_globals::curdats_view--;
|
||||
topline_datsview = 0;
|
||||
@ -288,7 +288,7 @@ void ui_menu_select_game::handle()
|
||||
}
|
||||
|
||||
// Infos
|
||||
else if (ui_globals::rpanel == RP_INFOS && ui_globals::curdats_view < MEWUI_LAST_LOAD)
|
||||
else if (ui_globals::rpanel == RP_INFOS && ui_globals::curdats_view < UI_LAST_LOAD)
|
||||
{
|
||||
ui_globals::curdats_view++;
|
||||
topline_datsview = 0;
|
||||
@ -331,7 +331,7 @@ void ui_menu_select_game::handle()
|
||||
{
|
||||
const game_driver *driver = (const game_driver *)m_event->itemref;
|
||||
if ((FPTR)driver > 2)
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, MEWUI_HISTORY_LOAD, driver));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_HISTORY_LOAD, driver));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -339,7 +339,7 @@ void ui_menu_select_game::handle()
|
||||
if ((FPTR)swinfo > 2)
|
||||
{
|
||||
if (swinfo->startempty == 1)
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, MEWUI_HISTORY_LOAD, swinfo->driver));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_HISTORY_LOAD, swinfo->driver));
|
||||
else
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_history_sw>(machine(), container, swinfo));
|
||||
}
|
||||
@ -355,9 +355,9 @@ void ui_menu_select_game::handle()
|
||||
if ((FPTR)driver > 2)
|
||||
{
|
||||
if ((driver->flags & MACHINE_TYPE_ARCADE) != 0)
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, MEWUI_MAMEINFO_LOAD, driver));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_MAMEINFO_LOAD, driver));
|
||||
else
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, MEWUI_MESSINFO_LOAD, driver));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_MESSINFO_LOAD, driver));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -366,9 +366,9 @@ void ui_menu_select_game::handle()
|
||||
if ((FPTR)swinfo > 2 && swinfo->startempty == 1)
|
||||
{
|
||||
if ((swinfo->driver->flags & MACHINE_TYPE_ARCADE) != 0)
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, MEWUI_MAMEINFO_LOAD, swinfo->driver));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_MAMEINFO_LOAD, swinfo->driver));
|
||||
else
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, MEWUI_MESSINFO_LOAD, swinfo->driver));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_MESSINFO_LOAD, swinfo->driver));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -380,13 +380,13 @@ void ui_menu_select_game::handle()
|
||||
{
|
||||
const game_driver *driver = (const game_driver *)m_event->itemref;
|
||||
if ((FPTR)driver > 2)
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, MEWUI_STORY_LOAD, driver));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_STORY_LOAD, driver));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui_software_info *swinfo = (ui_software_info *)m_event->itemref;
|
||||
if ((FPTR)swinfo > 2 && swinfo->startempty == 1)
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, MEWUI_STORY_LOAD, swinfo->driver));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_STORY_LOAD, swinfo->driver));
|
||||
}
|
||||
}
|
||||
|
||||
@ -397,13 +397,13 @@ void ui_menu_select_game::handle()
|
||||
{
|
||||
const game_driver *driver = (const game_driver *)m_event->itemref;
|
||||
if ((FPTR)driver > 2)
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, MEWUI_SYSINFO_LOAD, driver));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_SYSINFO_LOAD, driver));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui_software_info *swinfo = (ui_software_info *)m_event->itemref;
|
||||
if ((FPTR)swinfo > 2 && swinfo->startempty == 1)
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, MEWUI_SYSINFO_LOAD, swinfo->driver));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_dats>(machine(), container, UI_SYSINFO_LOAD, swinfo->driver));
|
||||
}
|
||||
}
|
||||
|
||||
@ -597,7 +597,7 @@ void ui_menu_select_game::populate()
|
||||
// iterate over entries
|
||||
for (size_t curitem = 0; curitem < m_displaylist.size(); ++curitem)
|
||||
{
|
||||
UINT32 flags_mewui = MENU_FLAG_MEWUI | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW;
|
||||
UINT32 flags_ui = MENU_FLAG_UI | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW;
|
||||
|
||||
if (old_item_selected == -1 && !reselect_last::driver.empty() && m_displaylist[curitem]->name == reselect_last::driver)
|
||||
old_item_selected = curitem;
|
||||
@ -610,9 +610,9 @@ void ui_menu_select_game::populate()
|
||||
cloneof = false;
|
||||
}
|
||||
if (cloneof)
|
||||
flags_mewui |= MENU_FLAG_INVERT;
|
||||
flags_ui |= MENU_FLAG_INVERT;
|
||||
|
||||
item_append(m_displaylist[curitem]->description, nullptr, flags_mewui, (void *)m_displaylist[curitem]);
|
||||
item_append(m_displaylist[curitem]->description, nullptr, flags_ui, (void *)m_displaylist[curitem]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -624,7 +624,7 @@ void ui_menu_select_game::populate()
|
||||
// iterate over entries
|
||||
for (auto & mfavorite : machine().favorite().m_list)
|
||||
{
|
||||
UINT32 flags_mewui = MENU_FLAG_MEWUI | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW | MENU_FLAG_MEWUI_FAVORITE;
|
||||
UINT32 flags_ui = MENU_FLAG_UI | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW | MENU_FLAG_UI_FAVORITE;
|
||||
if (mfavorite.startempty == 1)
|
||||
{
|
||||
if (old_item_selected == -1 && !reselect_last::driver.empty() && mfavorite.shortname == reselect_last::driver)
|
||||
@ -638,25 +638,25 @@ void ui_menu_select_game::populate()
|
||||
cloneof = false;
|
||||
}
|
||||
if (cloneof)
|
||||
flags_mewui |= MENU_FLAG_INVERT;
|
||||
flags_ui |= MENU_FLAG_INVERT;
|
||||
|
||||
item_append(mfavorite.longname.c_str(), nullptr, flags_mewui, (void *)&mfavorite);
|
||||
item_append(mfavorite.longname.c_str(), nullptr, flags_ui, (void *)&mfavorite);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (old_item_selected == -1 && !reselect_last::driver.empty() && mfavorite.shortname == reselect_last::driver)
|
||||
old_item_selected = curitem;
|
||||
item_append(mfavorite.longname.c_str(), mfavorite.devicetype.c_str(),
|
||||
mfavorite.parentname.empty() ? flags_mewui : (MENU_FLAG_INVERT | flags_mewui), (void *)&mfavorite);
|
||||
mfavorite.parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui), (void *)&mfavorite);
|
||||
}
|
||||
curitem++;
|
||||
}
|
||||
}
|
||||
|
||||
// add special items
|
||||
item_append(MENU_SEPARATOR_ITEM, nullptr, MENU_FLAG_MEWUI, nullptr);
|
||||
item_append("Configure Options", nullptr, MENU_FLAG_MEWUI, (void *)(FPTR)1);
|
||||
item_append("Configure Directories", nullptr, MENU_FLAG_MEWUI, (void *)(FPTR)2);
|
||||
item_append(MENU_SEPARATOR_ITEM, nullptr, MENU_FLAG_UI, nullptr);
|
||||
item_append("Configure Options", nullptr, MENU_FLAG_UI, (void *)(FPTR)1);
|
||||
item_append("Configure Directories", nullptr, MENU_FLAG_UI, (void *)(FPTR)2);
|
||||
|
||||
// configure the custom rendering
|
||||
customtop = 3.0f * machine().ui().get_line_height() + 5.0f * UI_BOX_TB_BORDER;
|
||||
@ -1024,7 +1024,7 @@ void ui_menu_select_game::inkey_select(const ui_menu_event *m_event)
|
||||
|
||||
std::vector<s_bios> biosname;
|
||||
if (!machine().options().skip_bios_menu() && has_multiple_bios(driver, biosname))
|
||||
ui_menu::stack_push(global_alloc_clear<ui_mewui_bios_selection>(machine(), container, biosname, (void *)driver, false, false));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_bios_selection>(machine(), container, biosname, (void *)driver, false, false));
|
||||
else
|
||||
{
|
||||
reselect_last::driver = driver->name;
|
||||
@ -1074,7 +1074,7 @@ void ui_menu_select_game::inkey_select_favorite(const ui_menu_event *m_event)
|
||||
{
|
||||
std::vector<s_bios> biosname;
|
||||
if (!mopt.skip_bios_menu() && has_multiple_bios(ui_swinfo->driver, biosname))
|
||||
ui_menu::stack_push(global_alloc_clear<ui_mewui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo->driver, false, false));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo->driver, false, false));
|
||||
else
|
||||
{
|
||||
reselect_last::driver = ui_swinfo->driver->name;
|
||||
@ -1108,7 +1108,7 @@ void ui_menu_select_game::inkey_select_favorite(const ui_menu_event *m_event)
|
||||
std::vector<s_bios> biosname;
|
||||
if (!mopt.skip_bios_menu() && has_multiple_bios(ui_swinfo->driver, biosname))
|
||||
{
|
||||
ui_menu::stack_push(global_alloc_clear<ui_mewui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo, true, false));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo, true, false));
|
||||
return;
|
||||
}
|
||||
else if (!mopt.skip_parts_menu() && swinfo->has_multiple_parts(ui_swinfo->interface.c_str()))
|
||||
@ -1124,7 +1124,7 @@ void ui_menu_select_game::inkey_select_favorite(const ui_menu_event *m_event)
|
||||
parts.emplace(swpart->name(), menu_part_name);
|
||||
}
|
||||
}
|
||||
ui_menu::stack_push(global_alloc_clear<ui_mewui_software_parts>(machine(), container, parts, ui_swinfo));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_software_parts>(machine(), container, parts, ui_swinfo));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1471,7 +1471,7 @@ void ui_menu_select_game::populate_search()
|
||||
}
|
||||
|
||||
(index < VISIBLE_GAMES_IN_SEARCH) ? m_searchlist[index] = nullptr : m_searchlist[VISIBLE_GAMES_IN_SEARCH] = nullptr;
|
||||
UINT32 flags_mewui = MENU_FLAG_MEWUI | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW;
|
||||
UINT32 flags_ui = MENU_FLAG_UI | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW;
|
||||
for (int curitem = 0; m_searchlist[curitem]; ++curitem)
|
||||
{
|
||||
bool cloneof = strcmp(m_searchlist[curitem]->parent, "0");
|
||||
@ -1481,7 +1481,7 @@ void ui_menu_select_game::populate_search()
|
||||
if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0))
|
||||
cloneof = false;
|
||||
}
|
||||
item_append(m_searchlist[curitem]->description, nullptr, (!cloneof) ? flags_mewui : (MENU_FLAG_INVERT | flags_mewui),
|
||||
item_append(m_searchlist[curitem]->description, nullptr, (!cloneof) ? flags_ui : (MENU_FLAG_INVERT | flags_ui),
|
||||
(void *)m_searchlist[curitem]);
|
||||
}
|
||||
}
|
||||
@ -1569,7 +1569,7 @@ void ui_menu_select_game::general_info(const game_driver *driver, std::string &b
|
||||
void ui_menu_select_game::inkey_export()
|
||||
{
|
||||
std::string filename("exported");
|
||||
emu_file infile(machine().options().mewui_path(), OPEN_FLAG_READ);
|
||||
emu_file infile(machine().options().ui_path(), OPEN_FLAG_READ);
|
||||
if (infile.open(filename.c_str(), ".xml") == FILERR_NONE)
|
||||
for (int seq = 0; ; ++seq)
|
||||
{
|
||||
@ -1583,7 +1583,7 @@ void ui_menu_select_game::inkey_export()
|
||||
}
|
||||
|
||||
// attempt to open the output file
|
||||
emu_file file(machine().options().mewui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
||||
emu_file file(machine().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
||||
if (file.open(filename.c_str(), ".xml") == FILERR_NONE)
|
||||
{
|
||||
FILE *pfile;
|
||||
@ -1614,7 +1614,7 @@ void ui_menu_select_game::inkey_export()
|
||||
info_xml_creator creator(drivlist);
|
||||
creator.output(pfile, false);
|
||||
fclose(pfile);
|
||||
machine().popmessage("%s.xml saved under mewui folder.", filename.c_str());
|
||||
machine().popmessage("%s.xml saved under ui folder.", filename.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1625,14 +1625,14 @@ void ui_menu_select_game::inkey_export()
|
||||
void ui_menu_select_game::save_cache_info()
|
||||
{
|
||||
// attempt to open the output file
|
||||
emu_file file(machine().options().mewui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
||||
emu_file file(machine().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
||||
|
||||
if (file.open("info_", emulator_info::get_configname(), ".ini") == FILERR_NONE)
|
||||
{
|
||||
m_sortedlist.clear();
|
||||
|
||||
// generate header
|
||||
std::string buffer = std::string("#\n").append(MEWUI_VERSION_TAG).append(bare_build_version).append("\n#\n\n");
|
||||
std::string buffer = std::string("#\n").append(UI_VERSION_TAG).append(bare_build_version).append("\n#\n\n");
|
||||
|
||||
// generate full list
|
||||
for (int x = 0; x < driver_list::total(); ++x)
|
||||
@ -1716,7 +1716,7 @@ void ui_menu_select_game::load_cache_info()
|
||||
driver_cache.resize(driver_list::total() + 1);
|
||||
|
||||
// try to load driver cache
|
||||
emu_file file(machine().options().mewui_path(), OPEN_FLAG_READ);
|
||||
emu_file file(machine().options().ui_path(), OPEN_FLAG_READ);
|
||||
if (file.open("info_", emulator_info::get_configname(), ".ini") != FILERR_NONE)
|
||||
{
|
||||
save_cache_info();
|
||||
@ -1728,7 +1728,7 @@ void ui_menu_select_game::load_cache_info()
|
||||
file.gets(rbuf, MAX_CHAR_INFO);
|
||||
file.gets(rbuf, MAX_CHAR_INFO);
|
||||
readbuf = chartrimcarriage(rbuf);
|
||||
std::string a_rev = std::string(MEWUI_VERSION_TAG).append(bare_build_version);
|
||||
std::string a_rev = std::string(UI_VERSION_TAG).append(bare_build_version);
|
||||
|
||||
// version not matching ? save and exit
|
||||
if (a_rev != readbuf)
|
||||
@ -1788,7 +1788,7 @@ void ui_menu_select_game::load_cache_info()
|
||||
bool ui_menu_select_game::load_available_machines()
|
||||
{
|
||||
// try to load available drivers from file
|
||||
emu_file file(machine().options().mewui_path(), OPEN_FLAG_READ);
|
||||
emu_file file(machine().options().ui_path(), OPEN_FLAG_READ);
|
||||
if (file.open(emulator_info::get_configname(), "_avail.ini") != FILERR_NONE)
|
||||
return false;
|
||||
|
||||
@ -1797,7 +1797,7 @@ bool ui_menu_select_game::load_available_machines()
|
||||
file.gets(rbuf, MAX_CHAR_INFO);
|
||||
file.gets(rbuf, MAX_CHAR_INFO);
|
||||
readbuf = chartrimcarriage(rbuf);
|
||||
std::string a_rev = std::string(MEWUI_VERSION_TAG).append(bare_build_version);
|
||||
std::string a_rev = std::string(UI_VERSION_TAG).append(bare_build_version);
|
||||
|
||||
// version not matching ? exit
|
||||
if (a_rev != readbuf)
|
||||
@ -1840,7 +1840,7 @@ bool ui_menu_select_game::load_available_machines()
|
||||
void ui_menu_select_game::load_custom_filters()
|
||||
{
|
||||
// attempt to open the output file
|
||||
emu_file file(machine().options().mewui_path(), OPEN_FLAG_READ);
|
||||
emu_file file(machine().options().ui_path(), OPEN_FLAG_READ);
|
||||
if (file.open("custom_", emulator_info::get_configname(), "_filter.ini") == FILERR_NONE)
|
||||
{
|
||||
char buffer[MAX_CHAR_INFO];
|
||||
@ -2069,7 +2069,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
|
||||
float text_size = machine().options().infos_size();
|
||||
const game_driver *driver = nullptr;
|
||||
ui_software_info *soft = nullptr;
|
||||
bool is_favorites = ((item[0].flags & MENU_FLAG_MEWUI_FAVORITE) != 0);
|
||||
bool is_favorites = ((item[0].flags & MENU_FLAG_UI_FAVORITE) != 0);
|
||||
static ui_software_info *oldsoft = nullptr;
|
||||
static const game_driver *olddriver = nullptr;
|
||||
static int oldview = -1;
|
||||
@ -2099,7 +2099,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
|
||||
float oy1 = origy1 + line_height;
|
||||
|
||||
// MAMESCORE? Full size text
|
||||
if (ui_globals::curdats_view == MEWUI_STORY_LOAD)
|
||||
if (ui_globals::curdats_view == UI_STORY_LOAD)
|
||||
text_size = 1.0f;
|
||||
|
||||
std::string snaptext(dats_info[ui_globals::curdats_view]);
|
||||
@ -2108,7 +2108,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
|
||||
float title_size = 0.0f;
|
||||
float txt_lenght = 0.0f;
|
||||
|
||||
for (int x = MEWUI_FIRST_LOAD; x < MEWUI_LAST_LOAD; ++x)
|
||||
for (int x = UI_FIRST_LOAD; x < UI_LAST_LOAD; ++x)
|
||||
{
|
||||
mui.draw_text_full(container, dats_info[x], origx1, origy1, origx2 - origx1, JUSTIFY_CENTER,
|
||||
WRAP_TRUNCATE, DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr);
|
||||
@ -2119,7 +2119,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
|
||||
mui.draw_text_full(container, snaptext.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER,
|
||||
WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
|
||||
|
||||
draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::curdats_view, MEWUI_FIRST_LOAD, MEWUI_LAST_LOAD, title_size);
|
||||
draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::curdats_view, UI_FIRST_LOAD, UI_LAST_LOAD, title_size);
|
||||
|
||||
if (driver != olddriver || ui_globals::curdats_view != oldview)
|
||||
{
|
||||
@ -2130,14 +2130,14 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
|
||||
totallines = 0;
|
||||
std::vector<std::string> m_item;
|
||||
|
||||
if (ui_globals::curdats_view == MEWUI_GENERAL_LOAD)
|
||||
if (ui_globals::curdats_view == UI_GENERAL_LOAD)
|
||||
general_info(driver, buffer);
|
||||
else if (ui_globals::curdats_view != MEWUI_COMMAND_LOAD)
|
||||
else if (ui_globals::curdats_view != UI_COMMAND_LOAD)
|
||||
machine().datfile().load_data_info(driver, buffer, ui_globals::curdats_view);
|
||||
else
|
||||
machine().datfile().command_sub_menu(driver, m_item);
|
||||
|
||||
if (!m_item.empty() && ui_globals::curdats_view == MEWUI_COMMAND_LOAD)
|
||||
if (!m_item.empty() && ui_globals::curdats_view == UI_COMMAND_LOAD)
|
||||
{
|
||||
for (size_t x = 0; x < m_item.size(); ++x)
|
||||
{
|
||||
@ -2157,7 +2157,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
|
||||
WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
else if (ui_globals::curdats_view != MEWUI_STORY_LOAD && ui_globals::curdats_view != MEWUI_COMMAND_LOAD)
|
||||
else if (ui_globals::curdats_view != UI_STORY_LOAD && ui_globals::curdats_view != UI_COMMAND_LOAD)
|
||||
mui.wrap_text(container, buffer.c_str(), origx1, origy1, origx2 - origx1 - (2.0f * gutter_width), totallines, xstart, xend, text_size);
|
||||
else
|
||||
mui.wrap_text(container, buffer.c_str(), 0.0f, 0.0f, 1.0f - (2.0f * gutter_width), totallines, xstart, xend, text_size);
|
||||
@ -2183,7 +2183,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
|
||||
else if (r == r_visible_lines - 1 && itemline != totallines - 1)
|
||||
info_arrow(1, origx1, origx2, oy1, line_height, text_size, ud_arrow_width);
|
||||
// special case for mamescore
|
||||
else if (ui_globals::curdats_view == MEWUI_STORY_LOAD)
|
||||
else if (ui_globals::curdats_view == UI_STORY_LOAD)
|
||||
{
|
||||
// check size
|
||||
float textlen = mui.get_string_width_ex(tempbuf.c_str(), text_size);
|
||||
@ -2213,13 +2213,13 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
|
||||
}
|
||||
|
||||
// special case for command
|
||||
else if (ui_globals::curdats_view == MEWUI_COMMAND_LOAD || ui_globals::curdats_view == MEWUI_GENERAL_LOAD)
|
||||
else if (ui_globals::curdats_view == UI_COMMAND_LOAD || ui_globals::curdats_view == UI_GENERAL_LOAD)
|
||||
{
|
||||
// check size
|
||||
float textlen = mui.get_string_width_ex(tempbuf.c_str(), text_size);
|
||||
float tmp_size = (textlen > sc) ? text_size * (sc / textlen) : text_size;
|
||||
|
||||
int first_dspace = (ui_globals::curdats_view == MEWUI_COMMAND_LOAD) ? tempbuf.find(" ") : tempbuf.find(":");
|
||||
int first_dspace = (ui_globals::curdats_view == UI_COMMAND_LOAD) ? tempbuf.find(" ") : tempbuf.find(":");
|
||||
if (first_dspace > 0)
|
||||
{
|
||||
float effective_width = origx2 - origx1 - gutter_width;
|
||||
@ -2290,7 +2290,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
|
||||
if (ui_globals::cur_sw_dats_view == 0)
|
||||
{
|
||||
if (soft->startempty == 1)
|
||||
machine().datfile().load_data_info(soft->driver, buffer, MEWUI_HISTORY_LOAD);
|
||||
machine().datfile().load_data_info(soft->driver, buffer, UI_HISTORY_LOAD);
|
||||
else
|
||||
machine().datfile().load_software_info(soft->listname, buffer, soft->shortname, soft->parentname);
|
||||
}
|
||||
@ -2385,7 +2385,7 @@ void ui_menu_select_game::arts_render(void *selectedref, float origx1, float ori
|
||||
{
|
||||
ui_manager &mui = machine().ui();
|
||||
float line_height = mui.get_line_height();
|
||||
bool is_favorites = ((item[0].flags & MENU_FLAG_MEWUI_FAVORITE) != 0);
|
||||
bool is_favorites = ((item[0].flags & MENU_FLAG_UI_FAVORITE) != 0);
|
||||
static ui_software_info *oldsoft = nullptr;
|
||||
static const game_driver *olddriver = nullptr;
|
||||
const game_driver *driver = nullptr;
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
ui/selgame.h
|
||||
|
||||
Main MEWUI menu.
|
||||
Main UI menu.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
ui/selsoft.cpp
|
||||
|
||||
MEWUI softwares menu.
|
||||
UI softwares menu.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -134,7 +134,7 @@ ui_menu_select_software::ui_menu_select_software(running_machine &machine, rende
|
||||
|
||||
ui_globals::curimage_view = SNAPSHOT_VIEW;
|
||||
ui_globals::switch_image = true;
|
||||
ui_globals::cur_sw_dats_view = MEWUI_FIRST_LOAD;
|
||||
ui_globals::cur_sw_dats_view = UI_FIRST_LOAD;
|
||||
|
||||
std::string error_string;
|
||||
machine.options().set_value(OPTION_SOFTWARENAME, "", OPTION_PRIORITY_CMDLINE, error_string);
|
||||
@ -222,14 +222,14 @@ void ui_menu_select_software::handle()
|
||||
}
|
||||
|
||||
// handle UI_UP_FILTER
|
||||
else if (m_event->iptkey == IPT_UI_UP_FILTER && sw_filters::actual > MEWUI_SW_FIRST)
|
||||
else if (m_event->iptkey == IPT_UI_UP_FILTER && sw_filters::actual > UI_SW_FIRST)
|
||||
{
|
||||
l_sw_hover = sw_filters::actual - 1;
|
||||
check_filter = true;
|
||||
}
|
||||
|
||||
// handle UI_DOWN_FILTER
|
||||
else if (m_event->iptkey == IPT_UI_DOWN_FILTER && sw_filters::actual < MEWUI_SW_LAST)
|
||||
else if (m_event->iptkey == IPT_UI_DOWN_FILTER && sw_filters::actual < UI_SW_LAST)
|
||||
{
|
||||
l_sw_hover = sw_filters::actual + 1;
|
||||
check_filter = true;
|
||||
@ -289,14 +289,14 @@ void ui_menu_select_software::handle()
|
||||
check_filter = true;
|
||||
|
||||
// handle UI_UP_FILTER
|
||||
else if (m_event->iptkey == IPT_UI_UP_FILTER && sw_filters::actual > MEWUI_SW_FIRST)
|
||||
else if (m_event->iptkey == IPT_UI_UP_FILTER && sw_filters::actual > UI_SW_FIRST)
|
||||
{
|
||||
l_sw_hover = sw_filters::actual - 1;
|
||||
check_filter = true;
|
||||
}
|
||||
|
||||
// handle UI_DOWN_FILTER
|
||||
else if (m_event->iptkey == IPT_UI_DOWN_FILTER && sw_filters::actual < MEWUI_SW_LAST)
|
||||
else if (m_event->iptkey == IPT_UI_DOWN_FILTER && sw_filters::actual < UI_SW_LAST)
|
||||
{
|
||||
l_sw_hover = sw_filters::actual + 1;
|
||||
check_filter = true;
|
||||
@ -317,27 +317,27 @@ void ui_menu_select_software::handle()
|
||||
|
||||
switch (l_sw_hover)
|
||||
{
|
||||
case MEWUI_SW_REGION:
|
||||
case UI_SW_REGION:
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.region.ui,
|
||||
m_filter.region.actual, SELECTOR_SOFTWARE, l_sw_hover));
|
||||
break;
|
||||
case MEWUI_SW_YEARS:
|
||||
case UI_SW_YEARS:
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.year.ui,
|
||||
m_filter.year.actual, SELECTOR_SOFTWARE, l_sw_hover));
|
||||
break;
|
||||
case MEWUI_SW_LIST:
|
||||
case UI_SW_LIST:
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.swlist.description,
|
||||
m_filter.swlist.actual, SELECTOR_SOFTWARE, l_sw_hover));
|
||||
break;
|
||||
case MEWUI_SW_TYPE:
|
||||
case UI_SW_TYPE:
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.type.ui,
|
||||
m_filter.type.actual, SELECTOR_SOFTWARE, l_sw_hover));
|
||||
break;
|
||||
case MEWUI_SW_PUBLISHERS:
|
||||
case UI_SW_PUBLISHERS:
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.publisher.ui,
|
||||
m_filter.publisher.actual, SELECTOR_SOFTWARE, l_sw_hover));
|
||||
break;
|
||||
case MEWUI_SW_CUSTOM:
|
||||
case UI_SW_CUSTOM:
|
||||
sw_filters::actual = l_sw_hover;
|
||||
ui_menu::stack_push(global_alloc_clear<ui_menu_swcustom_filter>(machine(), container, m_driver, m_filter));
|
||||
break;
|
||||
@ -355,7 +355,7 @@ void ui_menu_select_software::handle()
|
||||
|
||||
void ui_menu_select_software::populate()
|
||||
{
|
||||
UINT32 flags_mewui = MENU_FLAG_MEWUI_SWLIST | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW;
|
||||
UINT32 flags_ui = MENU_FLAG_UI_SWLIST | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW;
|
||||
m_has_empty_start = true;
|
||||
int old_software = -1;
|
||||
|
||||
@ -374,34 +374,34 @@ void ui_menu_select_software::populate()
|
||||
{
|
||||
// if the device can be loaded empty, add an item
|
||||
if (m_has_empty_start)
|
||||
item_append("[Start empty]", nullptr, flags_mewui, (void *)&m_swinfo[0]);
|
||||
item_append("[Start empty]", nullptr, flags_ui, (void *)&m_swinfo[0]);
|
||||
|
||||
m_displaylist.clear();
|
||||
m_tmp.clear();
|
||||
|
||||
switch (sw_filters::actual)
|
||||
{
|
||||
case MEWUI_SW_PUBLISHERS:
|
||||
case UI_SW_PUBLISHERS:
|
||||
build_list(m_tmp, m_filter.publisher.ui[m_filter.publisher.actual].c_str());
|
||||
break;
|
||||
|
||||
case MEWUI_SW_LIST:
|
||||
case UI_SW_LIST:
|
||||
build_list(m_tmp, m_filter.swlist.name[m_filter.swlist.actual].c_str());
|
||||
break;
|
||||
|
||||
case MEWUI_SW_YEARS:
|
||||
case UI_SW_YEARS:
|
||||
build_list(m_tmp, m_filter.year.ui[m_filter.year.actual].c_str());
|
||||
break;
|
||||
|
||||
case MEWUI_SW_TYPE:
|
||||
case UI_SW_TYPE:
|
||||
build_list(m_tmp, m_filter.type.ui[m_filter.type.actual].c_str());
|
||||
break;
|
||||
|
||||
case MEWUI_SW_REGION:
|
||||
case UI_SW_REGION:
|
||||
build_list(m_tmp, m_filter.region.ui[m_filter.region.actual].c_str());
|
||||
break;
|
||||
|
||||
case MEWUI_SW_CUSTOM:
|
||||
case UI_SW_CUSTOM:
|
||||
build_custom();
|
||||
break;
|
||||
|
||||
@ -421,7 +421,7 @@ void ui_menu_select_software::populate()
|
||||
old_software = m_has_empty_start ? curitem + 1 : curitem;
|
||||
|
||||
item_append(m_displaylist[curitem]->longname.c_str(), m_displaylist[curitem]->devicetype.c_str(),
|
||||
m_displaylist[curitem]->parentname.empty() ? flags_mewui : (MENU_FLAG_INVERT | flags_mewui), (void *)m_displaylist[curitem]);
|
||||
m_displaylist[curitem]->parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui), (void *)m_displaylist[curitem]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -431,11 +431,11 @@ void ui_menu_select_software::populate()
|
||||
|
||||
for (int curitem = 0; m_searchlist[curitem] != nullptr; ++curitem)
|
||||
item_append(m_searchlist[curitem]->longname.c_str(), m_searchlist[curitem]->devicetype.c_str(),
|
||||
m_searchlist[curitem]->parentname.empty() ? flags_mewui : (MENU_FLAG_INVERT | flags_mewui),
|
||||
m_searchlist[curitem]->parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui),
|
||||
(void *)m_searchlist[curitem]);
|
||||
}
|
||||
|
||||
item_append(MENU_SEPARATOR_ITEM, nullptr, flags_mewui, nullptr);
|
||||
item_append(MENU_SEPARATOR_ITEM, nullptr, flags_ui, nullptr);
|
||||
|
||||
// configure the custom rendering
|
||||
customtop = 4.0f * machine().ui().get_line_height() + 5.0f * UI_BOX_TB_BORDER;
|
||||
@ -614,15 +614,15 @@ void ui_menu_select_software::custom_render(void *selectedref, float top, float
|
||||
strprintf(tempbuf[0], "MAME %s ( %d / %d softwares )", bare_build_version, vis_item, (int)m_swinfo.size() - 1);
|
||||
tempbuf[1].assign("Driver: \"").append(m_driver->description).append("\" software list ");
|
||||
|
||||
if (sw_filters::actual == MEWUI_SW_REGION && m_filter.region.ui.size() != 0)
|
||||
if (sw_filters::actual == UI_SW_REGION && m_filter.region.ui.size() != 0)
|
||||
filtered.assign("Region: ").append(m_filter.region.ui[m_filter.region.actual]).append(" - ");
|
||||
else if (sw_filters::actual == MEWUI_SW_PUBLISHERS)
|
||||
else if (sw_filters::actual == UI_SW_PUBLISHERS)
|
||||
filtered.assign("Publisher: ").append(m_filter.publisher.ui[m_filter.publisher.actual]).append(" - ");
|
||||
else if (sw_filters::actual == MEWUI_SW_YEARS)
|
||||
else if (sw_filters::actual == UI_SW_YEARS)
|
||||
filtered.assign("Year: ").append(m_filter.year.ui[m_filter.year.actual]).append(" - ");
|
||||
else if (sw_filters::actual == MEWUI_SW_LIST)
|
||||
else if (sw_filters::actual == UI_SW_LIST)
|
||||
filtered.assign("Software List: ").append(m_filter.swlist.description[m_filter.swlist.actual]).append(" - ");
|
||||
else if (sw_filters::actual == MEWUI_SW_TYPE)
|
||||
else if (sw_filters::actual == UI_SW_TYPE)
|
||||
filtered.assign("Device type: ").append(m_filter.type.ui[m_filter.type.actual]).append(" - ");
|
||||
|
||||
tempbuf[2].assign(filtered).append("Search: ").append(m_search).append("_");
|
||||
@ -823,7 +823,7 @@ void ui_menu_select_software::inkey_select(const ui_menu_event *m_event)
|
||||
{
|
||||
std::vector<s_bios> biosname;
|
||||
if (has_multiple_bios(ui_swinfo->driver, biosname) && !mopt.skip_bios_menu())
|
||||
ui_menu::stack_push(global_alloc_clear<ui_mewui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo->driver, false, true));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo->driver, false, true));
|
||||
else
|
||||
{
|
||||
reselect_last::driver = ui_swinfo->driver->name;
|
||||
@ -852,7 +852,7 @@ void ui_menu_select_software::inkey_select(const ui_menu_event *m_event)
|
||||
std::vector<s_bios> biosname;
|
||||
if (!mopt.skip_bios_menu() && has_multiple_bios(ui_swinfo->driver, biosname))
|
||||
{
|
||||
ui_menu::stack_push(global_alloc_clear<ui_mewui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo, true, false));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo, true, false));
|
||||
return;
|
||||
}
|
||||
else if (!mopt.skip_parts_menu() && swinfo->has_multiple_parts(ui_swinfo->interface.c_str()))
|
||||
@ -868,7 +868,7 @@ void ui_menu_select_software::inkey_select(const ui_menu_event *m_event)
|
||||
parts.emplace(swpart->name(), menu_part_name);
|
||||
}
|
||||
}
|
||||
ui_menu::stack_push(global_alloc_clear<ui_mewui_software_parts>(machine(), container, parts, ui_swinfo));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_software_parts>(machine(), container, parts, ui_swinfo));
|
||||
return;
|
||||
}
|
||||
std::string error_string;
|
||||
@ -925,7 +925,7 @@ void ui_menu_select_software::inkey_special(const ui_menu_event *m_event)
|
||||
void ui_menu_select_software::load_sw_custom_filters()
|
||||
{
|
||||
// attempt to open the output file
|
||||
emu_file file(machine().options().mewui_path(), OPEN_FLAG_READ);
|
||||
emu_file file(machine().options().ui_path(), OPEN_FLAG_READ);
|
||||
if (file.open("custom_", m_driver->name, "_filter.ini") == FILERR_NONE)
|
||||
{
|
||||
char buffer[MAX_CHAR_INFO];
|
||||
@ -955,7 +955,7 @@ void ui_menu_select_software::load_sw_custom_filters()
|
||||
if (!strncmp(cb, sw_filters::text[y], strlen(sw_filters::text[y])))
|
||||
{
|
||||
sw_custfltr::other[x] = y;
|
||||
if (y == MEWUI_SW_PUBLISHERS)
|
||||
if (y == UI_SW_PUBLISHERS)
|
||||
{
|
||||
file.gets(buffer, MAX_CHAR_INFO);
|
||||
char *ab = strchr(buffer, '=') + 2;
|
||||
@ -963,7 +963,7 @@ void ui_menu_select_software::load_sw_custom_filters()
|
||||
if (!strncmp(ab, m_filter.publisher.ui[z].c_str(), m_filter.publisher.ui[z].length()))
|
||||
sw_custfltr::mnfct[x] = z;
|
||||
}
|
||||
else if (y == MEWUI_SW_YEARS)
|
||||
else if (y == UI_SW_YEARS)
|
||||
{
|
||||
file.gets(buffer, MAX_CHAR_INFO);
|
||||
char *db = strchr(buffer, '=') + 2;
|
||||
@ -971,7 +971,7 @@ void ui_menu_select_software::load_sw_custom_filters()
|
||||
if (!strncmp(db, m_filter.year.ui[z].c_str(), m_filter.year.ui[z].length()))
|
||||
sw_custfltr::year[x] = z;
|
||||
}
|
||||
else if (y == MEWUI_SW_LIST)
|
||||
else if (y == UI_SW_LIST)
|
||||
{
|
||||
file.gets(buffer, MAX_CHAR_INFO);
|
||||
char *gb = strchr(buffer, '=') + 2;
|
||||
@ -979,7 +979,7 @@ void ui_menu_select_software::load_sw_custom_filters()
|
||||
if (!strncmp(gb, m_filter.swlist.name[z].c_str(), m_filter.swlist.name[z].length()))
|
||||
sw_custfltr::list[x] = z;
|
||||
}
|
||||
else if (y == MEWUI_SW_TYPE)
|
||||
else if (y == UI_SW_TYPE)
|
||||
{
|
||||
file.gets(buffer, MAX_CHAR_INFO);
|
||||
char *fb = strchr(buffer, '=') + 2;
|
||||
@ -987,7 +987,7 @@ void ui_menu_select_software::load_sw_custom_filters()
|
||||
if (!strncmp(fb, m_filter.type.ui[z].c_str(), m_filter.type.ui[z].length()))
|
||||
sw_custfltr::type[x] = z;
|
||||
}
|
||||
else if (y == MEWUI_SW_REGION)
|
||||
else if (y == UI_SW_REGION)
|
||||
{
|
||||
file.gets(buffer, MAX_CHAR_INFO);
|
||||
char *eb = strchr(buffer, '=') + 2;
|
||||
@ -1097,42 +1097,42 @@ void ui_menu_select_software::build_list(std::vector<ui_software_info *> &s_driv
|
||||
{
|
||||
switch (filter)
|
||||
{
|
||||
case MEWUI_SW_PARENTS:
|
||||
case UI_SW_PARENTS:
|
||||
if (s_driver->parentname.empty())
|
||||
m_displaylist.push_back(s_driver);
|
||||
break;
|
||||
|
||||
case MEWUI_SW_CLONES:
|
||||
case UI_SW_CLONES:
|
||||
if (!s_driver->parentname.empty())
|
||||
m_displaylist.push_back(s_driver);
|
||||
break;
|
||||
|
||||
case MEWUI_SW_AVAILABLE:
|
||||
case UI_SW_AVAILABLE:
|
||||
if (s_driver->available)
|
||||
m_displaylist.push_back(s_driver);
|
||||
break;
|
||||
|
||||
case MEWUI_SW_UNAVAILABLE:
|
||||
case UI_SW_UNAVAILABLE:
|
||||
if (!s_driver->available)
|
||||
m_displaylist.push_back(s_driver);
|
||||
break;
|
||||
|
||||
case MEWUI_SW_SUPPORTED:
|
||||
case UI_SW_SUPPORTED:
|
||||
if (s_driver->supported == SOFTWARE_SUPPORTED_YES)
|
||||
m_displaylist.push_back(s_driver);
|
||||
break;
|
||||
|
||||
case MEWUI_SW_PARTIAL_SUPPORTED:
|
||||
case UI_SW_PARTIAL_SUPPORTED:
|
||||
if (s_driver->supported == SOFTWARE_SUPPORTED_PARTIAL)
|
||||
m_displaylist.push_back(s_driver);
|
||||
break;
|
||||
|
||||
case MEWUI_SW_UNSUPPORTED:
|
||||
case UI_SW_UNSUPPORTED:
|
||||
if (s_driver->supported == SOFTWARE_SUPPORTED_NO)
|
||||
m_displaylist.push_back(s_driver);
|
||||
break;
|
||||
|
||||
case MEWUI_SW_REGION:
|
||||
case UI_SW_REGION:
|
||||
{
|
||||
std::string name = m_filter.region.getname(s_driver->longname);
|
||||
|
||||
@ -1141,7 +1141,7 @@ void ui_menu_select_software::build_list(std::vector<ui_software_info *> &s_driv
|
||||
break;
|
||||
}
|
||||
|
||||
case MEWUI_SW_PUBLISHERS:
|
||||
case UI_SW_PUBLISHERS:
|
||||
{
|
||||
std::string name = m_filter.publisher.getname(s_driver->publisher);
|
||||
|
||||
@ -1150,17 +1150,17 @@ void ui_menu_select_software::build_list(std::vector<ui_software_info *> &s_driv
|
||||
break;
|
||||
}
|
||||
|
||||
case MEWUI_SW_YEARS:
|
||||
case UI_SW_YEARS:
|
||||
if(s_driver->year == filter_text)
|
||||
m_displaylist.push_back(s_driver);
|
||||
break;
|
||||
|
||||
case MEWUI_SW_LIST:
|
||||
case UI_SW_LIST:
|
||||
if(s_driver->listname == filter_text)
|
||||
m_displaylist.push_back(s_driver);
|
||||
break;
|
||||
|
||||
case MEWUI_SW_TYPE:
|
||||
case UI_SW_TYPE:
|
||||
if(s_driver->devicetype == filter_text)
|
||||
m_displaylist.push_back(s_driver);
|
||||
break;
|
||||
@ -1228,19 +1228,19 @@ void ui_menu_select_software::build_custom()
|
||||
|
||||
switch (filter)
|
||||
{
|
||||
case MEWUI_SW_YEARS:
|
||||
case UI_SW_YEARS:
|
||||
build_list(s_drivers, m_filter.year.ui[sw_custfltr::year[count]].c_str(), filter);
|
||||
break;
|
||||
case MEWUI_SW_LIST:
|
||||
case UI_SW_LIST:
|
||||
build_list(s_drivers, m_filter.swlist.name[sw_custfltr::list[count]].c_str(), filter);
|
||||
break;
|
||||
case MEWUI_SW_TYPE:
|
||||
case UI_SW_TYPE:
|
||||
build_list(s_drivers, m_filter.type.ui[sw_custfltr::type[count]].c_str(), filter);
|
||||
break;
|
||||
case MEWUI_SW_PUBLISHERS:
|
||||
case UI_SW_PUBLISHERS:
|
||||
build_list(s_drivers, m_filter.publisher.ui[sw_custfltr::mnfct[count]].c_str(), filter);
|
||||
break;
|
||||
case MEWUI_SW_REGION:
|
||||
case UI_SW_REGION:
|
||||
build_list(s_drivers, m_filter.region.ui[sw_custfltr::region[count]].c_str(), filter);
|
||||
break;
|
||||
default:
|
||||
@ -1326,7 +1326,7 @@ float ui_menu_select_software::draw_left_panel(float x1, float y1, float x2, flo
|
||||
container->add_rect(x1, y1, x2, y1 + line_height, bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE));
|
||||
|
||||
float x1t = x1 + text_sign;
|
||||
if (afilter == MEWUI_SW_CUSTOM)
|
||||
if (afilter == UI_SW_CUSTOM)
|
||||
{
|
||||
if (filter == sw_custfltr::main)
|
||||
{
|
||||
@ -1464,7 +1464,7 @@ void ui_menu_select_software::infos_render(void *selectedref, float origx1, floa
|
||||
if (ui_globals::cur_sw_dats_view == 0)
|
||||
{
|
||||
if (soft->startempty == 1)
|
||||
machine().datfile().load_data_info(soft->driver, buffer, MEWUI_HISTORY_LOAD);
|
||||
machine().datfile().load_data_info(soft->driver, buffer, UI_HISTORY_LOAD);
|
||||
else
|
||||
machine().datfile().load_software_info(soft->listname, buffer, soft->shortname, soft->parentname);
|
||||
}
|
||||
@ -1746,7 +1746,7 @@ void ui_menu_select_software::draw_right_panel(void *selectedref, float origx1,
|
||||
// ctor
|
||||
//-------------------------------------------------
|
||||
|
||||
ui_mewui_software_parts::ui_mewui_software_parts(running_machine &machine, render_container *container, std::unordered_map<std::string, std::string> parts, ui_software_info *ui_info) : ui_menu(machine, container)
|
||||
ui_software_parts::ui_software_parts(running_machine &machine, render_container *container, std::unordered_map<std::string, std::string> parts, ui_software_info *ui_info) : ui_menu(machine, container)
|
||||
{
|
||||
m_parts = parts;
|
||||
m_uiinfo = ui_info;
|
||||
@ -1756,7 +1756,7 @@ ui_mewui_software_parts::ui_mewui_software_parts(running_machine &machine, rende
|
||||
// dtor
|
||||
//-------------------------------------------------
|
||||
|
||||
ui_mewui_software_parts::~ui_mewui_software_parts()
|
||||
ui_software_parts::~ui_software_parts()
|
||||
{
|
||||
}
|
||||
|
||||
@ -1764,7 +1764,7 @@ ui_mewui_software_parts::~ui_mewui_software_parts()
|
||||
// populate
|
||||
//-------------------------------------------------
|
||||
|
||||
void ui_mewui_software_parts::populate()
|
||||
void ui_software_parts::populate()
|
||||
{
|
||||
for (auto & elem : m_parts)
|
||||
item_append(elem.first.c_str(), elem.second.c_str(), 0, (void *)&elem);
|
||||
@ -1777,7 +1777,7 @@ void ui_mewui_software_parts::populate()
|
||||
// handle
|
||||
//-------------------------------------------------
|
||||
|
||||
void ui_mewui_software_parts::handle()
|
||||
void ui_software_parts::handle()
|
||||
{
|
||||
// process the menu
|
||||
const ui_menu_event *event = process(0);
|
||||
@ -1807,7 +1807,7 @@ void ui_mewui_software_parts::handle()
|
||||
// perform our special rendering
|
||||
//-------------------------------------------------
|
||||
|
||||
void ui_mewui_software_parts::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
|
||||
void ui_software_parts::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
|
||||
{
|
||||
float width;
|
||||
ui_manager &mui = machine().ui();
|
||||
@ -1839,7 +1839,7 @@ void ui_mewui_software_parts::custom_render(void *selectedref, float top, float
|
||||
// ctor
|
||||
//-------------------------------------------------
|
||||
|
||||
ui_mewui_bios_selection::ui_mewui_bios_selection(running_machine &machine, render_container *container, std::vector<s_bios> biosname, void *_driver, bool _software, bool _inlist) : ui_menu(machine, container)
|
||||
ui_bios_selection::ui_bios_selection(running_machine &machine, render_container *container, std::vector<s_bios> biosname, void *_driver, bool _software, bool _inlist) : ui_menu(machine, container)
|
||||
{
|
||||
m_bios = biosname;
|
||||
m_driver = _driver;
|
||||
@ -1851,7 +1851,7 @@ ui_mewui_bios_selection::ui_mewui_bios_selection(running_machine &machine, rende
|
||||
// dtor
|
||||
//-------------------------------------------------
|
||||
|
||||
ui_mewui_bios_selection::~ui_mewui_bios_selection()
|
||||
ui_bios_selection::~ui_bios_selection()
|
||||
{
|
||||
}
|
||||
|
||||
@ -1859,7 +1859,7 @@ ui_mewui_bios_selection::~ui_mewui_bios_selection()
|
||||
// populate
|
||||
//-------------------------------------------------
|
||||
|
||||
void ui_mewui_bios_selection::populate()
|
||||
void ui_bios_selection::populate()
|
||||
{
|
||||
for (auto & elem : m_bios)
|
||||
item_append(elem.name.c_str(), nullptr, 0, (void *)&elem.name);
|
||||
@ -1872,7 +1872,7 @@ void ui_mewui_bios_selection::populate()
|
||||
// handle
|
||||
//-------------------------------------------------
|
||||
|
||||
void ui_mewui_bios_selection::handle()
|
||||
void ui_bios_selection::handle()
|
||||
{
|
||||
// process the menu
|
||||
const ui_menu_event *event = process(0);
|
||||
@ -1922,7 +1922,7 @@ void ui_mewui_bios_selection::handle()
|
||||
parts.emplace(swpart->name(), menu_part_name);
|
||||
}
|
||||
}
|
||||
ui_menu::stack_push(global_alloc_clear<ui_mewui_software_parts>(machine(), container, parts, ui_swinfo));
|
||||
ui_menu::stack_push(global_alloc_clear<ui_software_parts>(machine(), container, parts, ui_swinfo));
|
||||
return;
|
||||
}
|
||||
std::string error_string;
|
||||
@ -1945,7 +1945,7 @@ void ui_mewui_bios_selection::handle()
|
||||
// perform our special rendering
|
||||
//-------------------------------------------------
|
||||
|
||||
void ui_mewui_bios_selection::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
|
||||
void ui_bios_selection::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
|
||||
{
|
||||
float width;
|
||||
ui_manager &mui = machine().ui();
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
ui/selsoft.h
|
||||
|
||||
MEWUI softwares menu.
|
||||
UI softwares menu.
|
||||
|
||||
***************************************************************************/
|
||||
#pragma once
|
||||
@ -64,11 +64,11 @@ private:
|
||||
void inkey_special(const ui_menu_event *menu_event);
|
||||
};
|
||||
|
||||
class ui_mewui_software_parts : public ui_menu
|
||||
class ui_software_parts : public ui_menu
|
||||
{
|
||||
public:
|
||||
ui_mewui_software_parts(running_machine &machine, render_container *container, std::unordered_map<std::string, std::string> parts, ui_software_info *ui_info);
|
||||
virtual ~ui_mewui_software_parts();
|
||||
ui_software_parts(running_machine &machine, render_container *container, std::unordered_map<std::string, std::string> parts, ui_software_info *ui_info);
|
||||
virtual ~ui_software_parts();
|
||||
virtual void populate() override;
|
||||
virtual void handle() override;
|
||||
virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
|
||||
@ -78,11 +78,11 @@ private:
|
||||
std::unordered_map<std::string, std::string> m_parts;
|
||||
};
|
||||
|
||||
class ui_mewui_bios_selection : public ui_menu
|
||||
class ui_bios_selection : public ui_menu
|
||||
{
|
||||
public:
|
||||
ui_mewui_bios_selection(running_machine &machine, render_container *container, std::vector<s_bios> biosname, void *driver, bool software, bool inlist);
|
||||
virtual ~ui_mewui_bios_selection();
|
||||
ui_bios_selection(running_machine &machine, render_container *container, std::vector<s_bios> biosname, void *driver, bool software, bool inlist);
|
||||
virtual ~ui_bios_selection();
|
||||
virtual void populate() override;
|
||||
virtual void handle() override;
|
||||
virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
|
||||
|
@ -247,4 +247,4 @@ static const UINT32 toolbar_bitmap_bmp[][1024] = {
|
||||
}
|
||||
};
|
||||
|
||||
#define MEWUI_TOOLBAR_BUTTONS ARRAY_LENGTH(toolbar_bitmap_bmp)
|
||||
#define UI_TOOLBAR_BUTTONS ARRAY_LENGTH(toolbar_bitmap_bmp)
|
||||
|
@ -2563,9 +2563,10 @@ void ui_manager::set_use_natural_keyboard(bool use_natural_keyboard)
|
||||
assert(error.empty());
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
* MEWUI
|
||||
*********************************************/
|
||||
//-------------------------------------------------
|
||||
// wrap_text
|
||||
//-------------------------------------------------
|
||||
|
||||
void ui_manager::wrap_text(render_container *container, const char *origs, float x, float y, float origwrapwidth, int &count, std::vector<int> &xstart, std::vector<int> &xend, float text_size)
|
||||
{
|
||||
float lineheight = get_line_height() * text_size;
|
||||
|
@ -168,7 +168,7 @@ public:
|
||||
// other
|
||||
void process_natural_keyboard();
|
||||
|
||||
// MEWUI word wrap
|
||||
// word wrap
|
||||
void wrap_text(render_container *container, const char *origs, float x, float y, float origwrapwidth, int &totallines, std::vector<int> &xstart, std::vector<int> &xend, float text_size = 1.0f);
|
||||
|
||||
// draw an outlined box with given line color and filled with a texture
|
||||
|
@ -12,8 +12,8 @@
|
||||
#include "ui/utils.h"
|
||||
#include <algorithm>
|
||||
|
||||
extern const char MEWUI_VERSION_TAG[];
|
||||
const char MEWUI_VERSION_TAG[] = "# UI INFO ";
|
||||
extern const char UI_VERSION_TAG[];
|
||||
const char UI_VERSION_TAG[] = "# UI INFO ";
|
||||
|
||||
// Years index
|
||||
UINT16 c_year::actual = 0;
|
||||
|
@ -95,35 +95,35 @@ enum
|
||||
|
||||
enum
|
||||
{
|
||||
MEWUI_FIRST_LOAD = 0,
|
||||
MEWUI_GENERAL_LOAD = MEWUI_FIRST_LOAD,
|
||||
MEWUI_HISTORY_LOAD,
|
||||
MEWUI_MAMEINFO_LOAD,
|
||||
MEWUI_SYSINFO_LOAD,
|
||||
MEWUI_MESSINFO_LOAD,
|
||||
MEWUI_COMMAND_LOAD,
|
||||
MEWUI_STORY_LOAD,
|
||||
MEWUI_LAST_LOAD = MEWUI_STORY_LOAD
|
||||
UI_FIRST_LOAD = 0,
|
||||
UI_GENERAL_LOAD = UI_FIRST_LOAD,
|
||||
UI_HISTORY_LOAD,
|
||||
UI_MAMEINFO_LOAD,
|
||||
UI_SYSINFO_LOAD,
|
||||
UI_MESSINFO_LOAD,
|
||||
UI_COMMAND_LOAD,
|
||||
UI_STORY_LOAD,
|
||||
UI_LAST_LOAD = UI_STORY_LOAD
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
MEWUI_SW_FIRST = 0,
|
||||
MEWUI_SW_ALL = MEWUI_SW_FIRST,
|
||||
MEWUI_SW_AVAILABLE,
|
||||
MEWUI_SW_UNAVAILABLE,
|
||||
MEWUI_SW_PARENTS,
|
||||
MEWUI_SW_CLONES,
|
||||
MEWUI_SW_YEARS,
|
||||
MEWUI_SW_PUBLISHERS,
|
||||
MEWUI_SW_SUPPORTED,
|
||||
MEWUI_SW_PARTIAL_SUPPORTED,
|
||||
MEWUI_SW_UNSUPPORTED,
|
||||
MEWUI_SW_REGION,
|
||||
MEWUI_SW_TYPE,
|
||||
MEWUI_SW_LIST,
|
||||
MEWUI_SW_CUSTOM,
|
||||
MEWUI_SW_LAST = MEWUI_SW_CUSTOM
|
||||
UI_SW_FIRST = 0,
|
||||
UI_SW_ALL = UI_SW_FIRST,
|
||||
UI_SW_AVAILABLE,
|
||||
UI_SW_UNAVAILABLE,
|
||||
UI_SW_PARENTS,
|
||||
UI_SW_CLONES,
|
||||
UI_SW_YEARS,
|
||||
UI_SW_PUBLISHERS,
|
||||
UI_SW_SUPPORTED,
|
||||
UI_SW_PARTIAL_SUPPORTED,
|
||||
UI_SW_UNSUPPORTED,
|
||||
UI_SW_REGION,
|
||||
UI_SW_TYPE,
|
||||
UI_SW_LIST,
|
||||
UI_SW_CUSTOM,
|
||||
UI_SW_LAST = UI_SW_CUSTOM
|
||||
};
|
||||
|
||||
enum
|
||||
@ -146,7 +146,7 @@ enum
|
||||
HOVER_FILTER_FIRST,
|
||||
HOVER_FILTER_LAST = (HOVER_FILTER_FIRST) + 1 + FILTER_LAST,
|
||||
HOVER_SW_FILTER_FIRST,
|
||||
HOVER_SW_FILTER_LAST = (HOVER_SW_FILTER_FIRST) + 1 + MEWUI_SW_LAST,
|
||||
HOVER_SW_FILTER_LAST = (HOVER_SW_FILTER_FIRST) + 1 + UI_SW_LAST,
|
||||
HOVER_RP_FIRST,
|
||||
HOVER_RP_LAST = (HOVER_RP_FIRST) + 1 + RP_LAST
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user