Implementation Question

All about user interface, be it customizing built-in UIs or adding new ones.
Post Reply
huntsfromshadow
Posts: 3
Joined: 19 Jun 2020 12:37

Implementation Question

Post by huntsfromshadow »

So general question.

I'm working on a new project using Naninovel.

I am needing to implement an image that has clickable zones that trigger a dialog printer
or possibly set some variables in the system.

My assumption is to create a Custom UI with the clickable zones as gui buttons. The GUI takes up the screen (so for eample a map of the city). The zones have on them a PlayScript that triggers a @goto command.

This works but I find that the time between the click on the zone and the text coming up is very long (easily a second or two).
Is there something in my implementation that is wrong?

Elringus
admin
Posts: 538
Joined: 11 May 2020 18:03

Re: Implementation Question

Post by Elringus »

if you mean delay between clicking a button, that executes a goto command to another script and text coming up, such time is ok. The resources in the script needs to be loaded in memory, which will take some time. This operation should also be masked by a loading screen by default (unless you've disabled or modified loading UI).

huntsfromshadow
Posts: 3
Joined: 19 Jun 2020 12:37

Re: Implementation Question

Post by huntsfromshadow »

The catch is I'm not changing to a new scene.
Example below.

This is the ui that comes up when I run
@showui

https://pasteboard.co/JeaFHIz.jpg

If I click one of the yellow spots it takes around a second for
the text box to appear as bellow. I don't see a loading icon or anything like that.
https://pasteboard.co/JeaHoak.jpg

I did change the PluginScript to just be a text display instead of a @goto into a script file.

I'm guessing if I need it to be more responsive I need to move away from using the custom UI
and instead, use a custom service?

Elringus
admin
Posts: 538
Joined: 11 May 2020 18:03

Re: Implementation Question

Post by Elringus »

In that case the delay is due to what's happen when you press the button (UI or script setup). Normally, there shouldn't be any delay at all.

huntsfromshadow
Posts: 3
Joined: 19 Jun 2020 12:37

Re: Implementation Question

Post by huntsfromshadow »

Ahh okay I figured it out.
Not sure if this is working as intended.

The UI is full screen so it is stretched to the extends of the window.
When I do the Text show it does do the text printer immediatly but that window is behind
the UI.

After a second or so something triggers in the sytem that pops it to the top layer and now being over the UI.

That is what caused the confusion. I couldn't see the text printer appear as it was hidden by the UI.

Post Reply