mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 06:41:51 +00:00
Implement FR #2858270: GUI: List scrollbar actions should focus on list
svn-id: r49133
This commit is contained in:
parent
1a938956ec
commit
e0099ef394
@ -36,7 +36,7 @@
|
||||
|
||||
namespace GUI {
|
||||
|
||||
ListWidget::ListWidget(GuiObject *boss, const String &name, uint32 cmd)
|
||||
ListWidget::ListWidget(Dialog *boss, const String &name, uint32 cmd)
|
||||
: EditableWidget(boss, name), _cmd(cmd) {
|
||||
|
||||
_scrollBar = NULL;
|
||||
@ -68,7 +68,7 @@ ListWidget::ListWidget(GuiObject *boss, const String &name, uint32 cmd)
|
||||
_editColor = ThemeEngine::kFontColorNormal;
|
||||
}
|
||||
|
||||
ListWidget::ListWidget(GuiObject *boss, int x, int y, int w, int h, uint32 cmd)
|
||||
ListWidget::ListWidget(Dialog *boss, int x, int y, int w, int h, uint32 cmd)
|
||||
: EditableWidget(boss, x, y, w, h), _cmd(cmd) {
|
||||
|
||||
_scrollBar = NULL;
|
||||
@ -472,6 +472,10 @@ void ListWidget::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
|
||||
if (_currentPos != (int)data) {
|
||||
_currentPos = data;
|
||||
draw();
|
||||
|
||||
// Scrollbar actions cause list focus (which triggers a redraw)
|
||||
// NOTE: ListWidget's boss is always GUI::Dialog
|
||||
((GUI::Dialog *)_boss)->setFocusWidget(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -87,8 +87,8 @@ protected:
|
||||
ThemeEngine::FontColor _editColor;
|
||||
|
||||
public:
|
||||
ListWidget(GuiObject *boss, const String &name, uint32 cmd = 0);
|
||||
ListWidget(GuiObject *boss, int x, int y, int w, int h, uint32 cmd = 0);
|
||||
ListWidget(Dialog *boss, const String &name, uint32 cmd = 0);
|
||||
ListWidget(Dialog *boss, int x, int y, int w, int h, uint32 cmd = 0);
|
||||
virtual ~ListWidget();
|
||||
|
||||
virtual Widget *findWidget(int x, int y);
|
||||
|
Loading…
x
Reference in New Issue
Block a user