Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Widget button problem

Hello! Basically I have a widget of codeLock with the keypad (buttons). I have some buttons and text window to fulfill it with the password. I want to make button 1 print the number "1" right in to text window. Button two - print 2, button three - print 3 and etc... How can I make it? Right now player click manualy on Text box for password and write there with the keyboard. But I want to make that text box not clickable for player. Only buttons bellow are clickable. Thank you!alt text

Product Version: UE 4.16
w3.jpg (166.5 kB)
w1.jpg (495.6 kB)
more ▼

asked Sep 22 '18 at 12:12 PM in Blueprint Scripting

avatar image

23 2 5 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

its actually pretty simple for this situation. in your widget create a variable that will store the text, in this case i named my variable DisplayText and its type is string. its important that the variable be a string so that we can use the append node later. ok now that you have the variable you need to create a on click event for each button (i only did 2 buttons in the example below). now you can setup the script shown below by getting your variable, adding an append node, then setting your variable. this will basically just take the variable add the value of the B pin to the end then set the variable value. so if the variables value was 132 then you pressed the 4 button the variable would become 1324. obviously the B pin will correspond to the button pressed. the last thing we need to do is make it so the text component displays the variables value. to do this we just need to bind it, next to where it says text in the details panel there will be a drop down that says bind, here select your variable (you may need to compile for it to show). and that should be it

alt text

alt text

capture.png (102.5 kB)
capture2.png (42.7 kB)
more ▼

answered Sep 22 '18 at 02:47 PM

avatar image

10.1k 33 10 25

avatar image NewMan2332 Sep 22 '18 at 07:59 PM

Thank you so much! Maybe you know how can I change the text size in the side this text box?

avatar image ThompsonN13 Sep 22 '18 at 08:14 PM

well you actually probably want to be using a text component and not a text box component for your situation. do this so the person doesnt need to use the kepboard to enter things, the text will strictly be a representation of the buttons pressed. then is your talking about changing the font size just look for the font section in the appearances section. theres a expandable area (click the triangle) and theres a font size option there. if you insist on using a text box its pretty much the same just look for the font size option

avatar image NewMan2332 Sep 23 '18 at 08:30 AM

It works! yes... But now when I delted my text box and put there a simple text component I cant call it to the graph bluepting for some resons. Get text box I can, but i cant to get text. of the text component..

avatar image NewMan2332 Sep 23 '18 at 08:32 AM

Dosnt matter! I figure it out! Thank you so much for help me!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question