Forum rules - please read before posting.

Inspection Icons

Is it possible to change the position of the inspection icons from over the mouse to the corner of the screen?
I've tried using:

AC.PlayerMenus.GetMenuWithName("Interaction").positionType = AC_PositionType.Manual;

To position it manually, but for some reason, it isn't changing the position.

Comments

  • edited August 2019

    Is it rendered with Unity UI? If so, you'll instead need to manipulate the uiPositionType variable.

    Note that you'll then also have to call its SetCentre function to reposition it - it may be easier to just have a second Interaction menu already repositioned, and unlock it when you want to show it instead of the default one.

  • I'm using the AC menu, but I'll try the duplicate menu. Thanks!

  • For an AC menu, you'd have to set the positionType to AC_PositionType.Aligned, and then set the alignment to TextAnchor.UpperLeft (or whatever corner you need).

    To "apply" such changes made to an AC menu, you then need to call its Recalculate() function.

  • I've tried the multiple menus approach, but nothing I do seems to work. The icons always appear at the centre of the screen.

    I've tried manipulating the normal interaction screen but the same problem appears where the icons will not obey the appear type variable. I've tried disabling the cursor icons to see if that was what kept it in the centre of the screen, but that seemed to just make the icons disappear.

    The code that I am using is here: https://pastebin.com/zGV7iBsx

  • Unless a Menu's Appear type is set to Manual, you'll have to lock it as well as call TurnOff in order to prevent it from turning on again.

    DirectIntMenBackground.isLocked = true;
    DirectIntMenBackground.TurnOff ();
    

    Again, you also need to call Recalculate() on any menu you reposition, such as PointClickIntMenu at the end of the "case 0" code block.

    the same problem appears where the icons will not obey the appear type variable

    Appear type and Position type are separate - what is it exactly you're trying to do?

  • I want to find a way to move the icons up to the top right of the screen so it can be placed over a black border when the controls are set to direct since as now, the icons are just in the middle of the screen.

  • An example of the kind of HUD I am going for would be one like this from Fear Effect.

    Where the interaction icons would be in either the top right or top centre of the screen.

  • Right. Ignoring the script for the moment, then, are you able to set up the "Direct-style" Interaction menu the way you want it? With the "Point and click style" Interaction menu locked off, are you able to get things the way you want for Direct movement simply by using the Menu Manager?

    If so, the script itself should really just have to lock/unlock the two menu types depending on the current movement method.

  • Right now, I am able to get the normal interaction menu to change, but the direct version of the menu is not showing up when I try to get it to appear.

    Is there a particular size the interaction icon menu needs to be for it to be placed correctly using aligned?

  • I was able to get the menu working by setting the interaction selection method to hotspot then interaction, and from there tweaking how the two menus function.

    I would prefer if there was a way to get the icons to appear only when selected so they can only take up one part of the top menu. Is this possible?

  • I would prefer if there was a way to get the icons to appear only when selected so they can only take up one part of the top menu. Is this possible?

    You'll have to explain more clearly what you mean by that. An icon can't be selected if it's not visible. Or are you talking about the menu itself only showing when a user wants to choose an icon?

  • The icons would only appear if the player has selected them. So, the icon menu would only show the selected interaction.

  • If you rely on Unity UI, then you can just change the Button Inspector's Transition settings so that the "Normal" state is pure black / invisible.

  • I was able to get the effect in AC menu by setting the menu elements for the icons to override the icons themselves, then set their highlight texture to the icons. That worked perfectly.

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.