how to build a widget shown below?
I want to creat a widget, which has main menu to open levels(interiors, terrus,etc..), views, floor plans. I am able to toggle between levels using open level node, when it is coming to Floor plans and view I am not able to do. Could any one help in this matter?
asked Mar 14 '19 at 10:38 AM in Blueprint Scripting
If you have a floor plan image that you wish to display, you make a new widget. Call this "UI_FloorPlan" or "Window_Floorplan", whatever you want. In this widget we'll start off by removing the canvas panel, add a button, then an image. The image is your floor plan. In this case I just took a screenshot of this discussion thread:
Make sure your image is set to horizontal and vertical fill, and its visibility is set to hit test invisible.
Go to the graph (top right, next to designer), select the button from the drop down menu on the left and click the pluss sign at the bottom left of the screen that says "On clicked". Make this script:
Why we're doing this you'll see later.
Next step is to create the clickable button that will be displayed on screen that allows you to open this image. Make a new widget blueprint, call this "Main_Slot" or something that makes sense to you. Here we'll add a size box, a button and a text. I've also added a border just to make the button have a slight animation when hovered, but this is not necessary. Set the size box to height override 500, and width override 300.
Set the text to horizontally and vertically aligned center.
Then go into the graph and add the following script:
Now there's just one more thing left to do and that is to create the main canvas where we can display all this. Create a new widget blueprint, call this one "MainWidget". Here, leave the canvas panel as it is and you only need to add one thing. Scroll down the left side to "user created", expand it, and drag in the Main_Slot (the previous widget we created), like so:
You can position it wherever you want on screen by dragging it around or setting the transform values manually. You don't need any script here.
I need to continue this in a comment since the answerhub doesn't allow me to add more images.
answered Mar 14 '19 at 11:35 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here