From 673246be0c4d85d1aba6865e2451bed19bb01f43 Mon Sep 17 00:00:00 2001 From: ulion Date: Sat, 22 Dec 2007 06:14:38 +0000 Subject: OSD menu support mouse selection. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25489 b3059339-0415-0410-9bf9-f77b7e298cf2 --- command.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'command.c') diff --git a/command.c b/command.c index 9710ca87f3..d6da090f45 100644 --- a/command.c +++ b/command.c @@ -51,6 +51,10 @@ #include "libass/ass.h" #include "libass/ass_mp.h" #endif +#ifdef HAVE_MENU +#include "m_struct.h" +#include "libmenu/menu.h" +#endif #ifdef HAVE_NEW_GUI #include "gui/interface.h" #endif @@ -60,6 +64,8 @@ #define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5)) +extern int use_menu; + static void rescale_input_coordinates(int ix, int iy, double *dx, double *dy) { //remove the borders, if any, and rescale to the range [0,1],[0,1] @@ -2991,6 +2997,10 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd) set_osd_msg(OSD_MSG_TEXT, 1, osd_duration, "Selected button number %d", button); } +#endif +#ifdef HAVE_MENU + if (use_menu && dx >= 0.0 && dy >= 0.0) + menu_update_mouse_pos(dx, dy); #endif } break; -- cgit v1.2.3