mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Better mouse button handling in Mines:
- middle button now also triggers the clear-around-square action - a special-case handler in midend_process_key() arranges that the left button always trumps the right button if both are pressed together, meaning that Windows Minesweeper players used to pressing L+R to clear around a square should still be able to do so without any strange behaviour. (The latter touches all game backends, yet again, to add a field to the game structure which is zero in everything except Mines.) [originally from svn r5888]
This commit is contained in:
@ -47,6 +47,9 @@ enum {
|
||||
#define IS_MOUSE_RELEASE(m) ( (unsigned)((m) - LEFT_RELEASE) <= \
|
||||
(unsigned)(RIGHT_RELEASE - LEFT_RELEASE))
|
||||
|
||||
/* Bit flags indicating mouse button priorities */
|
||||
#define BUTTON_BEATS(x,y) ( 1 << (((x)-LEFT_BUTTON)*3+(y)-LEFT_BUTTON) )
|
||||
|
||||
#define IGNOREARG(x) ( (x) = (x) )
|
||||
|
||||
typedef struct frontend frontend;
|
||||
@ -245,6 +248,7 @@ struct game {
|
||||
int (*wants_statusbar)(void);
|
||||
int is_timed;
|
||||
int (*timing_state)(game_state *state);
|
||||
int mouse_priorities;
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user