diff options
author | 2016-02-21 11:48:45 +0100 | |
---|---|---|
committer | 2016-02-21 11:48:45 +0100 | |
commit | cc24a339d8c0517259084b5c178d784626ba965c (patch) | |
tree | 9868e9687b5802ae0a3733712a3bbeb3bc75c953 /src/emu/ui/selgame.h | |
parent | b5daabda5495dea5c50e17961ecfed2ea8619d76 (diff) |
Merge remote-tracking branch 'refs/remotes/mamedev/master'
Second attempt
Diffstat (limited to 'src/emu/ui/selgame.h')
-rw-r--r-- | src/emu/ui/selgame.h | 66 |
1 files changed, 49 insertions, 17 deletions
diff --git a/src/emu/ui/selgame.h b/src/emu/ui/selgame.h index b5e6687c4f3..4c1cf548d60 100644 --- a/src/emu/ui/selgame.h +++ b/src/emu/ui/selgame.h @@ -1,22 +1,23 @@ // license:BSD-3-Clause -// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods +// copyright-holders:Dankan1890 /*************************************************************************** ui/selgame.h - Game selector + Main UI menu. ***************************************************************************/ #pragma once -#ifndef __UI_SELGAME_H__ -#define __UI_SELGAME_H__ +#ifndef __UI_MAIN_H__ +#define __UI_MAIN_H__ #include "drivenum.h" -#include "menu.h" +#include "ui/menu.h" -class ui_menu_select_game : public ui_menu { +class ui_menu_select_game : public ui_menu +{ public: ui_menu_select_game(running_machine &machine, render_container *container, const char *gamename); virtual ~ui_menu_select_game(); @@ -27,21 +28,52 @@ public: // force game select menu static void force_game_select(running_machine &machine, render_container *container); + virtual bool menu_has_search_active() override { return (m_search[0] != 0); } + + // draw left panel + virtual float draw_left_panel(float x1, float y1, float x2, float y2) override; + + // draw right panel + virtual void draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2) override; + private: - // internal state - enum { VISIBLE_GAMES_IN_LIST = 15 }; - UINT8 m_error; - UINT8 m_rerandomize; - char m_search[40]; - int m_matchlist[VISIBLE_GAMES_IN_LIST]; - std::vector<const game_driver *> m_driverlist; - std::unique_ptr<driver_enumerator> m_drivlist; + enum { VISIBLE_GAMES_IN_SEARCH = 200 }; + char m_search[40]; + int m_prev_selected; + static int m_isabios; + + static std::vector<const game_driver *> m_sortedlist; + std::vector<const game_driver *> m_availsortedlist; + std::vector<const game_driver *> m_unavailsortedlist; + std::vector<const game_driver *> m_displaylist; + std::vector<const game_driver *> m_tmp; + + const game_driver *m_searchlist[VISIBLE_GAMES_IN_SEARCH + 1]; // internal methods - void build_driver_list(); + void build_custom(); + void build_category(); + void build_available_list(); + void build_list(std::vector<const game_driver *> &vec, const char *filter_text = nullptr, int filter = 0, bool bioscheck = false); + + bool isfavorite(); + void populate_search(); + void init_sorted_list(); + bool load_available_machines(); + void load_custom_filters(); + + // General info + void general_info(const game_driver *driver, std::string &buffer); + + void arts_render(void *selectedref, float x1, float y1, float x2, float y2); + void infos_render(void *selectedref, float x1, float y1, float x2, float y2); + + // handlers void inkey_select(const ui_menu_event *menu_event); - void inkey_cancel(const ui_menu_event *menu_event); + void inkey_select_favorite(const ui_menu_event *menu_event); void inkey_special(const ui_menu_event *menu_event); + void inkey_export(); }; -#endif /* __UI_SELGAME_H__ */ + +#endif /* __UI_MAIN_H__ */ |