Forum rules - please read before posting.

Inventory - Showing a label on mouse over of items

Hey folks,

How would I go about getting a simple text label to appear when the player mouse overs an item in the inventory? All I want this to do is show the name of the item where the mouse cursor is when hovering over.

I know I can get the data via KickStarter.runtimeInventory.hoverItem.label. Would I just turn on a menu and then update it's position at the cursor position?

I'm still using AC UI at the moment.



  • edited August 2019

    So close!

    I've realised I've gone and done this a silly way. What you see there is a text label which is an element of the inventory menu. The resposition is being done via code. This is also why the label gets cropped because it's restricted to the inventory menu area.

    I suspect the text bit should be its own menu itself, especially as AC provides a 'follow cursor' position option.

  • Inventory item labels should appear automatically in the "Hotspot" menu - see e.g. the 2D or 3D demo games.

    What is your "Interaction method" so to, and what is the "Inventory box type" property in the InventoryBox element set to?

  • edited August 2019

    Hello @ChrisIceBox

    Interaction method for the project is set to custom script & Inventory box type is set to default.

    I assumed all my custom setup shenanigans at some point might have prevented any default AC stuff like this from happening?

  • Yes, that it's exactly. The complete label when hovering over an item depends on many of the interaction settings. If set to custom, it's left as empty so as not to interfere with the desired format.

    However, I think it would be useful to provide a custom event gook to allow direct-overriding of an element's "Hotspot label". I'll look into this, but in the meantime you can move your custom label into a separate Menu set to "follow cursor".

  • Cool. I'm starting to give that a go now. One thing I'm experiencing is even if the menu position is set to follow cursor it's very offset from the mouse cursor. Are there any parameters that jump to your mind that would affect this?

  • You should see a circle icon in the screen's centre when previewing such a Menu. The menu will be positioned relative to this at runtime, but the relative position itself is set via the Position fields in the Menu's properties.

  • edited August 2019

    Another victory for Team Adventure, @ChrisIceBox!

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.
Do NOT follow this link or you will be banned from the site!