How to make the choice button unable but showing

All about user interface, be it customizing built-in UIs or adding new ones.
Post Reply
dxxds
Posts: 9
Joined: 27 Jan 2021 04:17

How to make the choice button unable but showing

Post by dxxds »

I wanna the button can be turning to the unable state, still showing but can't click by mouse

idaot
Posts: 43
Joined: 01 Aug 2020 08:25

Re: How to make the choice button unable but showing

Post by idaot »

On the top of the Choice Handler script when you create a new Choice Button, you can check Disable Interaction. If you want to control this in a Naninovel script, you can attach a Custom Variable Trigger component and on the Bool Variable Value Changed event you can set ChoiceHander.SetInteractable by dragging the choice handler button object into it. More information on Custom Variable Trigger component can be found here: https://naninovel.com/guide/custom-vari ... e-triggers

Image

dxxds
Posts: 9
Joined: 27 Jan 2021 04:17

Re: How to make the choice button unable but showing

Post by dxxds »

Is the default choice button which created by commend "@choice" can be controled by Custom Variable Trigger component?

idaot
Posts: 43
Joined: 01 Aug 2020 08:25

Re: How to make the choice button unable but showing

Post by idaot »

The default ChoiceHandlerButton is stored in Naninovel > Prefabs > ChoiceHandlers, however it is not recommended to change any of the default prefabs as breaking them might cause operation issues. When you create a new Choice Button via the Asset Menu, it is the same button design as the default one.

Post Reply