Forum rules - please read before posting.

Question / Problem with Menus

edited September 2014 in Engine development
Hello All!

I'm trying to make a toggle a Inventory Box to come on and off but there seems to be an issue.  Here are the steps I have done:

Created a Menu Item called "InventoryMain"
Created a Menu Item Element under "InventoryMain" called "InventoryBag" as a Button and isVisible is true
Created a Menu Item Element under "InventoryMain" called "InventoryView" as a InventoryBox and isVisible is false

For the InventoryBag, I have Click Type set to "Run Action List".  This action list check to see if a Global boolean is set to "IsInventoryViewOpen".   If yes, then set the bool to false, then chose the InventoryView, else open the InventoryView.

That all works.  What happens is if you click fast on the InventoryBag, it gets confused, and then you have to click on the InventoryBag, hold down the left mouse, and move the pointer off the Element.

I have found that if I put a DialogBox at the end of each setting for opening and closing, it fixes the issue (no more confusion) but it's not an ideal fix.

I cannot pause game since I have my InventoryMain set "Appear Type" During Gameplay and that makes it disappear each time.

I'm open for suggestions.


Comments

  • Found what I think is the issue:

    I put a Debug.Log in the MenuSystem.OnElemenyClick and it fires when you click down AND when you release.

    Is there a way to have it only work when you click down once?


  • I changed my Settings->Input Method to Mouse And Keyboard and that seemed to resolve it.  How would this work for Touch Screen?
  • It should be automatic when set to Touch Screen.  Are you testing on a device, or in editor?

    Know that you can also use the Menu: Check state Action to determine if an element is visible or not - saving you the need to dedicate a Global Variable for it.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.