Thread: keydown in gui
View Single Post
  #1  
Old 11-12-2006, 12:09 AM
Loakey_P2P Loakey_P2P is offline
SL Oldbie
Loakey_P2P's Avatar
Join Date: Apr 2006
Location: U.S.A
Posts: 137
Loakey_P2P is an unknown quantity at this point
Send a message via AIM to Loakey_P2P Send a message via Yahoo to Loakey_P2P
keydown in gui

so i started scripting a new inventory with the new gscript2 gui stuff but i came to a problem not far into it . it has a bar on the right side of the screen with button's in it for items,weapons,armor,spells,prizes,stats,pets, and options and another smaller bar for brief discriptions . but it wont change the discription on mouse overs . ive tryed several way's and none have worked yet , can anyone help ? im not sure if i should do it in the button or with a timeout useing "in x, y" . ill have to do mouse to do different window's later too for the window to disply all stat's , or a list of item's or weapons .

PHP Code:
//#CLIENTSIDE
function onTimeOut(){
  if(
this.mode == 1){
    
DiscriptionText.show();    
  } else {
    
DiscriptionText.hide(); 
  }
  
setTimer(0.05);
}

function 
onCreated(){
  new 
GuiTextProfile(Inventory_TextProfile){fontColor "0 0 0";}
  new 
GuiWindowCtrl(MainInventoryWindow){
    
width 150;
    
height 600;
    
profile "GuiWindowProfile";
    
screenwidth 200;
    
screenheight 650;
    
canResize false;
    
canMove false;
    
canClose false;
    
canMinimize false;
    
canMaximize false;
    
destroyonhide false;
    
visible false;
    
text "Inventory"
  }
  new 
GuiWindowCtrl(DiscriptionWindow){
    
width 400;
    
height 50;
    
profile "GuiWindowProfile";
    
screenwidth 800;
    
screenheight 70;
    
canResize false;
    
canMove false;
    
canClose false;
    
canMinimize false;
    
canMaximize false;
    
destroyonhide false;
    
visible false;
    
text "Brief Discription";     
  }
  new 
GuiTextCtrl(DiscriptionText){
      
profile "GuiTextProfile";
      
screenwidth 790;
      
screenheight 45;
      
text "*Info: " client.itemdiscription;
    }   
  new 
GuiButtonCtrl(ItemButtonWindow){
    
width 110;
    
height 40;
    
profile "GuiButtonProfile";
    
screenwidth 180;
    
screenheight 615;
    
visible false;
    
text "Items";
    
setstring client.itemdiscription,the item list;     
  }
    new 
GuiButtonCtrl(WeaponButtonWindow){
    
width 110;
    
height 40;
    
profile "GuiButtonProfile";
    
screenwidth 180;
    
screenheight 560;
    
visible false;
    
text "Weapons";
    
setstring client.itemdiscription,the weapon list;    
     
  }
  new 
GuiButtonCtrl(ArmorButtonWindow){
    
width 110;
    
height 40;
    
profile "GuiButtonProfile";
    
screenwidth 180;
    
screenheight 505;
    
visible false;
    
text "Armor";     
  }
  new 
GuiButtonCtrl(ToolButtonWindow){
    
width 110;
    
height 40;
    
profile "GuiButtonProfile";
    
screenwidth 180;
    
screenheight 450;
    
visible false;
    
text "Tools";     
  }
  new 
GuiButtonCtrl(PrizeButtonWindow){
    
width 110;
    
height 40;
    
profile "GuiButtonProfile";
    
screenwidth 180;
    
screenheight 395;
    
visible false;
    
text "Prizes";     
  }
  new 
GuiButtonCtrl(SpellButtonWindow){
    
width 110;
    
height 40;
    
profile "GuiButtonProfile";
    
screenwidth 180;
    
screenheight 340;
    
visible false;
    
text "Spell";     
  }
  new 
GuiButtonCtrl(StatButtonWindow){
    
width 110;
    
height 40;
    
profile "GuiButtonProfile";
    
screenwidth 180;
    
screenheight 285;
    
visible false;
    
text "Stats";     
  }
  new 
GuiButtonCtrl(SkillButtonWindow){
    
width 110;
    
height 40;
    
profile "GuiButtonProfile";
    
screenwidth 180;
    
screenheight 230;
    
visible false;
    
text "Skills";     
  }
  new 
GuiButtonCtrl(PetButtonWindow){
    
width 110;
    
height 40;
    
profile "GuiButtonProfile";
    
screenwidth 180;
    
screenheight 175;
    
visible false;
    
text "Pets";     
  }
  new 
GuiButtonCtrl(OptionButtonWindow){
    
width 110;
    
height 40;
    
profile "GuiButtonProfile";
    
screenwidth 180;
    
screenheight 120;
    
visible false;
    
text "Options";     
  }
  
setTimer(0.05);
}

function 
onKeypressed(){
  switch(
params[1]){
    case 
"q":
      
this.mode this.mode;
      if(
this.mode == 1){
        
MainInventoryWindow.show();
        
DiscriptionWindow.show();
        
ItemButtonWindow.show();
        
WeaponButtonWindow.show();
        
ArmorButtonWindow.show();
        
ToolButtonWindow.show();
        
PrizeButtonWindow.show();
        
SpellButtonWindow.show();
        
StatButtonWindow.show();
        
SkillButtonWindow.show();
        
PetButtonWindow.show(); 
        
OptionButtonWindow.show();        
      } else {
        
MainInventoryWindow.hide();
        
DiscriptionWindow.hide();   
        
DiscriptionText.hide(); 
        
ItemButtonWindow.hide();
        
WeaponButtonWindow.hide();
        
ArmorButtonWindow.hide();
        
ToolButtonWindow.hide();
        
PrizeButtonWindow.hide();
        
SpellButtonWindow.hide();
        
StatButtonWindow.hide();
        
SkillButtonWindow.hide();        
        
PetButtonWindow.hide(); 
        
OptionButtonWindow.hide();        
      }
    break;
  }

__________________
Shaded Legend Playerworld
-Past accounts - LoakeyTheElf - Loakey_P2P
-Past Servers - Rune - Sparitoria - Shaded Legends
-Past Sl Jobs * ET/LAT/NAT/LAT Admin/Developer/Admin/Head Admin/Asst. Manager/Manager
-Current Job - Retired

*Sorry you must have mistaken me for someone that cares .

Last edited by Loakey_P2P; 11-12-2006 at 12:26 AM..
Reply With Quote