mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-21 18:40:01 +00:00
Merge branch 'smbas-master'
This commit is contained in:
commit
adc8e0b93e
@ -291,7 +291,10 @@ namespace MWGui
|
|||||||
MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
MWBase::Environment::get().getDialogueManager()->goodbyeSelected();
|
MWBase::Environment::get().getDialogueManager()->goodbyeSelected();
|
||||||
|
mTopicsList->scrollToTop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogueWindow::onWindowResize(MyGUI::Window* _sender)
|
void DialogueWindow::onWindowResize(MyGUI::Window* _sender)
|
||||||
|
@ -48,7 +48,7 @@ namespace Gui
|
|||||||
const int _scrollBarWidth = 20; // fetch this from skin?
|
const int _scrollBarWidth = 20; // fetch this from skin?
|
||||||
const int scrollBarWidth = scrollbarShown ? _scrollBarWidth : 0;
|
const int scrollBarWidth = scrollbarShown ? _scrollBarWidth : 0;
|
||||||
const int spacing = 3;
|
const int spacing = 3;
|
||||||
size_t viewPosition = -mScrollView->getViewOffset().top;
|
int viewPosition = -mScrollView->getViewOffset().top;
|
||||||
|
|
||||||
while (mScrollView->getChildCount())
|
while (mScrollView->getChildCount())
|
||||||
{
|
{
|
||||||
@ -99,10 +99,10 @@ namespace Gui
|
|||||||
if (!scrollbarShown && mItemHeight > mClient->getSize().height)
|
if (!scrollbarShown && mItemHeight > mClient->getSize().height)
|
||||||
redraw(true);
|
redraw(true);
|
||||||
|
|
||||||
size_t viewRange = mScrollView->getCanvasSize().height;
|
int viewRange = mScrollView->getCanvasSize().height;
|
||||||
if(viewPosition > viewRange)
|
if(viewPosition > viewRange)
|
||||||
viewPosition = viewRange;
|
viewPosition = viewRange;
|
||||||
mScrollView->setViewOffset(MyGUI::IntPoint(0, viewPosition * -1));
|
mScrollView->setViewOffset(MyGUI::IntPoint(0, -viewPosition));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MWList::setPropertyOverride(const std::string &_key, const std::string &_value)
|
void MWList::setPropertyOverride(const std::string &_key, const std::string &_value)
|
||||||
@ -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::scrollToTop()
|
||||||
|
{
|
||||||
|
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 scrollToTop();
|
||||||
|
|
||||||
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…
x
Reference in New Issue
Block a user