Hey. It took me almost hour do some own inventory that is hidden down. I managed that, i have inventory there, it's hiding... even I have there mouse changing and everything like in normal screen...
But it (mouse icon changing with right click) don't know why working only, when is cursor on some inventory thing or in small area, where can't be put inventory things...
Hope you understand, I can't speak english much :)
btw. to make change and use mouse in inventory I use few scripts... but it wouldn't make trouble that...
Sorry, what's the problem exactly? Right-clicking to change cursor mode has stopped working except when over the Inventory?
Post the codes you used for changing the mouse in the Inventory, and your on_mouse_click function. It's possible they're not the problem but without seeing them (or even understanding the problem properly), it's hard to tell.
And keep in mind that eMouseLeftInv and eMouseRightInv only work if the cursor is over an InventoryItem.
If you want to change the cursor while it's over the GUI, you have to use mouse.IsButtonDown() in repeatedly_execute, IIRC.
Quote from: KhrisMUC on Tue 24/07/2007 20:20:39
And keep in mind that eMouseLeftInv and eMouseRightInv only work if the cursor is over an InventoryItem.
If you want to change the cursor while it's over the GUI, you have to use mouse.IsButtonDown() in repeatedly_execute, IIRC.
Yes, that's the a problem.
I tried it (mouse.IsButtonDown), but... changing cursor is... clumsy... it's changing too fast...
Do you know what to do with that..?
Post the exact code you use. It should be possible to slow it down, but it might be easier to 'fix' what you've got, than give you new stuff that might not work with what you're using. In short: ALWAYS post code, it's usually quicker in the long run...
Use a while loop to wait for the mouse button's release.
if (mouse.IsButtonDown(eMouseLeft)) {
while (mouse.IsButtonDown(eMouseLeft)) {
Wait(1);
}
// process the click
}
Or use something like this:
bool lmb_down; // left mouse button down
// inside rep_ex
if (mouse.IsButtonDown(eMouseLeft)) lmb_down=true;
else {
if (lmb_down) {
lmb_down=false;
// process the click
}
}
This should work, too, but won't block the game.