Write string vertically or dynamically instantiate UI widget using Button Click event in UI widget?
I am trying to create a UI widget in unreal 4.7... What i want here is that when the player clicks on any of the button on right the text button on left gets updated as well. I tried to find a way so that i can dynamically create them on click of button but couldn't get something workable... I could use a single string also to store the string for representation if I could be able to represent it vertically. But that also seems not available. Please help me out!!
For Example: String: "FWD-10 BKD-10 LFT-90 RGT-90"
Should be represented as:
Note: I want it to happen right when the user clicks on the button.
asked Jul 13 '15 at 11:24 AM in Blueprint Scripting
CMIIW, but until I write this, the default engine can't create new class or object from blueprint, only pawning actor. So, you should use structure instead of using object as data structure. The only way to create new class or object is create it from C++ class. so you can create static function with object as it's parameter then call it from blueprint.
Same goes for your current problem. The solution I offer to you is, instead of using textbox in widget, you can use draw text in HUD. Look at the content example from learning and read this documentation: https://docs.unrealengine.com/latest/INT/Resources/ContentExamples/Blueprints_HUD/1_1/index.html
If you still insist with your way, then this is the way that I can suggest for you:
I hope it'll help you out
answered Jul 14 '15 at 06:12 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here