Graal Pastebin
New PastePasted on January 29, 2012.
View the raw file
// Refactored and Cleaned with (("ItemWindow_" @ item)) { new GuiShowImgCtrl("weaponImg"@temp.v) { image = thiso.search_list[temp.v].image; x = new_x_position + 15.5; y = new_y_position + 35; layer = 6; mode = 1; hint = "loading..."; this.showhints(); width = 32; height = 32; this.wep = thiso.search_list[temp.v].name; // Stores the Weapon Name thiso.catchevent(this.name, "onMouseDown", "leftMouse"); thiso.catchevent(this.name, "onRightMouseUp", "rightMouse"); // Changed it to onRightMouseUp Event thiso.catchevent(this.name, "onMouseEnter", "hoverMouseEnter"); thiso.catchevent(this.name, "onMouseLeave", "hoverMouseLeave"); } } // You no longer need the 'this.clicked' check because // you're relying on mouse up instead of down. function rightMouse(obj) { if (!this.draggingInv) { new GuiPopUpMenuCtrl("Item_Menu") { profile = "GuiBluePopUpMenuProfile"; textprofile = "Armageddon_TextList"; scrollprofile = "Armageddon_Scroll"; width = 20; // Set the Wep in the Item Menu Object this.wep = obj.wep; echo("Opening Item Menu for " @ this.wep); clearrows(); addRow(0, "Sell"); addRow(1, "Drop"); open(mousescreenx, mousescreeny); } } } function Item_Menu.onSelect(entryid, text) { temp.wep = Item_Menu.wep; // Retrieve Weapon Name from Item Menu switch (text) { case "Sell": findweapon("-Player/Shop").bringInSell(temp.wep); break; case "Drop": triggerServer("gui", name, "menuItemDrop", temp.wep); break; } }