Thread: GUI Problem
View Single Post
  #1  
Old 08-26-2008, 04:32 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
GUI Problem

PHP Code:
function onTimeout() {
  for (
i = 0; i <= this.itemid; i++) {
    
temp.itemx = InventoryControl.x + ("InventoryItem_" @ i).x;
    
temp.itemy = InventoryControl.y + ("InventoryItem_" @ i).y;
    
    if (
mousescreenx in |temp.itemx, temp.itemx + 32| && mousescreeny in |temp.itemy, temp.itemy + 32|) {
      new 
GuiTextCtrl("ItemText") {
          
        
profile = GuiBlueTextProfile;
            
            
/*useownprofile = true;
            profile.fontcolor = {255, 255, 255};
            profile.fillcolor = {0, 0, 0};
            profile.opaque = true;*/
            
        
x = mousescreenx;
        
y = mousescreeny;
        
height = 10;
            
        
text = "Item";            
      }
    }
    
    else {
      if (
ItemText != NULL) ItemText.destroy();
    }
    
  }
  
  
setTimer(0.05);
} 
This is a strange problem. Instead of the mouse pointer being detected over the items, it's being detected in the top right of the GUI Control. However, when using echo()s and what not, it detects where the mouse is just fine.

Very strange indeed.
Reply With Quote