summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/submenu.h
blob: 8631b4b001f2fdb7701c82d542adf5c1d320d293 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// license:BSD-3-Clause
// copyright-holders:Maurizio Petrarota,Jeffrey Clark
/***************************************************************************

    ui/submenu.h

    UI options menu.

***************************************************************************/
#pragma once

#ifndef MAME_FRONTEND_UI_SUBMENU_H
#define MAME_FRONTEND_UI_SUBMENU_H

#include "emuopts.h"
#include "ui/menu.h"

#if defined(UI_WINDOWS) && !defined(UI_SDL)
#include "../osd/windows/winmain.h"
#else
#include "../osd/modules/lib/osdobj_common.h"
#endif

#include <string>
#include <vector>


namespace ui {
//-------------------------------------------------
//  class ui menu
//-------------------------------------------------
class submenu : public menu
{
public:
	enum class option_type
	{
		HEAD,
		SEP,
		MENU,
		CMD,
		EMU,
		UI,
		OSD,
	};

	struct option
	{
		option_type type;
		const char  *description;
		const char  *name;
		core_options::entry *entry;
		core_options (*options);
		std::vector<std::string> value;
	};

	submenu(mame_ui_manager &mui, render_container *container, std::vector<option> &suboptions, const game_driver *drv = nullptr, emu_options *options = nullptr);
	virtual ~submenu();
	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;

	static std::vector<option> misc_options;
	static std::vector<option> advanced_options;
	static std::vector<option> control_options;
	static std::vector<option> video_options;
	//static std::vector<option> export_options;

private:
	std::vector<option> &m_options;
	game_driver const   *m_driver;
};

} // namespace ui

#endif /* MAME_FRONTEND_UI_SUBMENU_H */