Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-01-2007, 10:20 PM
HolySheepy HolySheepy is offline
Registered User
Join Date: Apr 2007
Posts: 68
HolySheepy is on a distinguished road
Applying onMouseDragged to GuiTextListEntry?

Hi

well i tried
function DragTestWindowList.rows[0].icon.onMouseDragged(keymodifier,mousescreenx,mous escreeny)

but it gives that error:

error: unexpected symbol [ at line 35: function DragTestWindowList.rows[0].icon.onMouseDragged(keymodifier,mousescreenx,mous escreeny)
Reply With Quote
  #2  
Old 07-01-2007, 10:42 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Uhm
A function like that isn't valid :O

Try use thiso.catchevent() on the rows, then use onMouseDragged()
for example:

thiso.cathevent(this, "onMouseDragged", "onRowDragged");

But why would you want to drag rows?
__________________
Reply With Quote
  #3  
Old 07-01-2007, 10:59 PM
HolySheepy HolySheepy is offline
Registered User
Join Date: Apr 2007
Posts: 68
HolySheepy is on a distinguished road
i tried that, didnt really work

well i want to drag the icons of the rows
Reply With Quote
  #4  
Old 07-01-2007, 11:01 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
hmm, post some of the code used?

And I don't know if the rows support dragging :O
__________________
Reply With Quote
  #5  
Old 07-02-2007, 10:21 AM
HolySheepy HolySheepy is offline
Registered User
Join Date: Apr 2007
Posts: 68
HolySheepy is on a distinguished road
quick and dirty:

PHP Code:
//#CLIENTSIDE
function onPlayerChats()
  {
  if( 
player.chat == "/dragtest" )
    {
    
DragTestWindow.destroy();
    new 
GuiWindowCtrlDragTestWindow )
      {
      
100;
      
width 100;
      
100;
      
height 100;
      
profile GuiBlueWindowProfile;
      new 
GuiTextListCtrlDragTestWindowList )
        {
        
profile GuiBlueTextListProfile;
        
10;
        
30;
        
seticonsize(32,32);
        
width 80;
        
height 80;
        
withaddRow0"test" ) )
          {
          
icon.drawImage(0,0,"block.png");
          
withicon )
            {
            
thiso.catcheventthis"onMouseDragged""onMDrag" );
            }
          }
        }
      }
    }
  }
 
function 
onMDrag(keymodifier,mousescreenx,mousescreeny)
  {
  
player.chat "drag";
  } 
i tried the catchevent within the row didnt work
i tried the catchevent within the guitextlist, works

i guess i have to use it in guitextlist ctrl and check mousex and y to get the row x.x
Reply With Quote
  #6  
Old 07-02-2007, 03:26 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Yep, I don't think you can drag rows/row icons
__________________
Reply With Quote
  #7  
Old 07-02-2007, 03:28 PM
HolySheepy HolySheepy is offline
Registered User
Join Date: Apr 2007
Posts: 68
HolySheepy is on a distinguished road
yeah i just checked for x/y, works now
Reply With Quote
  #8  
Old 07-09-2007, 04:19 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
icon is a TDrawingPanel which does not inherit GuiControl variables/functions same with GuiTextListEntry (they both just inherit TGraalVar). Your best bet is just just put it on the GuiTextListCtrl it self and just check the selected row in the control.
__________________
Do it with a DON!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 01:23 PM.


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