Previous | 199869 Revisions | Next |
r44665 Thursday 4th February, 2016 at 14:14:26 UTC by Miodrag Milanović |
---|
some MEWUI to UI renames (nw) |
[src/emu/drivers] | empty.cpp |
[src/emu/ui] | auditmenu.cpp auditmenu.h cmddata.h cmdrender.h ctrlmenu.cpp ctrlmenu.h custmenu.cpp custmenu.h custui.cpp custui.h datfile.cpp datfile.h datmenu.cpp datmenu.h dirmenu.cpp dirmenu.h dsplmenu.cpp dsplmenu.h icorender.h inifile.cpp inifile.h moptions.cpp moptions.h optsmenu.cpp optsmenu.h selector.cpp selector.h selgame.cpp selgame.h selsoft.cpp selsoft.h sndmenu.cpp sndmenu.h utils.cpp utils.h |
r253176 | r253177 | |
---|---|---|
29 | 29 | virtual void machine_start() override |
30 | 30 | { |
31 | 31 | // force the UI to show the game select screen |
32 | ui_me | |
32 | ui_menu_select_game::force_game_select(machine(), &machine().render().ui_container()); | |
33 | 33 | } |
34 | 34 | |
35 | 35 | UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /********************************************************************* |
4 | 4 | |
5 | | |
5 | ui/auditmenu.cpp | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | *********************************************************************/ |
10 | 10 |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/auditmenu.h | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | ***************************************************************************/ |
10 | 10 | |
11 | 11 | #pragma once |
12 | 12 | |
13 | #ifndef __MEWUI_AUDIT_H__ | |
14 | #define __MEWUI_AUDIT_H__ | |
13 | #ifndef __UI_AUDIT_H__ | |
14 | #define __UI_AUDIT_H__ | |
15 | 15 | |
16 | 16 | //------------------------------------------------- |
17 | 17 | // class audit menu |
r253176 | r253177 | |
34 | 34 | bool m_first; |
35 | 35 | }; |
36 | 36 | |
37 | #endif /* __ | |
37 | #endif /* __UI_AUDIT_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /********************************************************************* |
4 | 4 | |
5 | | |
5 | ui/cmddata.h | |
6 | 6 | |
7 | 7 | *********************************************************************/ |
8 | 8 | #pragma once |
9 | 9 | |
10 | #ifndef __MEWUI_CMDDATA_H__ | |
11 | #define __MEWUI_CMDDATA_H__ | |
10 | #ifndef __UI_CMDDATA_H__ | |
11 | #define __UI_CMDDATA_H__ | |
12 | 12 | |
13 | 13 | #define BUTTON_COLOR_RED rgb_t(255,64,64) |
14 | 14 | #define BUTTON_COLOR_YELLOW rgb_t(255,238,0) |
r253176 | r253177 | |
401 | 401 | { 0, 0 } // end of array |
402 | 402 | }; |
403 | 403 | |
404 | #endif /* __ | |
404 | #endif /* __UI_CMDDATA_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/cmdrender.h | |
6 | 6 | |
7 | 7 | MEWUI rendfont. |
8 | 8 |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /********************************************************************* |
4 | 4 | |
5 | | |
5 | ui/ctrlmenu.cpp | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | *********************************************************************/ |
10 | 10 |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/ctrlmenu.h | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | ***************************************************************************/ |
10 | 10 | #pragma once |
11 | 11 | |
12 | #ifndef __MEWUI_CTRLMENU_H__ | |
13 | #define __MEWUI_CTRLMENU_H__ | |
12 | #ifndef __UI_CTRLMENU_H__ | |
13 | #define __UI_CTRLMENU_H__ | |
14 | 14 | |
15 | 15 | //------------------------------------------------- |
16 | 16 | // class controller mapping menu |
r253176 | r253177 | |
38 | 38 | int check_status(const char *status, const char *option); |
39 | 39 | }; |
40 | 40 | |
41 | #endif /* __ | |
41 | #endif /* __UI_CTRLMENU_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /********************************************************************* |
4 | 4 | |
5 | | |
5 | ui/custmenu.cpp | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | *********************************************************************/ |
10 | 10 |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/custmenu.h | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | |
10 | 10 | ***************************************************************************/ |
11 | 11 | |
12 | 12 | #pragma once |
13 | 13 | |
14 | #ifndef __MEWUI_CUSTMENU_H__ | |
15 | #define __MEWUI_CUSTMENU_H__ | |
14 | #ifndef __UI_CUSTMENU_H__ | |
15 | #define __UI_CUSTMENU_H__ | |
16 | 16 | |
17 | 17 | #include "ui/utils.h" |
18 | 18 | |
r253176 | r253177 | |
128 | 128 | void save_custom_filters(); |
129 | 129 | }; |
130 | 130 | |
131 | #endif /* __ | |
131 | #endif /* __UI_CUSTMENU_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /********************************************************************* |
4 | 4 | |
5 | | |
5 | ui/custui.cpp | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | *********************************************************************/ |
10 | 10 | |
r253176 | r253177 | |
141 | 141 | ui_menu_font_ui::ui_menu_font_ui(running_machine &machine, render_container *container) : ui_menu(machine, container) |
142 | 142 | { |
143 | 143 | emu_options &moptions = machine.options(); |
144 | #ifdef | |
144 | #ifdef OSD_WINDOWS | |
145 | 145 | |
146 | 146 | std::string name(moptions.ui_font()); |
147 | 147 | list(); |
r253176 | r253177 | |
180 | 180 | |
181 | 181 | } |
182 | 182 | |
183 | #ifdef | |
183 | #ifdef OSD_WINDOWS | |
184 | 184 | //------------------------------------------------- |
185 | 185 | // fonts enumerator CALLBACK |
186 | 186 | //------------------------------------------------- |
r253176 | r253177 | |
227 | 227 | std::string error_string; |
228 | 228 | emu_options &moptions = machine().options(); |
229 | 229 | |
230 | #ifdef | |
230 | #ifdef OSD_WINDOWS | |
231 | 231 | std::string name(m_fonts[m_actual]); |
232 | 232 | if (m_fonts[m_actual] != "default") |
233 | 233 | { |
r253176 | r253177 | |
273 | 273 | } |
274 | 274 | break; |
275 | 275 | |
276 | #ifdef | |
276 | #ifdef OSD_WINDOWS | |
277 | 277 | |
278 | 278 | case MUI_FNT: |
279 | 279 | if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT) |
r253176 | r253177 | |
313 | 313 | UINT32 arrow_flags; |
314 | 314 | std::string tmptxt; |
315 | 315 | |
316 | #ifdef | |
316 | #ifdef OSD_WINDOWS | |
317 | 317 | // add fonts option |
318 | 318 | arrow_flags = get_arrow_flags(0, m_fonts.size() - 1, m_actual); |
319 | 319 | std::string name(m_fonts[m_actual]); |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/custui.h | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | ***************************************************************************/ |
10 | 10 | |
11 | 11 | #pragma once |
12 | 12 | |
13 | #ifndef __MEWUI_CUSTUI_H__ | |
14 | #define __MEWUI_CUSTUI_H__ | |
13 | #ifndef __UI_CUSTUI_H__ | |
14 | #define __UI_CUSTUI_H__ | |
15 | 15 | |
16 | #ifdef | |
16 | #ifdef OSD_WINDOWS | |
17 | 17 | #define WIN32_LEAN_AND_MEAN |
18 | 18 | #include <windows.h> |
19 | 19 | #endif |
r253176 | r253177 | |
64 | 64 | MUI_ITALIC |
65 | 65 | }; |
66 | 66 | |
67 | #ifdef | |
67 | #ifdef OSD_WINDOWS | |
68 | 68 | UINT16 m_actual; |
69 | 69 | std::vector<std::string> m_fonts; |
70 | 70 | bool m_bold, m_italic; |
r253176 | r253177 | |
179 | 179 | rgb_t &m_original; |
180 | 180 | }; |
181 | 181 | |
182 | #endif /* __ | |
182 | #endif /* __UI_CUSTUI_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/datfile.cpp | |
6 | 6 | |
7 | 7 | MEWUI DATs manager. |
8 | 8 |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/datfile.h | |
6 | 6 | |
7 | 7 | MEWUI DATs manager. |
8 | 8 | |
r253176 | r253177 | |
10 | 10 | |
11 | 11 | #pragma once |
12 | 12 | |
13 | #ifndef __MEWUI_DATFILE_H__ | |
14 | #define __MEWUI_DATFILE_H__ | |
13 | #ifndef __UI_DATFILE_H__ | |
14 | #define __UI_DATFILE_H__ | |
15 | 15 | |
16 | 16 | //------------------------------------------------- |
17 | 17 | // Datafile Manager |
r253176 | r253177 | |
76 | 76 | }; |
77 | 77 | |
78 | 78 | |
79 | #endif /* __ | |
79 | #endif /* __UI_DATFILE_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /********************************************************************* |
4 | 4 | |
5 | | |
5 | ui/datmenu.cpp | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | *********************************************************************/ |
10 | 10 |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/datmenu.h | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | |
10 | 10 | ***************************************************************************/ |
11 | 11 | |
12 | 12 | #pragma once |
13 | 13 | |
14 | #ifndef __MEWUI_DATMENU_H__ | |
15 | #define __MEWUI_DATMENU_H__ | |
14 | #ifndef __UI_DATMENU_H__ | |
15 | #define __UI_DATMENU_H__ | |
16 | 16 | |
17 | 17 | struct ui_software_info; |
18 | 18 | |
r253176 | r253177 | |
90 | 90 | const game_driver *m_driver; |
91 | 91 | }; |
92 | 92 | |
93 | #endif /* __ | |
93 | #endif /* __UI_DATMENU_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /********************************************************************* |
4 | 4 | |
5 | | |
5 | ui/dirmenu.cpp | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | *********************************************************************/ |
10 | 10 |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/dirmenu.h | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | ***************************************************************************/ |
10 | 10 | |
11 | 11 | #pragma once |
12 | 12 | |
13 | #ifndef __MEWUI_DIRMENU_H__ | |
14 | #define __MEWUI_DIRMENU_H__ | |
13 | #ifndef __UI_DIRMENU_H__ | |
14 | #define __UI_DIRMENU_H__ | |
15 | 15 | |
16 | 16 | //------------------------------------------------- |
17 | 17 | // class directory menu |
r253176 | r253177 | |
125 | 125 | bool m_change; |
126 | 126 | }; |
127 | 127 | |
128 | #endif /* __ | |
128 | #endif /* __UI_DIRMENU_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /********************************************************************* |
4 | 4 | |
5 | | |
5 | ui/dsplmenu.cpp | |
6 | 6 | |
7 | 7 | MEWUI video options menu. |
8 | 8 | |
r253176 | r253177 | |
15 | 15 | #include "ui/selector.h" |
16 | 16 | #include "ui/utils.h" |
17 | 17 | |
18 | #if defined( | |
18 | #if defined(OSD_WINDOWS) && !defined(OSD_SDL) | |
19 | 19 | #include "../osd/windows/winmain.h" |
20 | 20 | #else |
21 | 21 | #include "../osd/modules/lib/osdobj_common.h" |
r253176 | r253177 | |
24 | 24 | ui_menu_display_options::video_modes ui_menu_display_options::m_video[] = { |
25 | 25 | { "auto", "Auto" }, |
26 | 26 | { "opengl", "OpenGL" }, |
27 | #if defined( | |
27 | #if defined(OSD_WINDOWS) && !defined(OSD_SDL) | |
28 | 28 | { "d3d", "Direct3D" }, |
29 | 29 | { "gdi", "GDI" }, |
30 | 30 | { "ddraw", "DirectDraw" } |
r253176 | r253177 | |
37 | 37 | ui_menu_display_options::dspl_option ui_menu_display_options::m_options[] = { |
38 | 38 | { 0, nullptr, nullptr }, |
39 | 39 | { 0, "Video Mode", OSDOPTION_VIDEO }, |
40 | #if defined( | |
40 | #if defined(OSD_WINDOWS) && !defined(OSD_SDL) | |
41 | 41 | { 0, "Hardware Stretch", WINOPTION_HWSTRETCH }, |
42 | 42 | { 0, "Triple Buffering", WINOPTION_TRIPLEBUFFER }, |
43 | 43 | { 0, "HLSL", WINOPTION_HLSL_ENABLE }, |
r253176 | r253177 | |
60 | 60 | |
61 | 61 | ui_menu_display_options::ui_menu_display_options(running_machine &machine, render_container *container) : ui_menu(machine, container) |
62 | 62 | { |
63 | #if defined( | |
63 | #if defined(OSD_WINDOWS) && !defined(OSD_SDL) | |
64 | 64 | windows_options &options = downcast<windows_options &>(machine.options()); |
65 | 65 | #else |
66 | 66 | osd_options &options = downcast<osd_options &>(machine.options()); |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/dsplmenu.h | |
6 | 6 | |
7 | 7 | MEWUI video options menu. |
8 | 8 | |
r253176 | r253177 | |
10 | 10 | |
11 | 11 | #pragma once |
12 | 12 | |
13 | #ifndef __MEWUI_DSPLMENU_H__ | |
14 | #define __MEWUI_DSPLMENU_H__ | |
13 | #ifndef __UI_DSPLMENU_H__ | |
14 | #define __UI_DSPLMENU_H__ | |
15 | 15 | |
16 | 16 | //------------------------------------------------- |
17 | 17 | // class display options menu |
r253176 | r253177 | |
43 | 43 | static dspl_option m_options[]; |
44 | 44 | }; |
45 | 45 | |
46 | #endif /* __ | |
46 | #endif /* __UI_DSPLMENU_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890;Victor Laskin |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/icorender.h | |
6 | 6 | |
7 | 7 | ICOns file loader. |
8 | 8 | |
r253176 | r253177 | |
14 | 14 | ***************************************************************************/ |
15 | 15 | #pragma once |
16 | 16 | |
17 | #ifndef __MEWUI_ICORENDER_H__ | |
18 | #define __MEWUI_ICORENDER_H__ | |
17 | #ifndef __UI_ICORENDER_H__ | |
18 | #define __UI_ICORENDER_H__ | |
19 | 19 | |
20 | 20 | // These next two structs represent how the icon information is stored |
21 | 21 | // in an ICO file. |
r253176 | r253177 | |
232 | 232 | global_free_array(buffer); |
233 | 233 | } |
234 | 234 | |
235 | #endif /* __ | |
235 | #endif /* __UI_ICORENDER_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/inifile.cpp | |
6 | 6 | |
7 | 7 | MEWUI INIs file manager. |
8 | 8 |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/inifile.h | |
6 | 6 | |
7 | 7 | MEWUI INIs file manager. |
8 | 8 | |
r253176 | r253177 | |
10 | 10 | |
11 | 11 | #pragma once |
12 | 12 | |
13 | #ifndef __MEWUI_INIFILE_H__ | |
14 | #define __MEWUI_INIFILE_H__ | |
13 | #ifndef __UI_INIFILE_H__ | |
14 | #define __UI_INIFILE_H__ | |
15 | 15 | |
16 | 16 | #include "ui/utils.h" |
17 | 17 | |
r253176 | r253177 | |
119 | 119 | running_machine &m_machine; // reference to our machine |
120 | 120 | }; |
121 | 121 | |
122 | #endif /* __ | |
122 | #endif /* __UI_INIFILE_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/moptions.c | |
6 | 6 | |
7 | 7 | MEWUI main options manager. |
8 | 8 |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/moptions.h | |
6 | 6 | |
7 | 7 | MEWUI main options manager. |
8 | 8 | |
r253176 | r253177 | |
10 | 10 | |
11 | 11 | #pragma once |
12 | 12 | |
13 | #ifndef __MEWUI_OPTS_H__ | |
14 | #define __MEWUI_OPTS_H__ | |
13 | #ifndef __UI_OPTS_H__ | |
14 | #define __UI_OPTS_H__ | |
15 | 15 | |
16 | 16 | #include "options.h" |
17 | 17 | |
r253176 | r253177 | |
137 | 137 | static const options_entry s_option_entries[]; |
138 | 138 | }; |
139 | 139 | |
140 | #endif /* __ | |
140 | #endif /* __UI_OPTS_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /********************************************************************* |
4 | 4 | |
5 | | |
5 | ui/optsmenu.cpp | |
6 | 6 | |
7 | 7 | MEWUI main options menu manager. |
8 | 8 |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/optsmenu.h | |
6 | 6 | |
7 | 7 | MEWUI main options menu manager. |
8 | 8 | |
r253176 | r253177 | |
10 | 10 | |
11 | 11 | #pragma once |
12 | 12 | |
13 | #ifndef __MEWUI_OPTSMENU_H__ | |
14 | #define __MEWUI_OPTSMENU_H__ | |
13 | #ifndef __UI_OPTSMENU_H__ | |
14 | #define __UI_OPTSMENU_H__ | |
15 | 15 | |
16 | 16 | class ui_menu_game_options : public ui_menu |
17 | 17 | { |
r253176 | r253177 | |
46 | 46 | // save options to file |
47 | 47 | void save_game_options(running_machine &machine); |
48 | 48 | |
49 | #endif /* __ | |
49 | #endif /* __UI_OPTSMENU_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /********************************************************************* |
4 | 4 | |
5 | | |
5 | ui/m_selector.cpp | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | *********************************************************************/ |
10 | 10 |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/selector.h | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | ***************************************************************************/ |
10 | 10 | |
11 | 11 | #pragma once |
12 | 12 | |
13 | #ifndef __MEWUI_SELECTOR_H__ | |
14 | #define __MEWUI_SELECTOR_H__ | |
13 | #ifndef __UI_SELECTOR_H__ | |
14 | #define __UI_SELECTOR_H__ | |
15 | 15 | |
16 | 16 | enum |
17 | 17 | { |
r253176 | r253177 | |
48 | 48 | void find_matches(const char *str); |
49 | 49 | }; |
50 | 50 | |
51 | #endif /* __ | |
51 | #endif /* __UI_SELECTOR_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /********************************************************************* |
4 | 4 | |
5 | | |
5 | ui/selgame.cpp | |
6 | 6 | |
7 | 7 | Main MEWUI menu. |
8 | 8 | |
r253176 | r253177 | |
105 | 105 | // ctor |
106 | 106 | //------------------------------------------------- |
107 | 107 | |
108 | ui_me | |
108 | ui_menu_select_game::ui_menu_select_game(running_machine &machine, render_container *container, const char *gamename) : ui_menu(machine, container) | |
109 | 109 | { |
110 | 110 | std::string error_string, last_filter, sub_filter; |
111 | 111 | emu_options &moptions = machine.options(); |
r253176 | r253177 | |
181 | 181 | // dtor |
182 | 182 | //------------------------------------------------- |
183 | 183 | |
184 | ui_me | |
184 | ui_menu_select_game::~ui_menu_select_game() | |
185 | 185 | { |
186 | 186 | std::string error_string, last_driver; |
187 | 187 | const game_driver *driver = nullptr; |
r253176 | r253177 | |
217 | 217 | // handle |
218 | 218 | //------------------------------------------------- |
219 | 219 | |
220 | void ui_me | |
220 | void ui_menu_select_game::handle() | |
221 | 221 | { |
222 | 222 | bool check_filter = false; |
223 | 223 | bool enabled_dats = machine().options().enabled_dats(); |
r253176 | r253177 | |
545 | 545 | // populate |
546 | 546 | //------------------------------------------------- |
547 | 547 | |
548 | void ui_me | |
548 | void ui_menu_select_game::populate() | |
549 | 549 | { |
550 | 550 | mewui_globals::redraw_icon = true; |
551 | 551 | mewui_globals::switch_image = true; |
r253176 | r253177 | |
684 | 684 | // build a list of available drivers |
685 | 685 | //------------------------------------------------- |
686 | 686 | |
687 | void ui_me | |
687 | void ui_menu_select_game::build_available_list() | |
688 | 688 | { |
689 | 689 | int m_total = driver_list::total(); |
690 | 690 | std::vector<bool> m_included(m_total, false); |
r253176 | r253177 | |
744 | 744 | // perform our special rendering |
745 | 745 | //------------------------------------------------- |
746 | 746 | |
747 | void ui_me | |
747 | void ui_menu_select_game::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) | |
748 | 748 | { |
749 | 749 | const game_driver *driver = nullptr; |
750 | 750 | ui_software_info *swinfo = nullptr; |
r253176 | r253177 | |
980 | 980 | // and inescapable |
981 | 981 | //------------------------------------------------- |
982 | 982 | |
983 | void ui_me | |
983 | void ui_menu_select_game::force_game_select(running_machine &machine, render_container *container) | |
984 | 984 | { |
985 | 985 | // reset the menu stack |
986 | 986 | ui_menu::stack_reset(machine); |
r253176 | r253177 | |
989 | 989 | ui_menu *quit = global_alloc_clear<ui_menu_quit_game>(machine, container); |
990 | 990 | quit->set_special_main_menu(true); |
991 | 991 | ui_menu::stack_push(quit); |
992 | ui_menu::stack_push(global_alloc_clear<ui_me | |
992 | ui_menu::stack_push(global_alloc_clear<ui_menu_select_game>(machine, container, nullptr)); | |
993 | 993 | |
994 | 994 | // force the menus on |
995 | 995 | machine.ui().show_menu(); |
r253176 | r253177 | |
1002 | 1002 | // handle select key event |
1003 | 1003 | //------------------------------------------------- |
1004 | 1004 | |
1005 | void ui_me | |
1005 | void ui_menu_select_game::inkey_select(const ui_menu_event *m_event) | |
1006 | 1006 | { |
1007 | 1007 | const game_driver *driver = (const game_driver *)m_event->itemref; |
1008 | 1008 | |
r253176 | r253177 | |
1061 | 1061 | // handle select key event for favorites menu |
1062 | 1062 | //------------------------------------------------- |
1063 | 1063 | |
1064 | void ui_me | |
1064 | void ui_menu_select_game::inkey_select_favorite(const ui_menu_event *m_event) | |
1065 | 1065 | { |
1066 | 1066 | ui_software_info *ui_swinfo = (ui_software_info *)m_event->itemref; |
1067 | 1067 | emu_options &mopt = machine().options(); |
r253176 | r253177 | |
1166 | 1166 | // returns if the search can be activated |
1167 | 1167 | //------------------------------------------------- |
1168 | 1168 | |
1169 | inline bool ui_me | |
1169 | inline bool ui_menu_select_game::no_active_search() | |
1170 | 1170 | { |
1171 | 1171 | return (main_filters::actual == FILTER_FAVORITE_GAME); |
1172 | 1172 | } |
r253176 | r253177 | |
1175 | 1175 | // handle special key event |
1176 | 1176 | //------------------------------------------------- |
1177 | 1177 | |
1178 | void ui_me | |
1178 | void ui_menu_select_game::inkey_special(const ui_menu_event *m_event) | |
1179 | 1179 | { |
1180 | 1180 | int buflen = strlen(m_search); |
1181 | 1181 | |
r253176 | r253177 | |
1214 | 1214 | // build list |
1215 | 1215 | //------------------------------------------------- |
1216 | 1216 | |
1217 | void ui_me | |
1217 | void ui_menu_select_game::build_list(std::vector<const game_driver *> &s_drivers, const char *filter_text, int filter, bool bioscheck) | |
1218 | 1218 | { |
1219 | 1219 | int cx = 0; |
1220 | 1220 | bool cloneof = false; |
r253176 | r253177 | |
1330 | 1330 | // build custom display list |
1331 | 1331 | //------------------------------------------------- |
1332 | 1332 | |
1333 | void ui_me | |
1333 | void ui_menu_select_game::build_custom() | |
1334 | 1334 | { |
1335 | 1335 | std::vector<const game_driver *> s_drivers; |
1336 | 1336 | bool bioscheck = false; |
r253176 | r253177 | |
1395 | 1395 | // build category list |
1396 | 1396 | //------------------------------------------------- |
1397 | 1397 | |
1398 | void ui_me | |
1398 | void ui_menu_select_game::build_category() | |
1399 | 1399 | { |
1400 | 1400 | std::vector<int> temp_filter; |
1401 | 1401 | machine().inifile().load_ini_category(temp_filter); |
r253176 | r253177 | |
1411 | 1411 | // build list from cache |
1412 | 1412 | //------------------------------------------------- |
1413 | 1413 | |
1414 | void ui_me | |
1414 | void ui_menu_select_game::build_from_cache(std::vector<const game_driver *> &s_drivers, int screens, int filter, bool bioscheck) | |
1415 | 1415 | { |
1416 | 1416 | if (s_drivers.empty()) |
1417 | 1417 | { |
r253176 | r253177 | |
1471 | 1471 | // populate search list |
1472 | 1472 | //------------------------------------------------- |
1473 | 1473 | |
1474 | void ui_me | |
1474 | void ui_menu_select_game::populate_search() | |
1475 | 1475 | { |
1476 | 1476 | // allocate memory to track the penalty value |
1477 | 1477 | std::vector<int> penalty(VISIBLE_GAMES_IN_SEARCH, 9999); |
r253176 | r253177 | |
1522 | 1522 | // generate general info |
1523 | 1523 | //------------------------------------------------- |
1524 | 1524 | |
1525 | void ui_me | |
1525 | void ui_menu_select_game::general_info(const game_driver *driver, std::string &buffer) | |
1526 | 1526 | { |
1527 | 1527 | strprintf(buffer, "Romset: %-.100s\n", driver->name); |
1528 | 1528 | buffer.append("Year: ").append(driver->year).append("\n"); |
r253176 | r253177 | |
1598 | 1598 | buffer.append("Roms Audit Pass: Disabled\nSamples Audit Pass: Disabled\n"); |
1599 | 1599 | } |
1600 | 1600 | |
1601 | void ui_me | |
1601 | void ui_menu_select_game::inkey_export() | |
1602 | 1602 | { |
1603 | 1603 | std::string filename("exported"); |
1604 | 1604 | emu_file infile(machine().options().mewui_path(), OPEN_FLAG_READ); |
r253176 | r253177 | |
1654 | 1654 | // save drivers infos to file |
1655 | 1655 | //------------------------------------------------- |
1656 | 1656 | |
1657 | void ui_me | |
1657 | void ui_menu_select_game::save_cache_info() | |
1658 | 1658 | { |
1659 | 1659 | // attempt to open the output file |
1660 | 1660 | emu_file file(machine().options().mewui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); |
r253176 | r253177 | |
1743 | 1743 | // load drivers infos from file |
1744 | 1744 | //------------------------------------------------- |
1745 | 1745 | |
1746 | void ui_me | |
1746 | void ui_menu_select_game::load_cache_info() | |
1747 | 1747 | { |
1748 | 1748 | driver_cache.resize(driver_list::total() + 1); |
1749 | 1749 | |
r253176 | r253177 | |
1817 | 1817 | // load drivers infos from file |
1818 | 1818 | //------------------------------------------------- |
1819 | 1819 | |
1820 | bool ui_me | |
1820 | bool ui_menu_select_game::load_available_machines() | |
1821 | 1821 | { |
1822 | 1822 | // try to load available drivers from file |
1823 | 1823 | emu_file file(machine().options().mewui_path(), OPEN_FLAG_READ); |
r253176 | r253177 | |
1869 | 1869 | // load custom filters info from file |
1870 | 1870 | //------------------------------------------------- |
1871 | 1871 | |
1872 | void ui_me | |
1872 | void ui_menu_select_game::load_custom_filters() | |
1873 | 1873 | { |
1874 | 1874 | // attempt to open the output file |
1875 | 1875 | emu_file file(machine().options().mewui_path(), OPEN_FLAG_READ); |
r253176 | r253177 | |
1937 | 1937 | // draw left box |
1938 | 1938 | //------------------------------------------------- |
1939 | 1939 | |
1940 | float ui_me | |
1940 | float ui_menu_select_game::draw_left_panel(float x1, float y1, float x2, float y2) | |
1941 | 1941 | { |
1942 | 1942 | ui_manager &mui = machine().ui(); |
1943 | 1943 | float line_height = mui.get_line_height(); |
r253176 | r253177 | |
2091 | 2091 | // draw infos |
2092 | 2092 | //------------------------------------------------- |
2093 | 2093 | |
2094 | void ui_me | |
2094 | void ui_menu_select_game::infos_render(void *selectedref, float origx1, float origy1, float origx2, float origy2) | |
2095 | 2095 | { |
2096 | 2096 | ui_manager &mui = machine().ui(); |
2097 | 2097 | float line_height = mui.get_line_height(); |
r253176 | r253177 | |
2369 | 2369 | } |
2370 | 2370 | } |
2371 | 2371 | |
2372 | void ui_me | |
2372 | void ui_menu_select_game::draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2) | |
2373 | 2373 | { |
2374 | 2374 | ui_manager &mui = machine().ui(); |
2375 | 2375 | float line_height = mui.get_line_height(); |
r253176 | r253177 | |
2413 | 2413 | // perform our special rendering |
2414 | 2414 | //------------------------------------------------- |
2415 | 2415 | |
2416 | void ui_me | |
2416 | void ui_menu_select_game::arts_render(void *selectedref, float origx1, float origy1, float origx2, float origy2) | |
2417 | 2417 | { |
2418 | 2418 | ui_manager &mui = machine().ui(); |
2419 | 2419 | float line_height = mui.get_line_height(); |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/selgame.h | |
6 | 6 | |
7 | 7 | Main MEWUI menu. |
8 | 8 | |
r253176 | r253177 | |
10 | 10 | |
11 | 11 | #pragma once |
12 | 12 | |
13 | #ifndef __MEWUI_MAIN_H__ | |
14 | #define __MEWUI_MAIN_H__ | |
13 | #ifndef __UI_MAIN_H__ | |
14 | #define __UI_MAIN_H__ | |
15 | 15 | |
16 | 16 | #include "drivenum.h" |
17 | 17 | #include "ui/menu.h" |
18 | 18 | |
19 | class ui_me | |
19 | class ui_menu_select_game : public ui_menu | |
20 | 20 | { |
21 | 21 | public: |
22 | ui_mewui_select_game(running_machine &machine, render_container *container, const char *gamename); | |
23 | virtual ~ui_mewui_select_game(); | |
22 | ui_menu_select_game(running_machine &machine, render_container *container, const char *gamename); | |
23 | virtual ~ui_menu_select_game(); | |
24 | 24 | virtual void populate() override; |
25 | 25 | virtual void handle() override; |
26 | 26 | virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; |
r253176 | r253177 | |
85 | 85 | }; |
86 | 86 | |
87 | 87 | |
88 | #endif /* __ | |
88 | #endif /* __UI_MAIN_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/selsoft.cpp | |
6 | 6 | |
7 | 7 | MEWUI softwares menu. |
8 | 8 |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/selsoft.h | |
6 | 6 | |
7 | 7 | MEWUI softwares menu. |
8 | 8 | |
9 | 9 | ***************************************************************************/ |
10 | 10 | #pragma once |
11 | 11 | |
12 | #ifndef __MEWUI_SELSOFT_H__ | |
13 | #define __MEWUI_SELSOFT_H__ | |
12 | #ifndef __UI_SELSOFT_H__ | |
13 | #define __UI_SELSOFT_H__ | |
14 | 14 | |
15 | 15 | #include "ui/custmenu.h" |
16 | 16 | |
r253176 | r253177 | |
109 | 109 | bool has_multiple_bios(const game_driver *driver, std::vector<s_bios> &biosname); |
110 | 110 | |
111 | 111 | |
112 | #endif /* __ | |
112 | #endif /* __UI_SELSOFT_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /********************************************************************* |
4 | 4 | |
5 | | |
5 | ui/sndmenu.cpp | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | *********************************************************************/ |
10 | 10 |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/sndmenu.h | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | ***************************************************************************/ |
10 | 10 | |
11 | 11 | #pragma once |
12 | 12 | |
13 | #ifndef __MEWUI_SNDMENU_H__ | |
14 | #define __MEWUI_SNDMENU_H__ | |
13 | #ifndef __UI_SNDMENU_H__ | |
14 | #define __UI_SNDMENU_H__ | |
15 | 15 | |
16 | 16 | //------------------------------------------------- |
17 | 17 | // class sound options menu |
r253176 | r253177 | |
39 | 39 | bool m_samples, m_sound; |
40 | 40 | }; |
41 | 41 | |
42 | #endif /* __ | |
42 | #endif /* __UI_SNDMENU_H__ */ |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/utils.cpp | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | ***************************************************************************/ |
10 | 10 |
r253176 | r253177 | |
---|---|---|
2 | 2 | // copyright-holders:Dankan1890 |
3 | 3 | /*************************************************************************** |
4 | 4 | |
5 | | |
5 | ui/utils.h | |
6 | 6 | |
7 | Internal | |
7 | Internal UI user interface. | |
8 | 8 | |
9 | 9 | ***************************************************************************/ |
10 | 10 | |
11 | 11 | #pragma once |
12 | 12 | |
13 | #ifndef __MEWUI_UTILS_H__ | |
14 | #define __MEWUI_UTILS_H__ | |
13 | #ifndef __UI_UTILS_H__ | |
14 | #define __UI_UTILS_H__ | |
15 | 15 | |
16 | 16 | #include "osdepend.h" |
17 | 17 | #include "render.h" |
r253176 | r253177 | |
364 | 364 | global_free_array(jpg_buffer); |
365 | 365 | } |
366 | 366 | |
367 | #endif /* __ | |
367 | #endif /* __UI_UTILS_H__ */ |
https://github.com/mamedev/mame/commit/213283e43064d04bc5ba671e23177eb7ebe8d0a2 |
Previous | 199869 Revisions | Next |