mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
TITANIC: Implement mouse scrolling for PET Remote
This commit is contained in:
@@ -274,16 +274,6 @@ private:
|
||||
*/
|
||||
CPetGlyph *getGlyph(int index) const;
|
||||
|
||||
/**
|
||||
* Scrolls the glyphs to the left
|
||||
*/
|
||||
void scrollLeft();
|
||||
|
||||
/**
|
||||
* Scrolls the glyphs to the right
|
||||
*/
|
||||
void scrollRight();
|
||||
|
||||
/**
|
||||
* Set the first visible glyph index
|
||||
*/
|
||||
@@ -455,6 +445,16 @@ public:
|
||||
*/
|
||||
void scrollToStart() { _firstVisibleIndex = 0; }
|
||||
|
||||
/**
|
||||
* Scrolls the glyphs to the left
|
||||
*/
|
||||
void scrollLeft();
|
||||
|
||||
/**
|
||||
* Scrolls the glyphs to the right
|
||||
*/
|
||||
void scrollRight();
|
||||
|
||||
/**
|
||||
* Increment the currently selected index
|
||||
*/
|
||||
|
||||
@@ -161,6 +161,15 @@ bool CPetRemote::VirtualKeyCharMsg(CVirtualKeyCharMsg *msg) {
|
||||
return _items.VirtualKeyCharMsg(msg);
|
||||
}
|
||||
|
||||
bool CPetRemote::MouseWheelMsg(CMouseWheelMsg *msg) {
|
||||
if (msg->_wheelUp)
|
||||
_items.scrollLeft();
|
||||
else
|
||||
_items.scrollRight();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CPetRemote::isValid(CPetControl *petControl) {
|
||||
return setupControl(petControl);
|
||||
}
|
||||
|
||||
@@ -112,6 +112,7 @@ public:
|
||||
virtual bool MouseButtonUpMsg(CMouseButtonUpMsg *msg);
|
||||
virtual bool MouseDoubleClickMsg(CMouseDoubleClickMsg *msg);
|
||||
virtual bool VirtualKeyCharMsg(CVirtualKeyCharMsg *msg);
|
||||
virtual bool MouseWheelMsg(CMouseWheelMsg *msg);
|
||||
|
||||
/**
|
||||
* Returns true if the object is in a valid state
|
||||
|
||||
Reference in New Issue
Block a user