Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: keybone on May 31, 2012, 11:46:28 AM

Title: inventory problem
Post by: keybone on May 31, 2012, 11:46:28 AM
Hello everyone, my problem are the items of the inventory.  :(
When I click the buttoms "prev" or "next" of the inventory to the object take disappears and  I can not use 2 inventory items together that are "far away" in inventory.
I do not know what to do.  :'(

help meee  O0

tk ::beer
Title: Re: inventory problem
Post by: keybone on June 03, 2012, 07:49:18 PM
ok solved tk all anyway  :D
Title: Re: inventory problem
Post by: Krosad on June 04, 2012, 06:05:47 PM
Can you tell a solution?
Title: Re: inventory problem
Post by: keybone on June 05, 2012, 09:55:35 AM
Quote
Can you tell a solution?

Sure.
i have used a script find in the forum with any add..

put in game.script

Code: [Select]
on "MouseWheelDown"
{
  MoveInventoryDown();
}

on "MouseWheelUp"
{
  MoveInventoryUp();
}

function MoveInventoryDown()
{

if(Game.InventoryVisible==true)
{
  var InvWindow = Game.GetInventoryWindow();
  var wleft = InvWindow.GetControl("wleft");
  var Button = InvWindow.GetControl("prev");
  if(!Button.Disabled) Button.Press();
  if(wleft.Disabled) wleft.Visible=false;
  if(!wleft.Disabled) wleft.Visible=true;
  this.PlaySound("a sound for a click");
  Sleep(300);
  wleft.Visible=false;
 }
}


function MoveInventoryUp()
{
if(Game.InventoryVisible==true)
{
  var InvWindow = Game.GetInventoryWindow();
  var wright = InvWindow.GetControl("wright");
  var Button = InvWindow.GetControl("next");
  if(!Button.Disabled) Button.Press();
  if(wright.Disabled) wright.Visible=false;
  if(!wright.Disabled) wright.Visible=true;
  this.PlaySound("a sound for a click");
  Sleep(300);
  wright.Visible=false;
}
}

in inventory.def wright and wleft are the arrow left and right..when use the wheel of the mouse the arrow become lightining only in inventory.
Title: Re: inventory problem
Post by: Krosad on June 05, 2012, 07:24:46 PM
thanx