5
* Marco van den Heuvel <blackystardust68@yahoo.com>
7
* This file is part of VICE, the Versatile Commodore Emulator.
8
* See README for copyright notice.
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this program; if not, write to the Free Software
22
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
29
#define _INLINE_MUIMASTER_H
33
#include "uivideocbm2pet.h"
35
#include "translate.h"
37
static video_canvas_t *video_canvas;
39
static ui_to_from_t ui_to_from[] = {
40
{ NULL, MUI_TYPE_FILENAME, "CrtcPaletteFile", NULL, NULL },
41
UI_END /* mandatory */
44
static ULONG Browse( struct Hook *hook, Object *obj, APTR arg )
48
fname=BrowseFile(translate_text(IDS_EXTERNAL_PALETTE_SELECT), "#?.vpl", video_canvas);
51
set(ui_to_from[0].object, MUIA_String_Contents, fname);
56
static APTR build_gui(void)
58
APTR app, ui, ok, browse_button, cancel;
61
static const struct Hook BrowseFileHook = { { NULL,NULL },(VOID *)HookEntry,(VOID *)Browse, NULL};
63
static const struct Hook BrowseFileHook = { { NULL,NULL },(VOID *)Browse,NULL,NULL };
69
FILENAME(ui_to_from[0].object, translate_text(IDS_PALETTE_FILENAME), browse_button)
75
MUIM_Notify, MUIA_Pressed, FALSE,
76
app, 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit);
78
DoMethod(ok, MUIM_Notify, MUIA_Pressed, FALSE,
79
app, 2, MUIM_Application_ReturnID, BTN_OK);
81
DoMethod(browse_button, MUIM_Notify, MUIA_Pressed, FALSE,
82
app, 2, MUIM_CallHook, &BrowseFileHook);
88
void ui_video_cbm2pet_settings_dialog(video_canvas_t *canvas)
94
window = mui_make_simple_window(build_gui(), translate_text(IDS_VIDEO_SETTINGS));
97
mui_add_window(window);
98
ui_get_to(ui_to_from);
99
set(window, MUIA_Window_Open, TRUE);
100
if (mui_run() == BTN_OK) {
101
ui_get_from(ui_to_from);
103
set(window, MUIA_Window_Open, FALSE);
104
mui_rem_window(window);
105
MUI_DisposeObject(window);