View Single Post
  #1  
Old 12-27-2011, 11:52 PM
iBeatz iBeatz is offline
Kavan
iBeatz's Avatar
Join Date: Dec 2010
Location: Northern Ireland, UK
Posts: 154
iBeatz will become famous soon enough
Send a message via Yahoo to iBeatz
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:
// The drawing panel inside a GuiScrollCtrl
new GuiDrawingPanel("Tiles_Panel"){
  
0;
  
0;
  
width getImgWidth("pics1.png");
  
height getImgHeight("pics1.png");
  
drawImage(00getTileset());
}

// The event
function Tiles_Panel.onMouseDown(keymodmouse_xmouse_ycount){
  
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.
__________________

Intelligence without ambition is like a bird without wings.

Reply With Quote