forked from mirror/openmw-tes3mp
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);
|
bool sameActor = (mPtr == actor);
|
||||||
mPtr = actor;
|
mPtr = actor;
|
||||||
mTopicsList->setEnabled(true);
|
mTopicsList->setEnabled(true);
|
||||||
|
mTopicsList->scrollToFirstItem();
|
||||||
setTitle(npcName);
|
setTitle(npcName);
|
||||||
|
|
||||||
clearChoices();
|
clearChoices();
|
||||||
|
@ -455,6 +456,7 @@ namespace MWGui
|
||||||
mKeywordSearch.seed(Misc::StringUtils::lowerCase(*it), intptr_t(t));
|
mKeywordSearch.seed(Misc::StringUtils::lowerCase(*it), intptr_t(t));
|
||||||
}
|
}
|
||||||
mTopicsList->adjustSize();
|
mTopicsList->adjustSize();
|
||||||
|
mTopicsList->scrollToFirstItem();
|
||||||
|
|
||||||
updateHistory();
|
updateHistory();
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,4 +157,8 @@ namespace Gui
|
||||||
return mScrollView->findWidget (getName() + "_item_" + name)->castType<MyGUI::Button>();
|
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);
|
MyGUI::Button* getItemWidget(const std::string& name);
|
||||||
///< get widget for an item name, useful to set up tooltip
|
///< get widget for an item name, useful to set up tooltip
|
||||||
|
|
||||||
|
void scrollToFirstItem();
|
||||||
|
|
||||||
virtual void setPropertyOverride(const std::string& _key, const std::string& _value);
|
virtual void setPropertyOverride(const std::string& _key, const std::string& _value);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Reference in a new issue