Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Simple GUI question? (https://forums.graalonline.com/forums/showthread.php?t=86432)

The_Kez 06-19-2009 11:13 PM

Simple GUI question?
 
Hopefully it's simple anyways.
When you right click in the f7 playerlist menu, it comes up with a context menu. In the context menu there are horizontal rules which I'm trying to replicate.

In the past when I've used GuiMenuCtrl, I can just say addrow( -1, "-" ); and that creates the horizontal rule.
In a context menu like this though I can't get that same thing to work. I'm assuming it's because I'm using the wrong Gui Control (I'm creating a new GUI TextListCtrl to do it). So if it -is- that, what is the name of the actual GUI Control I should be using? If that's not the issue, does anyone know what is?

Tigairius 06-19-2009 11:53 PM

It should work, can you give an example of what's not working?

cbk1994 06-20-2009 02:33 AM

Try GuiContextMenuCtrl.

The_Kez 06-20-2009 02:49 AM

Here's the function that's not working (as TextListCtrl). I'll try GuiContextMenuCtrl and see if it works, it should anyways. It's a Drop menu for the Gui based Event Control system.

PHP Code:

function onDropDownMenuobj ) {
  new 
GuiScrollCtrl("ETDropMenu_Scroll") {
    
profile GuiBlueScrollProfile;
    
showTop();
    
mousescreenx 8;
    
mousescreeny 8;
    
height = (obj == ETControl_TextList1 70 140 );
    
width 120;
    
hscrollbar "alwaysOff";
    
vscrollbar "alwaysOff";
    
    new 
GuiTextListCtrl("ETDropMenu") {
      
showtop();
      
profile GuiBlueTextListProfile;
      
height = (obj == ETControl_TextList1 70 140 );
      
width 120;
      
thiso.catcheventthis.name"onSelect" "onDropMenuAction" );
      
thiso.catcheventthis.name"onMouseLeave""onDropDestroy" );
      
clearrows();
    }
  }
  if ( 
obj == ETControl_TextList1 ) {
    
ETDropMenu.addrow0"Run Event" );
    
ETDropMenu.addrow( -1"-" );
    
ETDropMenu.addrow1"Add to favorites" );
    
ETDropMenu.addrow2"Remove from favorites" );
  }
  else {
    
ETDropMenu.addrow0"Set as Winner" );
    
ETDropMenu.addrow1"Add player to event" );
    
ETDropMenu.addrow2"Disqualify player" );
    
ETDropMenu.addrow( -1"-" );
    
ETDropMenu.addrow3"Summon Player" );
    
ETDropMenu.addrow4"Warp to Player" );
    
ETDropMenu.addrow5"Freeze Player" );
    
ETDropMenu.addrow6"Unfreeze Player" );
  } 
  
ETDropMenu.setselectedrow( -);




All times are GMT +2. The time now is 05:03 AM.

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