Skip to content

Commit

Permalink
Disallow menu items highlighting initially to prevent cursor jumping
Browse files Browse the repository at this point in the history
  • Loading branch information
JNechaevsky committed Dec 30, 2024
1 parent 2330afe commit f89ef69
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/doom/m_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6642,7 +6642,9 @@ void M_StartControlPanel (void)
currentMenu = &MainDef; // JDC
M_Reset_Line_Glow();
itemOn = currentMenu->lastOn; // JDC
menu_mouse_allow = true; // [JN] Show cursor on opening menu.
// [JN] Disallow menu items highlighting initially to prevent
// cursor jumping. It will be allowed by mouse movement.
menu_mouse_allow = false;
}

static void M_ID_MenuMouseControl (void)
Expand Down
5 changes: 3 additions & 2 deletions src/heretic/mn_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6681,8 +6681,9 @@ void MN_ActivateMenu(void)
}
S_StartSound(NULL, sfx_dorcls);
slottextloaded = false; //reload the slot text, when needed
// [JN] Show cursor on opening menu.
menu_mouse_allow = true;
// [JN] Disallow menu items highlighting initially to prevent
// cursor jumping. It will be allowed by mouse movement.
menu_mouse_allow = false;
}

//---------------------------------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions src/hexen/mn_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6138,8 +6138,9 @@ void MN_ActivateMenu(void)
}
S_StartSound(NULL, SFX_PLATFORM_STOP);
slottextloaded = false; //reload the slot text, when needed
// [JN] Show cursor on opening menu.
menu_mouse_allow = true;
// [JN] Disallow menu items highlighting initially to prevent
// cursor jumping. It will be allowed by mouse movement.
menu_mouse_allow = false;
}

//---------------------------------------------------------------------------
Expand Down

0 comments on commit f89ef69

Please sign in to comment.