Skip to content

vrp56/consoleWidget2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

The widget is made with 2 blueprints: MainConsole and PromptWidget. These blueprints are where the design of the widget are made. The MainConsole blueprint sets up the design of the whole widget while the PromptWidget sets up the design of the questions being presented. The PromptWidget has a textbox where the question being asked is placed and and editable text box that lets the user enter a response. Right now I only know how to access the editable textbox by first clicking on it. I can try to figure out a way to access without first clicking on it if needed.

All of the actual functionality is done in the level blueprint because that was the easiest way for me to test everything but I assume we can move the functionality to its own blueprint.

How it works

Once you hit play, the MainConsole blueprint is created, stored as a variable, and added to the viewport. Right now it takes up the whole screen because it was easier for testing. Once the widget is added to the viewport, the editable textbox from the PromptWidget is binded to an event that triggers when a response is entered in the editable textbox. That event takes the text that was entered, appends it with a comma and then appends that with with the output variable which stores all of the user responses so far. The output variable is then sent to a function from Rama's Victory plugin that saves the text into a file. Right now the parameters I have in the function save a file called ConsoleOutput.txt to C:\Documents. After the .txt file is updated, there is a delay that will create a new PromptWidget. Once the new widget is created, the uneditable textbox is given a random question to display by selecting a random row in a Data Table I made that stores some questions. Once that row has been grabbed, the question stored in that row is placed in the uneditable textbox. Once the question is updated, the new PromptWidget is added as a child under a scrollbox in the MainConsole widget. Then the editable textbox of the new PromptWidget is binded to the event from before and it goes again.

About

Console widget

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors