mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
Merge pull request #1457 from akortunov/guifixes
[Feedback needed] Add scrollbar to a birth effect lists (bug #4105)
This commit is contained in:
commit
277b57b26f
3 changed files with 11 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
||||||
#include <MyGUI_ListBox.h>
|
#include <MyGUI_ListBox.h>
|
||||||
#include <MyGUI_ImageBox.h>
|
#include <MyGUI_ImageBox.h>
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
|
#include <MyGUI_ScrollView.h>
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
|
@ -244,6 +245,11 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
// Canvas size must be expressed with VScroll disabled, otherwise MyGUI would expand the scroll area when the scrollbar is hidden
|
||||||
|
mSpellArea->setVisibleVScroll(false);
|
||||||
|
mSpellArea->setCanvasSize(MyGUI::IntSize(mSpellArea->getWidth(), std::max(mSpellArea->getHeight(), coord.top)));
|
||||||
|
mSpellArea->setVisibleVScroll(true);
|
||||||
|
mSpellArea->setViewOffset(MyGUI::IntPoint(0, 0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace MWGui
|
||||||
void updateSpells();
|
void updateSpells();
|
||||||
|
|
||||||
MyGUI::ListBox* mBirthList;
|
MyGUI::ListBox* mBirthList;
|
||||||
MyGUI::Widget* mSpellArea;
|
MyGUI::ScrollView* mSpellArea;
|
||||||
MyGUI::ImageBox* mBirthImage;
|
MyGUI::ImageBox* mBirthImage;
|
||||||
std::vector<MyGUI::Widget*> mSpellItems;
|
std::vector<MyGUI::Widget*> mSpellItems;
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,9 @@
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|
||||||
<!-- Spell list -->
|
<!-- Spell list -->
|
||||||
<Widget type="Widget" skin="" position="8 160 519 178" align="Left Top" name="SpellArea"/>
|
<Widget type="ScrollView" skin="MW_ScrollView" position="8 160 507 170" align="Left Top" name="SpellArea">
|
||||||
|
<Property key="CanvasAlign" value="Left"/>
|
||||||
|
</Widget>>
|
||||||
|
|
||||||
<!-- Dialog buttons -->
|
<!-- Dialog buttons -->
|
||||||
<Widget type="HBox" position="0 338 511 24">
|
<Widget type="HBox" position="0 338 511 24">
|
||||||
|
|
Loading…
Reference in a new issue