Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - tilapisha

#22
I mean, if you click on an empty space within the inventory GUI, and you have an activeInventory item, it goes back into your inventory and your cursor mode is now interact instead of useInventory. Additionally, if you click on another inventory item, your current activeInventory goes back in your inventory, and your activeInventory now becomes what you clicked on.
#23
Hmm, this didnt work. I think its being called in the wrong function. I tried moving it, but still no results.

Code: ags
function btnIconCurInv_Click(GUIControl *control, MouseButton button)
{
  //if (player.ActiveInventory != null)
  //{
  // mouse.Mode = eModeUseinv;
  //} 
  
  if(cGoby.ActiveInventory != null){
  if(InventoryItem.GetAtScreenXY(mouse.x,  mouse.y) == null){
    cGoby.ActiveInventory = null;
      // switch to the interact cursor
      mouse.Mode = eModeInteract;
      // ...but override the appearance to look like the arrow
      mouse.UseModeGraphic(eModePointer);
    } else {
      cGoby.ActiveInventory = InventoryItem.GetAtScreenXY(mouse.x,  mouse.y);
        mouse.Mode = eModeUseinv;
      }
  }
}
#24
I would like to make the activeInventory = null when the player clicks on an empty space in the inventory GUI and have the activeInventory switch with what inventory they click on.

I assume in this function, I would have to find if the player activeInventory != null, then check where the cursor is. If in an empty space, activeInventory = null. If the cursor is on an item, then activeInventory = item, and the item gets added to inventory. Something like this:

Code: ags
function gIconbar_onClick(GUI *theGui, MouseButton button){
    if(player.ActiveInventory != null{
         if(InventoryItem.GetAtScreenXY(mouse.x,mouse.y) = null {
          inventory.AddActiveInventory
          player.ActiveInventory = null;
       } else {
       player.ActiveInventory = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
     }
   }
}




There's also this that is helpful, but I'm having a little of trouble interpreting it.
https://www.adventuregamestudio.co.uk/forums/advanced-technical-forum/putting-active-inventory-back-into-inventory-problems-solved/msg636473542/#msg636473542

#25
Hi, I have added a custom GUI to recreate Wordle within my game.


https://imgur.com/a/G4DhgR4


How do I make these buttons transparent/ white with no drop shadow?
I assume it has to do with the button classes, because that is where I changed the textColor, but I'm not sure where to find this documentation.

Thank you <3

[SOLVED]: I just uploaded a custom image for each button of a transparent png!
SMF spam blocked by CleanTalk