Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:14 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.