![]() |
GuiDrawingPanel.onMouseDown() error?
I've been constructing a GUI-based project, and have run into a problem which hinders the progress I make on this project severely.
As the title suggests, when the event occurs, one of the parameters appears to go skew-whiff with the following code: PHP Code:
I though conflicting GUI names might cause the problem, but that's the only GUI I have with that name. |
Bumping until I get some sort of explanation, if there is any. :cry:
|
Just a guess, but I thought the maximum drawing panel width/height is now 1024 pixels, which the tileset is wider than.
Perhaps test the same but with a smaller image? |
Is this the entire code? Because it works fine for me.
I'd wager a guess that it's not, and that you're doing something between catching the mousedown event and the assignment that is changing the values in params. You've already given explicit symbols for the params, you might as well use them... PHP Code:
|
I find it strange that you are using the 'params' var.
Quote:
|
I suppose the only thing that could be changing the output in my onMouseDown event is the first element in the scrollpos array of the ScrollCtrl the drawing panel is inside, as I'm adding it to the mouse_x parameter to find where on the drawing panel was clicked, but I've checked and made sure the horizontal scroll bar was at its furthermost left when I clicked the panel, but it still outputs 30.
I'm not sure how my script goes, as I can't check it right now, but that's the only other thing that could be affecting it. Any ideas? |
Quote:
|
| All times are GMT +2. The time now is 01:12 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.