mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 18:06:26 +00:00
TITANIC: Support mouse wheel scrolling for MissiveOMat messages
This commit is contained in:
parent
32aea85344
commit
7ae58a1b2b
@ -26,6 +26,7 @@ namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CEditControl, CGameObject)
|
||||
ON_MESSAGE(EditControlMsg)
|
||||
ON_MESSAGE(MouseWheelMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CEditControl::CEditControl() : CGameObject(), _showCursor(false), _fontNumber(0), _fieldD4(2),
|
||||
@ -220,4 +221,15 @@ bool CEditControl::EditControlMsg(CEditControlMsg *msg) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CEditControl::MouseWheelMsg(CMouseWheelMsg *msg) {
|
||||
if (_name != "MissiveOMat Welcome")
|
||||
return false;
|
||||
|
||||
if (msg->_wheelUp)
|
||||
scrollTextUp();
|
||||
else
|
||||
scrollTextDown();
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
@ -30,6 +30,7 @@ namespace Titanic {
|
||||
class CEditControl : public CGameObject {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool EditControlMsg(CEditControlMsg *msg);
|
||||
bool MouseWheelMsg(CMouseWheelMsg *msg);
|
||||
protected:
|
||||
bool _showCursor;
|
||||
int _editLeft;
|
||||
|
Loading…
x
Reference in New Issue
Block a user