All Questions



Hovering over blueprints in quickbar and inventory bars doesn't show tip

In /GUI/, the initial if statement starts with the following from a previous chapter:

 if not(left_click or right_click):

In this lesson, it has been changed to:

 if left_click or right_click:

The rest of the if statement needs to be indented before the following:

    elif event is InputEventMouseMotion and is_instance_valid(held_item):
        Events.emit_signal("hovered_over_entity", held_item)

Hovering over the inventory panels should show the tip now, BUT it does not disappear when the mouse stops hovering over a panel with a blueprint. Add the following with the same indent to get that working:

    elif event is InputEventMouseMotion and not is_instance_valid(held_item):
        Events.emit_signal("hovered_over_entity", null)
  • Razoric replied

    I will add some clarifications in the tutorial text to address the inverted if statement indentation in particular.

    And you're right on the tooltip; looks like missing code. Thanks. The alternative is to connect InventoryPanel to the mouse_exited signal and emit the null call there, but looks like I missed it anyway. Will issue a fix.