rendered paste bodyIndex: src/client/cl_input.c===================================================================--- src/client/cl_input.c (revision 19542)+++ src/client/cl_input.c (working copy)@@ -1243,6 +1243,10 @@ /* do nothing */ return; + case MS_DRAGMENU:+ /* do nothing */+ return;+ /* repeat the mouse button */ case MS_LHOLD: if (cls.realtime >= mn.mouseRepeat.nexttime) {Index: src/client/cl_input.h===================================================================--- src/client/cl_input.h (revision 19542)+++ src/client/cl_input.h (working copy)@@ -38,7 +38,8 @@ MS_SHIFTMAP, /**< we move the geoscape map */ MS_ZOOMMAP, /**< we zoom the geoscape map (also possible via mousewheels)*/ MS_SHIFT3DMAP, /**< we rotate the 3d globe */- MS_WORLD /**< we are in tactical mode */+ MS_WORLD, /**< we are in tactical mode */+ MS_DRAGMENU } mouseSpace_t; #define FOV 75.0Index: src/client/menu/m_draw.c===================================================================--- src/client/menu/m_draw.c (revision 19542)+++ src/client/menu/m_draw.c (working copy)@@ -182,6 +182,10 @@ } switch (node->type) {+ case MN_CONTROLS:+ if (mouseSpace == MS_DRAGMENU){+ MN_SetNewMenuPos(node->menu, mousePosX - node->pos[0], mousePosY - node->pos[1]);+ }; case MN_PIC: if (ref && *ref) MN_DrawImageNode(node, ref, cl.time);Index: src/client/menu/m_input.c===================================================================--- src/client/menu/m_input.c (revision 19542)+++ src/client/menu/m_input.c (working copy)@@ -357,7 +357,8 @@ menuNode_t *execute_node = NULL; for (node = menu->firstNode; node; node = node->next) { if (node->type != MN_CONTAINER && node->type != MN_CHECKBOX- && node->type != MN_SELECTBOX && node->type != MN_TAB && !node->click)+ && node->type != MN_SELECTBOX && node->type != MN_TAB+ && node->type != MN_CONTROLS && !node->click) continue; /* check whether mouse is over this node */@@ -391,6 +392,9 @@ /* found a node -> do actions */ switch (node->type) {+ case MN_CONTROLS:+ MN_DragMenu();+ break; case MN_CONTAINER: MN_Drag(node, baseCurrent, x, y, qfalse); break;Index: src/client/menu/m_nodes.c===================================================================--- src/client/menu/m_nodes.c (revision 19542)+++ src/client/menu/m_nodes.c (working copy)@@ -137,6 +137,7 @@ case MN_CHECKBOX: case MN_TAB: case MN_SELECTBOX:+ case MN_CONTROLS: break; default: /* check for click action */@@ -153,7 +154,7 @@ } else { R_DrawGetPicSize(&sx, &sy, va("%s_checked", (char*)node->data[MN_DATA_STRING_OR_IMAGE_OR_MODEL])); }- } else if (node->type == MN_PIC && node->data[MN_DATA_STRING_OR_IMAGE_OR_MODEL]) {+ } else if ((node->type == MN_PIC || node->type == MN_CONTROLS) && node->data[MN_DATA_STRING_OR_IMAGE_OR_MODEL]) { if (node->texh[0] && node->texh[1]) { sx = node->texh[0] - node->texl[0]; sy = node->texh[1] - node->texl[1];Index: src/client/menu/m_parse.c===================================================================--- src/client/menu/m_parse.c (revision 19542)+++ src/client/menu/m_parse.c (working copy)@@ -163,7 +163,8 @@ "cinematic", "textlist", "radar",- "tab"+ "tab",+ "controls" }; /** @brief valid node event actions */Index: src/client/menu/m_nodes.h===================================================================--- src/client/menu/m_nodes.h (revision 19542)+++ src/client/menu/m_nodes.h (working copy)@@ -57,6 +57,7 @@ MN_TEXTLIST, MN_RADAR, /**< tactical mission radar */ MN_TAB,+ MN_CONTROLS, /**< menu controls */ MN_NUM_NODETYPE } mn_t;Index: src/client/menu/m_main.c===================================================================--- src/client/menu/m_main.c (revision 19542)+++ src/client/menu/m_main.c (working copy)@@ -29,6 +29,13 @@ menuGlobal_t mn; static cvar_t *mn_escpop; +void MN_DragMenu (void)+{+ if (mouseSpace == MS_MENU) {+ mouseSpace = MS_DRAGMENU;+ }+}+ /** * @brief Returns the number of currently renderer menus on the menustack * @note Checks for a render node - if invis is true there, it's the lastIndex: src/client/menu/m_main.h===================================================================--- src/client/menu/m_main.h (revision 19542)+++ src/client/menu/m_main.h (working copy)@@ -35,7 +35,7 @@ #include "m_nodes.h" #include "m_messages.h" -typedef struct {+typedef struct mouseRepeat_s { menu_t *menu; /**< where - the menu is it executed in (context) */ menuAction_t *action; /**< what - the action node to be executed (the clicknode e.g.) */ unsigned nexttime; /**< when (milliseconds) - calculated from cls.realtime + delay */@@ -98,4 +98,6 @@ void MN_ScrollContainerUpdate_f(void); void MN_ScrollContainerNext_f(void); void MN_ScrollContainerPrev_f(void);++void MN_DragMenu(void); #endifIndex: base/ufos/menu_main.ufo===================================================================--- base/ufos/menu_main.ufo (revision 19542)+++ base/ufos/menu_main.ufo (working copy)@@ -386,17 +386,28 @@ // ================== menu popup_tipoftheday {+ {+ origin "30 450"+ }+ pic back { image menu/popup_alpha- pos "30 450"+ pos "0 0" blend true } + controls drag_button+ {+ image menu/button_alienkill1+ tooltip "_Drag to move window"+ pos "460 26"+ }+ string title { string "_Tip of the day"- pos "286 474"+ pos "256 24" font f_big align uc }@@ -404,23 +415,23 @@ checkbox activate { cvar "*cvar cl_showTipOfTheDay"- pos "74 650"+ pos "44 200" align ul } string activate_string { string "_Show tip of the day"- pos "96 650"+ pos "66 200" font f_small align ul } text popup_tipoftheday_text {- pos "64 514"+ pos "34 64" size "444 120" format "20 150"- num TEXT_TIPOFTHEDAY+ num TEXT_TIPOFTHEDAY click { } wheel height 6@@ -432,9 +443,9 @@ image menu/multi_buttons3 texh "180 64" texl "0 32"- pos "304 644"- out { *string_next color "0 0.5 0 1" *bt_next image menu/multi_buttons3 }- in { *string_next color "1 1 1 1" *bt_next image menu/multi_buttons3a }+ pos "274 194"+ out { *string_next color "0 0.5 0 1" *bt_next image menu/multi_buttons3 }+ in { *string_next color "1 1 1 1" *bt_next image menu/multi_buttons3a } click { cmd "tipoftheday;" } } string string_next@@ -442,7 +453,7 @@ font f_menu color "0 0.5 0 1" string "_Next"- pos "390 660"+ pos "360 210" align cc }