Win32GUI: Allow toggling mouse_support off
Prevents accidental mouse clicks on the map
This commit is contained in:
@@ -529,6 +529,7 @@ win32gui: handle menu_color attribute
|
|||||||
win32gui: name-from-discoveries list menu selector characters were punctuation
|
win32gui: name-from-discoveries list menu selector characters were punctuation
|
||||||
instead of letters, repeated for each class; caused by the core bug
|
instead of letters, repeated for each class; caused by the core bug
|
||||||
of erroneously specifying space as a selector for class header lines
|
of erroneously specifying space as a selector for class header lines
|
||||||
|
win32gui: allow toggling mouse_support off
|
||||||
MacOSX: initial binary release was built from out of date source code that
|
MacOSX: initial binary release was built from out of date source code that
|
||||||
had 'BETA' and 'DEBUG' inappropriately enabled
|
had 'BETA' and 'DEBUG' inappropriately enabled
|
||||||
MacOSX: force TIMED_DELAY build option on so that 'runmode' run-time option
|
MacOSX: force TIMED_DELAY build option on so that 'runmode' run-time option
|
||||||
|
|||||||
+7
-4
@@ -84,7 +84,7 @@ struct window_procs mswin_procs = {
|
|||||||
| WC_FONTSIZ_MESSAGE | WC_FONTSIZ_STATUS | WC_FONTSIZ_MENU
|
| WC_FONTSIZ_MESSAGE | WC_FONTSIZ_STATUS | WC_FONTSIZ_MENU
|
||||||
| WC_FONTSIZ_TEXT | WC_TILE_WIDTH | WC_TILE_HEIGHT | WC_TILE_FILE
|
| WC_FONTSIZ_TEXT | WC_TILE_WIDTH | WC_TILE_HEIGHT | WC_TILE_FILE
|
||||||
| WC_VARY_MSGCOUNT | WC_WINDOWCOLORS | WC_PLAYER_SELECTION
|
| WC_VARY_MSGCOUNT | WC_WINDOWCOLORS | WC_PLAYER_SELECTION
|
||||||
| WC_SPLASH_SCREEN | WC_POPUP_DIALOG,
|
| WC_SPLASH_SCREEN | WC_POPUP_DIALOG | WC_MOUSE_SUPPORT,
|
||||||
0L, mswin_init_nhwindows, mswin_player_selection, mswin_askname,
|
0L, mswin_init_nhwindows, mswin_player_selection, mswin_askname,
|
||||||
mswin_get_nh_event, mswin_exit_nhwindows, mswin_suspend_nhwindows,
|
mswin_get_nh_event, mswin_exit_nhwindows, mswin_suspend_nhwindows,
|
||||||
mswin_resume_nhwindows, mswin_create_nhwindow, mswin_clear_nhwindow,
|
mswin_resume_nhwindows, mswin_create_nhwindow, mswin_clear_nhwindow,
|
||||||
@@ -212,6 +212,7 @@ mswin_init_nhwindows(int *argc, char **argv)
|
|||||||
iflags.toptenwin = 1;
|
iflags.toptenwin = 1;
|
||||||
set_option_mod_status("toptenwin", SET_IN_FILE);
|
set_option_mod_status("toptenwin", SET_IN_FILE);
|
||||||
//set_option_mod_status("perm_invent", SET_IN_FILE);
|
//set_option_mod_status("perm_invent", SET_IN_FILE);
|
||||||
|
set_option_mod_status("mouse_support", SET_IN_GAME);
|
||||||
|
|
||||||
/* initialize map tiles bitmap */
|
/* initialize map tiles bitmap */
|
||||||
initMapTiles();
|
initMapTiles();
|
||||||
@@ -1382,9 +1383,11 @@ mswin_nh_poskey(int *x, int *y, int *mod)
|
|||||||
mswin_main_loop();
|
mswin_main_loop();
|
||||||
|
|
||||||
if (event->type == NHEVENT_MOUSE) {
|
if (event->type == NHEVENT_MOUSE) {
|
||||||
*mod = event->ms.mod;
|
if (iflags.wc_mouse_support) {
|
||||||
*x = event->ms.x;
|
*mod = event->ms.mod;
|
||||||
*y = event->ms.y;
|
*x = event->ms.x;
|
||||||
|
*y = event->ms.y;
|
||||||
|
}
|
||||||
key = 0;
|
key = 0;
|
||||||
} else {
|
} else {
|
||||||
key = event->kbd.ch;
|
key = event->kbd.ch;
|
||||||
|
|||||||
Reference in New Issue
Block a user