to a spot in the main view and level-map, scrolling the level-map. We could probably also add mouse support for scrolling menus and stuff.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1612 c06c8d41-db1a-0410-9941-cceddc491573
XNYPQTF74HLRSKTEVLTNCDB43YHWOFTQL5TVSNO6WWPAJGZSCYKQC
IIN7AVA6JYRBXH6ZYRR7BY7TV6PW7ANAQ2A3PD55FKBKKQFEEF2AC
SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
77H4BWWPPGLM3PLZH4QTAJRXIZTSDVNCOKZE223I437FN2UJ34RQC
AJJ6D6JRV6ZAZOAUHYUM2IQG42V6PBALOD4KEMNKSVVAOJXAUCPQC
TAHSTXR7ROOMDFUSBUU4ZAIEWQLAS5CIRCTARLD4Q2BGNLSL7E5QC
PL6I2CMSTHY5ZHWVMIQE5YTM5S5VPKBNZM6QJVHZSSKOJGIJ5W4AC
NEECVIIAOBP72T6O44DWAA6HFSDY3KSWYCFMKAEMDMVOI7XASD7QC
RVST2QHYJ757ZHK4AUJ5NGPDZ44AD6RVFVXYPKQIBJXZBDNUCHXQC
XPCGZBHHSL6MB3ORMUJI64BAERU6AZTIY6RK56BBW7SNB3IK24IAC
D77K7ISUWRLGNSQGYH5P2KEJZCNYQHDZC5AMLSKTXVBIRNG6F5KQC
EHSY6DVGUMI6C67WKET3GDJVLWJWGYBYQONNDK5JVT7BCTHBEZVAC
if (getty == '+')
screen_y += 20;
if (screen_y >= max_y - half_screen)
screen_y = max_y - half_screen;
continue;
}
scroll_y = 0;
static int w32_proc_mouse_event(const MOUSE_EVENT_RECORD &mer)
{
const coord_def pos(mer.dwMousePosition.X + 1, mer.dwMousePosition.Y + 1);
crawl_view.mousep = pos;
if (!crawl_state.mouse_enabled)
return (0);
c_mouse_event cme(pos);
if (mer.dwEventFlags & MOUSE_MOVED)
return (CK_MOUSE_MOVE);
if (mer.dwButtonState & FROM_LEFT_1ST_BUTTON_PRESSED)
cme.bstate |= c_mouse_event::BUTTON1;
else if (mer.dwButtonState & RIGHTMOST_BUTTON_PRESSED)
cme.bstate |= c_mouse_event::BUTTON3;
if ((mer.dwEventFlags & MOUSE_WHEELED) && mer.dwButtonState)
{
if (!(mer.dwButtonState & 0x10000000UL))
cme.bstate |= c_mouse_event::BUTTON_SCRL_UP;
else
cme.bstate |= c_mouse_event::BUTTON_SCRL_DN;
}
if (cme)
{
new_mouse_event(cme);
return (CK_MOUSE_CLICK);
}
return (0);
}
macro_meta_entry, wiz_mode, colours, char_set, cset_ascii,
cset_ibm, cset_dec, feature, classic_item_colours
macro_meta_entry, mouse_input, wiz_mode, colours,
char_set, cset_ascii, cset_ibm, cset_dec, feature,
classic_item_colours
mouse_input = false
When enabled, the mouse_input option allows the game to use
mouse input events on certain platforms (Windows and Unix).
Note that the extent of mouse support varies greatly across
platforms and is strongly influenced by your terminal
settings.
On Unixes, you're only likely to get mouse support working
with ncurses in xterms (specifically your $TERM probably needs
to contain "xterm" for ncurses to activate its mouse events;
if you're running Crawl in GNU screen in an xterm, the mouse
will probably not work).
On Windows, you'll need to disable QuickEdit Mode on your
console for Crawl to use the mouse (QuickEdit is disabled by
default, so you shouldn't need to change anything if you're
using a stock console). You can disable QuickEdit by
right-clicking the titlebar of your command-prompt, selecting
Properties and disabling QuickEdit in the Options tab.