If I need to post some code I will, the program is 500 or so lines, and I'm not sure of what parts to post.
Here is a bit of the code before I debugged.
Code: Select all
// gui scroll
if( receiver.IsLMBDown() == true && texWin->isPointInside(device->getCursorControl()->getPosition()) == true)
{
int iniCursorPos = device->getCursorControl()->getPosition().Y;//1, 3
while(device->getCursorControl()->getPosition().Y == iniCursorPos)
{
//need to calculate time from mouse down to mouse up and get velocity
}
int CurCursorPos = device->getCursorControl()->getPosition().Y;//3, 1
for(int w = 2; w < numFile; w++)
{
GUIM[w]->setRelativePosition(vector2d<s32>(GUIM[w]->getRelativePosition().UpperLeftCorner.X,GUIM[w]->getRelativePosition().UpperLeftCorner.Y-(iniCursorPos - CurCursorPos)));
GUIM[w]->updateAbsolutePosition();
}
speed = iniCursorPos - device->getCursorControl()->getPosition().Y ; // distance
}
// gui select
if( receiver.IsRMBDown() == true && texWin->isPointInside(device->getCursorControl()->getPosition()) == true)
{
for(int sw = 2; sw < numFile; sw++)
{
//if(GUIM[sw]->isPointInside(device->getCursorControl()->getPosition()) == true)
//{
GUIM[sw]->setRelativePosition(vector2d<s32>
(50,
GUIM[sw]->getRelativePosition().UpperLeftCorner.Y));
GUIM[sw]->updateAbsolutePosition();
//}
}
}
Code: Select all
if( receiver.IsLMBDown() == false && receiver.IsRMBDown() == false && texWin->isPointInside(device->getCursorControl()->getPosition()) == true)
{
for(int w = 2; w < numFile; w++)
{
GUIM[w]->setRelativePosition(vector2d<s32>0,GUIM[w]->getRelativePosition().UpperLeftCorner.Y-(speed)));// this line was setting the textures back to 0 on the X axis arghh
// 0 - (3-1) = -2
// 0 - (1-3) = +2
GUIM[w]->updateAbsolutePosition();
}
speed = speed / 1.1;
}