offsets work properly now.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1820 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2006-01-08 00:39:16 +00:00
parent dfe07bef90
commit b8e0d21f0e
1 changed files with 8 additions and 9 deletions

View File

@ -49,7 +49,7 @@ void() Invent_Draw =
local float slotofs;
slotofs = sliderpos*96*13 - 96*3;
slotofs = sliderpos*96*8 + 96*3;
for (i = 3; i < 16; i++)
{
@ -151,13 +151,7 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
if (eventtype == 1 && show_inventory) //key up
{
if (param1 == k_mouse1)
{
if (mousepos_x >= 96 && mousepos_x <= 96+16)
{ //within the scrollbar
mouseisdown = false;
return true;
}
{
if (showcontextmenu)
{
op = floor((mousepos_y - contextpos_y)/8);
@ -174,7 +168,12 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
}
else
{
if (downslotnum == slotnum) //mouse didn't move away
if (mousepos_x >= 96 && mousepos_x <= 96+16)
{ //within the scrollbar
mouseisdown = false;
}
else if (downslotnum == slotnum) //mouse didn't move away
{
if (slotnum >= 1 && slotnum <= MAXSLOTS)
{