mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-25 13:21:36 +00:00
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:
parent
dfe07bef90
commit
b8e0d21f0e
1 changed files with 8 additions and 9 deletions
|
@ -49,7 +49,7 @@ void() Invent_Draw =
|
||||||
|
|
||||||
|
|
||||||
local float slotofs;
|
local float slotofs;
|
||||||
slotofs = sliderpos*96*13 - 96*3;
|
slotofs = sliderpos*96*8 + 96*3;
|
||||||
|
|
||||||
for (i = 3; i < 16; i++)
|
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 (eventtype == 1 && show_inventory) //key up
|
||||||
{
|
{
|
||||||
if (param1 == k_mouse1)
|
if (param1 == k_mouse1)
|
||||||
{
|
{
|
||||||
if (mousepos_x >= 96 && mousepos_x <= 96+16)
|
|
||||||
{ //within the scrollbar
|
|
||||||
mouseisdown = false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (showcontextmenu)
|
if (showcontextmenu)
|
||||||
{
|
{
|
||||||
op = floor((mousepos_y - contextpos_y)/8);
|
op = floor((mousepos_y - contextpos_y)/8);
|
||||||
|
@ -174,7 +168,12 @@ float(float eventtype, float param1, float param2) CSQC_InputEvent =
|
||||||
}
|
}
|
||||||
else
|
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)
|
if (slotnum >= 1 && slotnum <= MAXSLOTS)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue