Forum rules - please read before posting.

A very customized conversation menu

2»

Comments

  • To follow the code trail, look inside MenuDialogList's PreDisplay function - specifically for the GetAnimatedSprite function call within UISlot.cs.  The "isActive" parameter should be true when the slot is selected.

    Changing the "Always animate" field manually should not be necessary, but possible.  The OnMouseOverMenu custom event can be used to update your menu when hovering over each dialogue option.  By casting the "MenuElement" parameter into a "MenuDialogList", you can then retrieve the associated ButtonDialog class:

    MenuDialogList dialogList = element as MenuDialogList;
    ButtonDialog button = dialogList.GetDialogOption (slot);
    button.cursorIcon.alwaysAnimate = true;
  • I checked that in MenuDialogList.cs line 325, the uiSlots[_slot].SetImageAsSprite (icons [_slot].GetAnimatedSprite (isActive)); has isActive always = false.

    While the slot's button Highlighted Color can be displayed correctly if the icon is selected.

    If I change line 325 in MenuDialogList.cs to:
    uiSlots[_slot].SetImageAsSprite (icons [_slot].GetAnimatedSprite (true));
    then the icons can always animate.

    Another thing is, I cannot find the GetAnimatedSprite function in UISlot.cs. Is it somehow my file missed a function to set isActive = true when the icon is selected?

    Maybe there are some lines of code I can add to set the selected slot's isActive = true?
  • Apologies - GetAnimatedSprite is in CursorIcon.cs, not UISlot.cs.

    What's your AC version now?
  • edited July 2018
    I am using v1.63.1. In another clean new project I also tried v1.63.2.
  • Apologies - it seems I was testing with an in-development AC update, which addresses the issue.  This is a big update that's taking longer than expected, but will be out soon.
  • Thanks in advance.
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.