Small menu fixes.

This commit is contained in:
Mari the Deer 2022-09-29 20:04:24 +02:00
commit 2288d06608
4 changed files with 21 additions and 15 deletions

View file

@ -305,7 +305,7 @@ Class DemolitionistInventoryTab : DemolitionistMenuTab
invlist.items[i].xpos = xx;
invlist.items[i].ypos = yy;
yy += 16;
if ( yy >= (master.ws.y-48) )
if ( yy > (master.ws.y-62) )
{
xx += maxw+16; // pad
yy = 0;
@ -402,11 +402,13 @@ Class DemolitionistInventoryTab : DemolitionistMenuTab
{
case MB_LEFT:
// see if we're clicking the scrollbar (if it exists)
if ( pos.y > (master.ws.y-21) )
if ( (pos.y > (master.ws.y-21)) && )
{
SetOffset(pos.x);
master.MenuSound("menu/demoscroll");
drag = true;
if ( SetOffset(pos.x) )
{
master.MenuSound("menu/demoscroll");
drag = true;
}
break;
}
// find which element we clicked

View file

@ -165,7 +165,7 @@ Class DemolitionistKeychainTab : DemolitionistMenuTab
invlist.items[i].xpos = xx;
invlist.items[i].ypos = yy;
yy += 16;
if ( yy >= (master.ws.y-48) )
if ( yy > (master.ws.y-62) )
{
xx += maxw+16; // pad
yy = 0;
@ -260,9 +260,11 @@ Class DemolitionistKeychainTab : DemolitionistMenuTab
// see if we're clicking the scrollbar (if it exists)
if ( pos.y > (master.ws.y-21) )
{
SetOffset(pos.x);
master.MenuSound("menu/demoscroll");
drag = true;
if ( SetOffset(pos.x) )
{
master.MenuSound("menu/demoscroll");
drag = true;
}
break;
}
// find which element we clicked

View file

@ -233,7 +233,7 @@ Class DemolitionistStoreTab : DemolitionistMenuTab
invlist[bSell].items[i].xpos = xx;
invlist[bSell].items[i].ypos = yy;
yy += 16;
if ( yy >= (master.ws.y-48) )
if ( yy > (master.ws.y-62) )
{
xx += maxw;
yy = 0;
@ -347,9 +347,11 @@ Class DemolitionistStoreTab : DemolitionistMenuTab
// see if we're clicking the scrollbar (if it exists)
if ( pos.y > (master.ws.y-21) )
{
SetOffset(pos.x);
master.MenuSound("menu/demoscroll");
drag = true;
if ( SetOffset(pos.x) )
{
master.MenuSound("menu/demoscroll");
drag = true;
}
break;
}
// find which element we clicked