[Bug] Selection Issues

C

CursedToast

Guest
I've encountered a couple of bugs when it comes to selecting buttons, both in the Item Action Panel and inventory grid.

Issue 1:
If you click an action from the action panel that happens to be "above" a slot, when the panel closes, that slot that should be selected isn't selected. You have to mouse out of it and back into it for it to be selected (first issue shown in video below).

Issue 2:
I have a craft action that can be selected. From there, the game will wait for you to choose a second item and then process a craft if a recipe is found.
When you're in the process of selecting ingredients, you can right click to "cancel out". The cancel operation selects the previously selected item and reopens the selection menu. The problem is, if you happen to be hovering your mouse over where a secondary element would be on the action panel, both elements will visually be selected in the panel. This is the second issue shown in the video below.

Code below, just to give you an idea of the operation, just in case I'm doing something funky:
C#:
if (Input.GetMouseButton(1))
{
  // Toggle attribute and select slot index previously operated on.
  _combineAttribute.SetOverrideValue(false);
  _itemViewSlotsContainer.SelectSlot(_firstSlotIndex);

  // Re-open the item action panel.
  _displayManager.OpenPanel("Item Action Panel");

  // Run Draw so the selection graphic changes back to normal.
  _itemViewSlotsContainer.Draw();

  ToggleSlotBindings(false);
}

Issue #3:
If you move the mouse "out" of the inventory grid window, you can press space and the previously highlighted button will be considered "pressed" -- but actions will not operate. In the video, this is shown last, and I changed the button's pressed to blue to make it stand out.

Please let me know if there's anything else I can do to help troubleshoot this, or if there's any user error! :)
Thank you!!

Video showing these issues:
 
These are known issues with the ItemViewSlots & Containers. The bugs first happened when we added drag&drop support, so far we haven't found a solution that let's us both have drag&drop and selects items correctly.

I am currently working on the Item Shape grid which has a few problems with selection and drag&drop. Once I solve those issues I'll make sure to test the things you pointed out such that I may find a solution that works for everything
 
Top