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:
// The drawing panel inside a GuiScrollCtrl
new GuiDrawingPanel("Tiles_Panel"){
x = 0;
y = 0;
width = getImgWidth("pics1.png");
height = getImgHeight("pics1.png");
drawImage(0, 0, getTileset());
}
// The event
function Tiles_Panel.onMouseDown(keymod, mouse_x, mouse_y, count){
player.chat = this.start_x = params[1]/16;
}
When the drawing panel is clicked at its furthermost left, it comes out as a decimal value around 30, which isn't right...
I though conflicting GUI names might cause the problem, but that's the only GUI I have with that name.