Ejemplo n.º 1
0
 /*-------------------------------------------------
 *   menu_input_general - handle the general
 *   input menu
 *  -------------------------------------------------*/
 menu_input_general(mame_ui_manager mui, render_container container, int _group)
     : base(mui, container)
 {
     group = _group;
 }
Ejemplo n.º 2
0
        /*-------------------------------------------------
        *  ui_slider_ui_handler - pushes the slider
        *  menu on the stack and hands off to the
        *  standard menu handler
        *  -------------------------------------------------*/
        public static new UInt32 ui_handler(render_container container, mame_ui_manager mui)
        {
            UInt32 result;

            throw new emu_unimplemented();
        }
Ejemplo n.º 3
0
 /*-------------------------------------------------
 *   ui_menu_main constructor - populate the main menu
 *  -------------------------------------------------*/
 public menu_main(mame_ui_manager mui, render_container container) : base(mui, container)
 {
 }
Ejemplo n.º 4
0
 public menu_confirm_quit(mame_ui_manager mui, render_container container)
     : base(mui, container)
 {
     set_one_shot(true);
     set_process_flags(PROCESS_CUSTOM_ONLY | PROCESS_NOINPUT);
 }
Ejemplo n.º 5
0
 public menu_sliders(mame_ui_manager mui, render_container container, bool menuless_mode = false)
     : base(mui, container)
 {
     m_hidden        = menuless_mode;
     m_menuless_mode = menuless_mode;
 }
Ejemplo n.º 6
0
        //virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;


        // force game select menu
        public static void force_game_select(mame_ui_manager mui, render_container container)
        {
            throw new emu_unimplemented();
        }
Ejemplo n.º 7
0
        //bool hit_test(float x, float y, size_t &start, size_t &span);
        //void restyle(size_t start, size_t span, rgb_t *fgcolor, rgb_t *bgcolor);


        //-------------------------------------------------
        //  emit
        //-------------------------------------------------

        public void emit(render_container container, float x, float y)
        {
            emit(container, 0, m_lines.size(), x, y);
        }
Ejemplo n.º 8
0
        // actions
        //void reload();
        //bool save_all(const char *filename);

        //-------------------------------------------------
        //  render_text - called by the UI system to
        //  render text
        //-------------------------------------------------
        public void render_text(mame_ui_manager mui, render_container container)
        {
            //throw new emu_unimplemented();
#if false
#endif
        }
Ejemplo n.º 9
0
        //std::optional<text_layout> m_layout;
        //float m_layout_width;
        //float m_desired_width;
        //int m_desired_lines;
        //int m_window_lines;
        //int m_top_line;


        protected menu_textbox(mame_ui_manager mui, render_container container)
            : base(mui, container)
        {
            throw new emu_unimplemented();
        }
Ejemplo n.º 10
0
        //-------------------------------------------------
        //  ctor
        //-------------------------------------------------
        menu_select_game(mame_ui_manager mui, render_container container, string gamename)
            : base(mui, container, false)
        {
            m_persistent_data     = system_list.instance();
            m_icons               = new icon_cache(MAX_ICONS_RENDER);
            m_icon_paths          = "";
            m_displaylist         = new std.vector <ui_system_info>();
            m_searchlist          = new std.vector <std.pair <double, ui_system_info> >();
            m_searched_fields     = (unsigned)system_list.available.AVAIL_NONE;
            m_populated_favorites = false;


            string     error_string;
            string     last_filter;
            ui_options moptions = mui.options();

            // load drivers cache
            m_persistent_data.cache_data(mui.options());

            // check if there are available system icons
            check_for_icons(null);

            // build drivers list
            if (!load_available_machines())
            {
                build_available_list();
            }

            if (s_first_start)
            {
                //s_first_start = false; TODO: why wasn't it ever clearing the first start flag?

                reselect_last.set_driver(moptions.last_used_machine());
                ui_globals.rpanel = (uint8_t)std.min(std.max(moptions.last_right_panel(), (int)RP_FIRST), (int)RP_LAST);

                string tmp   = moptions.last_used_filter();
                size_t found = tmp.find_first_of(',');
                string fake_ini;
                if (found == npos)
                {
                    fake_ini = util.string_format("\uFEFF{0} = 1\n", tmp);
                }
                else
                {
                    string sub_filter = tmp.substr(found + 1);
                    tmp      = tmp.Substring((int)found); // .resize(found);
                    fake_ini = util.string_format("\uFEFF{0} = {1}\n", tmp, sub_filter);
                }

                emu_file file = new emu_file(ui().options().ui_path(), OPEN_FLAG_READ);

                MemoryU8 fake_ini_buffer = new MemoryU8(System.Text.Encoding.ASCII.GetBytes(fake_ini));
                if (!file.open_ram(fake_ini_buffer, (u32)fake_ini.size()))  //if (!file.open_ram(fake_ini.c_str(), fake_ini.size()))
                {
                    m_persistent_data.filter_data().load_ini(file);
                    file.close();
                }
            }

            // do this after processing the last used filter setting so it overwrites the placeholder
            load_custom_filters();
            m_filter_highlight = (int)m_persistent_data.filter_data().get_current_filter_type();

            if (!moptions.remember_last())
            {
                reselect_last.reset();
            }

            mui.machine().options().set_value(OPTION_SNAPNAME, "%g/%i", OPTION_PRIORITY_CMDLINE);

            ui_globals.curdats_view  = 0;
            ui_globals.panels_status = (uint16_t)moptions.hide_panels();
            ui_globals.curdats_total = 1;
        }