Is the inventory image you refer to the one in the regular Inventory menu, or a separate "close up" image you're displaying elsewhere? By examination, are you referring to the item's Examine interaction, or when e.g. the mouse cursor hovers over it?
This should be possible with a custom script, though it will depend on the above - and will need the Menu to rely on Unity UI as its Source. If you can let me know those details - as well as a screenshot of your Settings Manager - I can see if I can help with such a script.
If you can also provide a screenshot or mockup of how the effect should look, that'll help clear things up.
Sorry for not having been clear. What I have in mind is the image that floats on top of the inventory when the item is selected (the "I" in the 4th image below - "3inventory.png")
Another (unrelated) question, also about menus: is it feasible to change the colour of a menu button depending to what happens during a scene?
For example: a menu button is blue until the user triggers an event, then it becomes red
A simple way to achive this effect would be to create a copy of the menu, with the button a different colour, and lock and unlock those according to the scene events. However, there will be too many colour changes, making this solution clumsy
Thank you in advance
Suely
(should I open another discussion for the second question to make it easier for others to find it?)
What I have in mind is the image that floats on top of the inventory when the item is selected
The inventory cursor's size can be adjusted for all items via the Inventory cursor size field inside the Cursor Manager's "Inventory cursor" panel.
For individual items, you can supply a separate, larger graphic, in the item's Cursor (optional) property field.
is it feasible to change the colour of a menu button depending to what happens during a scene?
This is best done with a Unity UI-based Menu, as the colour can then be configured from the UI Button's Image component.
There's a couple of ways to do it. One way would be to attach an Animator that affects the colour based on some parameter e.g. a Bool, and then sync that to a Global Variable via the Link Variable to Animator component.
Another way would be to update the colour directly through script:
using UnityEngine;
using UnityEngine.UI;
using AC;
public class RecolourButton : MonoBehaviour
{
public string menuName;
public string elementName;
public Color newColor;
public void ChangeColor ()
{
MenuButton button = PlayerMenus.GetElementWithName (menuName, elementName) as MenuButton;
button.uiButton.GetComponent<Image> ().color = newColor;
}
}
Comments
Is the inventory image you refer to the one in the regular Inventory menu, or a separate "close up" image you're displaying elsewhere? By examination, are you referring to the item's Examine interaction, or when e.g. the mouse cursor hovers over it?
This should be possible with a custom script, though it will depend on the above - and will need the Menu to rely on Unity UI as its Source. If you can let me know those details - as well as a screenshot of your Settings Manager - I can see if I can help with such a script.
If you can also provide a screenshot or mockup of how the effect should look, that'll help clear things up.
Sorry for not having been clear. What I have in mind is the image that floats on top of the inventory when the item is selected (the "I" in the 4th image below - "3inventory.png")
https://raw.githubusercontent.com/suelydf/clutter/main/123object.PNG
https://raw.githubusercontent.com/suelydf/clutter/main/1notselected.PNG
https://raw.githubusercontent.com/suelydf/clutter/main/2inv.png
https://raw.githubusercontent.com/suelydf/clutter/main/3inventory.png
Another (unrelated) question, also about menus: is it feasible to change the colour of a menu button depending to what happens during a scene?
For example: a menu button is blue until the user triggers an event, then it becomes red
A simple way to achive this effect would be to create a copy of the menu, with the button a different colour, and lock and unlock those according to the scene events. However, there will be too many colour changes, making this solution clumsy
Thank you in advance
Suely
(should I open another discussion for the second question to make it easier for others to find it?)
The inventory cursor's size can be adjusted for all items via the Inventory cursor size field inside the Cursor Manager's "Inventory cursor" panel.
For individual items, you can supply a separate, larger graphic, in the item's Cursor (optional) property field.
This is best done with a Unity UI-based Menu, as the colour can then be configured from the UI Button's Image component.
There's a couple of ways to do it. One way would be to attach an Animator that affects the colour based on some parameter e.g. a Bool, and then sync that to a Global Variable via the Link Variable to Animator component.
Another way would be to update the colour directly through script:
amazing, thank you very much