mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 13:53:51 +00:00
Merge pull request #2285 from Capostrophic/mainmenu
Avoid menu button textures vertical cutoff
This commit is contained in:
commit
d727a2f25c
1 changed files with 2 additions and 3 deletions
|
@ -287,11 +287,10 @@ namespace MWGui
|
||||||
|
|
||||||
MyGUI::IntSize requested = button->getRequestedSize();
|
MyGUI::IntSize requested = button->getRequestedSize();
|
||||||
|
|
||||||
|
button->setImageCoord(MyGUI::IntCoord(0, 0, requested.width, requested.height));
|
||||||
// Trim off some of the excessive padding
|
// Trim off some of the excessive padding
|
||||||
// TODO: perhaps do this within ImageButton?
|
// TODO: perhaps do this within ImageButton?
|
||||||
int trim = 8;
|
int height = requested.height-16;
|
||||||
button->setImageCoord(MyGUI::IntCoord(0, trim, requested.width, requested.height-trim));
|
|
||||||
int height = requested.height-trim*2;
|
|
||||||
button->setImageTile(MyGUI::IntSize(requested.width, height));
|
button->setImageTile(MyGUI::IntSize(requested.width, height));
|
||||||
button->setCoord((maxwidth-requested.width) / 2, curH, requested.width, height);
|
button->setCoord((maxwidth-requested.width) / 2, curH, requested.width, height);
|
||||||
curH += height;
|
curH += height;
|
||||||
|
|
Loading…
Reference in a new issue