Skip to content

Commit

Permalink
Enabled mouse wheel for accessing additional options in the 'make eph…
Browse files Browse the repository at this point in the history
…emeris' menu
  • Loading branch information
Bill-Gray committed Aug 25, 2023
1 parent 177e904 commit b2cebb1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions findorb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,11 @@ static int full_inquire( const char *prompt, char *buff, const int max_len,
y -= line - n_lines;
if( mpc_code_select && x > real_width - 3)
x = -1; /* ignore some of the right margin */
if( y >= 0 && y < n_lines && x >= 0 && x < real_width)
if( button & BUTTON4_PRESSED) /* actually 'wheel up' */
rval = KEY_UP;
else if( button5_pressed) /* actually 'wheel down' */
rval = KEY_DOWN;
else if( y >= 0 && y < n_lines && x >= 0 && x < real_width)
{
if( mpc_code_select)
rval = KEY_F( 1 + x / 4 + y * (box_size / 4));
Expand Down Expand Up @@ -1101,7 +1105,7 @@ static void create_ephemeris( const double *orbit, const double epoch_jd,
}
*tptr1 = '\0';
memmove( end_of_location_text, tptr, tptr1 - tptr + 1);
strlcat_error( buff, "Up/down arrows for other options\n");
strlcat_error( buff, "Up/down arrows or mouse wheel for other options\n");
}
tptr = get_find_orb_text( 2064);
i = ephem_type;
Expand Down

0 comments on commit b2cebb1

Please sign in to comment.