mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 01:15:33 +00:00
Scroll to the top of the topic list when dialog is started
This commit is contained in:
parent
9f0ccdc37a
commit
5dc6cdeb99
3 changed files with 8 additions and 0 deletions
|
@ -364,6 +364,7 @@ namespace MWGui
|
|||
bool sameActor = (mPtr == actor);
|
||||
mPtr = actor;
|
||||
mTopicsList->setEnabled(true);
|
||||
mTopicsList->scrollToFirstItem();
|
||||
setTitle(npcName);
|
||||
|
||||
clearChoices();
|
||||
|
@ -455,6 +456,7 @@ namespace MWGui
|
|||
mKeywordSearch.seed(Misc::StringUtils::lowerCase(*it), intptr_t(t));
|
||||
}
|
||||
mTopicsList->adjustSize();
|
||||
mTopicsList->scrollToFirstItem();
|
||||
|
||||
updateHistory();
|
||||
}
|
||||
|
|
|
@ -157,4 +157,8 @@ namespace Gui
|
|||
return mScrollView->findWidget (getName() + "_item_" + name)->castType<MyGUI::Button>();
|
||||
}
|
||||
|
||||
void MWList::scrollToFirstItem()
|
||||
{
|
||||
mScrollView->setViewOffset(MyGUI::IntPoint(0, 0));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,8 @@ namespace Gui
|
|||
MyGUI::Button* getItemWidget(const std::string& name);
|
||||
///< get widget for an item name, useful to set up tooltip
|
||||
|
||||
void scrollToFirstItem();
|
||||
|
||||
virtual void setPropertyOverride(const std::string& _key, const std::string& _value);
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in a new issue