Re: Text Input
Posted: Mon Jul 16, 2018 9:01 am
Support and discussion forum for Pixel Crushers products
https://www.pixelcrushers.com:443/phpbb/
https://www.pixelcrushers.com:443/phpbb/viewtopic.php?t=1519
Does it work in the example scene in my last post?
In the example scene, the original conversation is still running. In this case, you wouldn't need to start a new conversation.MathBlade wrote: ↑Tue Jul 17, 2018 1:14 amI guess my last question is after the user clicks on a button in my panel I have a function similar to
{{It's better named than this.}}
public void ButtonClick()
{
}
If I want to hook back into the dialogue system to a new conversation
Am I better A) Trying to find the database object attached to the manager and some how using a Start conversation method
or B) Somehow making a trigger similar to the tutorial videos?
(I'm asking for which the system is designed for and would be better performance wise/is possible)
Code: Select all
using PixelCrushers.DialogueSystem;
...
DialogueManager.StopConversation(); // Stop current conversation if any.
DialogueManager.StartConversation("My Conversation");
I think I follow you, but I have a question: In your scene, does the second command (with 'required' keyword) appear to make the panel immediately go invisible again? Or does it not take effect at all, and the panel stays visible? If it immediately goes invisible, would you please post the command here? Maybe there's a typo or small syntax issue.
I didn't want to complicate the mockup with the commands to handle this, but it's a good question, so I added it to the updated example. The solution is to disable continue button mode using SetContinueMode() so the only way to progress is to press enter:
Code: Select all
SetContinueMode(false);
TextInput(Text Field UI, Name, Name)
Code: Select all
SetContinueMode(true); {{default}}
The updated example does that. It turns off continue button mode and waits for a bogus message "Forever". The SkillPanel has two new "continue buttons" (Back to Classes and Accept Stats) that continue the conversation.MathBlade wrote: ↑Tue Jul 17, 2018 10:40 pmMainly I wanted a UI in where the user makes a choice and presses continue at the bottom. It's much more natural and intuitive, similar to making a post on a forum. Asking a user to intuitively know to press continue at the upper right is actually shown to be a "deal breaker" for most people. If a UI isn't intuitive or what they expect (even if the system doesn't support that) then they can just walk away calling it ugly or not useful. (And yes I know the UI looks a bit ugly at the moment as I say that I'll make it better later. It's more a work in progress to show buttons)
I'd want the buttons to be in the bottom and be able to stack "custom" objects other than buttons by giving them a prefab. There is a TextInput that does take a custom prefab, but that's only with the actor and conversant a certain way and then there is no continue button or forced answer with that on the bottom.
Add another text field UI with a unique name, such as "Incrementer UI". This is why the TextInput() sequencer command lets you specify a GameObject name rather than always using the same text field UI. It lets you use different text field UIs for different purposes. In your incrementer UI, add +/- buttons that increase the value of the text field.MathBlade wrote: ↑Tue Jul 17, 2018 10:40 pmIf the NPC asks the player character "How many coins do you wish to give to the church?" (a la Baldur's Gate) Then I'd like to be able to have a simple incrementer UI spawn that handles that with a continue button at the bottom. Or other more complicated questions.