GUI: Fix Mouse Wheel Input for Unknown Game Dialog.
This should also fix this for other instances of ScrollContainer, though the dialogs / widgets may require the same change. This fixes bug Trac #10741.
This commit is contained in:
parent
6fc08fd2b1
commit
efcd857083
4 changed files with 10 additions and 0 deletions
|
@ -81,6 +81,10 @@ UnknownGameDialog::UnknownGameDialog(const DetectionResults &detectionResults) :
|
|||
rebuild();
|
||||
}
|
||||
|
||||
void UnknownGameDialog::handleMouseWheel(int x, int y, int direction) {
|
||||
_textContainer->handleMouseWheel(x, y, direction);
|
||||
}
|
||||
|
||||
void UnknownGameDialog::reflowLayout() {
|
||||
rebuild();
|
||||
Dialog::reflowLayout();
|
||||
|
|
|
@ -37,6 +37,7 @@ class UnknownGameDialog : public Dialog {
|
|||
public:
|
||||
UnknownGameDialog(const DetectionResults &detectionResults);
|
||||
|
||||
void handleMouseWheel(int x, int y, int direction);
|
||||
private:
|
||||
void rebuild();
|
||||
|
||||
|
|
|
@ -49,6 +49,10 @@ void ScrollContainerWidget::init() {
|
|||
recalc();
|
||||
}
|
||||
|
||||
void ScrollContainerWidget::handleMouseWheel(int x, int y, int direction) {
|
||||
_verticalScroll->handleMouseWheel(x, y, direction);
|
||||
}
|
||||
|
||||
void ScrollContainerWidget::recalc() {
|
||||
int scrollbarWidth = g_gui.xmlEval()->getVar("Globals.Scrollbar.Width", 0);
|
||||
_limitH = _h;
|
||||
|
|
|
@ -50,6 +50,7 @@ public:
|
|||
|
||||
Common::Rect getClipRect() const override;
|
||||
|
||||
void handleMouseWheel(int x, int y, int direction);
|
||||
protected:
|
||||
// We overload getChildY to make sure child widgets are positioned correctly.
|
||||
// Essentially this compensates for the space taken up by the tab title header.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue