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";
x = screenwidth - 200;
y = 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";
x = screenwidth - 800;
y = screenheight - 70;
canResize = false;
canMove = false;
canClose = false;
canMinimize = false;
canMaximize = false;
destroyonhide = false;
visible = false;
text = "Brief Discription";
}
new GuiTextCtrl(DiscriptionText){
profile = "GuiTextProfile";
x = screenwidth - 790;
y = screenheight - 45;
text = "*Info: " @ client.itemdiscription;
}
new GuiButtonCtrl(ItemButtonWindow){
width = 110;
height = 40;
profile = "GuiButtonProfile";
x = screenwidth - 180;
y = screenheight - 615;
visible = false;
text = "Items";
setstring client.itemdiscription,the item list;
}
new GuiButtonCtrl(WeaponButtonWindow){
width = 110;
height = 40;
profile = "GuiButtonProfile";
x = screenwidth - 180;
y = screenheight - 560;
visible = false;
text = "Weapons";
setstring client.itemdiscription,the weapon list;
}
new GuiButtonCtrl(ArmorButtonWindow){
width = 110;
height = 40;
profile = "GuiButtonProfile";
x = screenwidth - 180;
y = screenheight - 505;
visible = false;
text = "Armor";
}
new GuiButtonCtrl(ToolButtonWindow){
width = 110;
height = 40;
profile = "GuiButtonProfile";
x = screenwidth - 180;
y = screenheight - 450;
visible = false;
text = "Tools";
}
new GuiButtonCtrl(PrizeButtonWindow){
width = 110;
height = 40;
profile = "GuiButtonProfile";
x = screenwidth - 180;
y = screenheight - 395;
visible = false;
text = "Prizes";
}
new GuiButtonCtrl(SpellButtonWindow){
width = 110;
height = 40;
profile = "GuiButtonProfile";
x = screenwidth - 180;
y = screenheight - 340;
visible = false;
text = "Spell";
}
new GuiButtonCtrl(StatButtonWindow){
width = 110;
height = 40;
profile = "GuiButtonProfile";
x = screenwidth - 180;
y = screenheight - 285;
visible = false;
text = "Stats";
}
new GuiButtonCtrl(SkillButtonWindow){
width = 110;
height = 40;
profile = "GuiButtonProfile";
x = screenwidth - 180;
y = screenheight - 230;
visible = false;
text = "Skills";
}
new GuiButtonCtrl(PetButtonWindow){
width = 110;
height = 40;
profile = "GuiButtonProfile";
x = screenwidth - 180;
y = screenheight - 175;
visible = false;
text = "Pets";
}
new GuiButtonCtrl(OptionButtonWindow){
width = 110;
height = 40;
profile = "GuiButtonProfile";
x = screenwidth - 180;
y = screenheight - 120;
visible = false;
text = "Options";
}
setTimer(0.05);
}
function onKeypressed(){
switch(params[1]){
case "q":
this.mode = 1 - 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;
}
}