diff options
-rwxr-xr-x | atari/global_evnt.c | 30 | ||||
-rwxr-xr-x | atari/global_evnt.h | 3 |
2 files changed, 28 insertions, 5 deletions
diff --git a/atari/global_evnt.c b/atari/global_evnt.c index ccb4b39c4..bb44601f1 100755 --- a/atari/global_evnt.c +++ b/atari/global_evnt.c @@ -271,8 +271,20 @@ static void __CDECL menu_debug_render(WINDOW *win, int item, int title, void *da (html_redraw_debug) ? 1 : 0 );
}
}
-}
-
+} + +static void __CDECL menu_fg_images(WINDOW *win, int item, int title, void *data)
+{
+ option_foreground_images = !option_foreground_images; + MenuIcheck( NULL, MAINMENU_M_FG_IMAGES, (option_foreground_images) ? 1 : 0);
+} + +static void __CDECL menu_bg_images(WINDOW *win, int item, int title, void *data)
+{
+ option_background_images = !option_background_images; + MenuIcheck( NULL, MAINMENU_M_BG_IMAGES, (option_background_images) ? 1 : 0);
+} + static void __CDECL menu_back(WINDOW *win, int item, int title, void *data)
{
LOG(("%s", __FUNCTION__));
@@ -360,7 +372,9 @@ static struct s_menu_item_evnt menu_evnt_tbl[] = {T_VIEW, MAINMENU_M_RELOAD, "Reload", menu_reload, {0,NK_F5,0}, NULL},
{T_VIEW, MAINMENU_M_TOOLBARS, "Toolbars", menu_toolbars, {0,0,0}, NULL},
{T_VIEW, MAINMENU_M_SAVEWIN, "", menu_savewin, {0,0,0}, NULL},
- {T_VIEW, MAINMENU_M_DEBUG_RENDER, "", menu_debug_render, {0,0,0}, NULL},
+ {T_VIEW, MAINMENU_M_DEBUG_RENDER, "", menu_debug_render, {0,0,0}, NULL}, + {T_VIEW, MAINMENU_M_FG_IMAGES, "", menu_fg_images, {0,0,0}, NULL}, + {T_VIEW, MAINMENU_M_BG_IMAGES, "", menu_bg_images, {0,0,0}, NULL},
{T_VIEW, MAINMENU_M_STOP, "Stop", menu_stop, {0,0,0}, NULL},
{T_NAV, MAINMENU_M_BACK, "Back", menu_back, {0,0,0}, NULL},
{T_NAV, MAINMENU_M_FORWARD, "Forward", menu_forward, {0,0,0}, NULL},
@@ -654,6 +668,13 @@ static void set_menu_title(int rid, const char * nsid) count++;
}
}
+} + +void main_menu_update( void ) +{ + MenuIcheck( NULL, MAINMENU_M_DEBUG_RENDER, (html_redraw_debug) ? 1 : 0); + MenuIcheck( NULL, MAINMENU_M_FG_IMAGES, (option_foreground_images) ? 1 : 0); + MenuIcheck( NULL, MAINMENU_M_BG_IMAGES, (option_background_images) ? 1 : 0); }
@@ -749,7 +770,8 @@ void bind_global_events( void ) MenuText( NULL, menu_evnt_tbl[i].rid, menu_evnt_tbl[i].menustr );
}
i++;
- }
+ } + main_menu_update(); /* TODO: Fix pixel sizes for Titles and Items (for non-8px fonts) */
}
diff --git a/atari/global_evnt.h b/atari/global_evnt.h index 2cbd069de..86f684d35 100755 --- a/atari/global_evnt.h +++ b/atari/global_evnt.h @@ -56,7 +56,8 @@ struct s_menu_item_evnt { */
void bind_global_events( void );
-void unbind_global_events( void );
+void unbind_global_events( void ); +void main_menu_update( void );
#endif
|