Create a widget called Building Selected Widget
(shows in producing picture of unit in progress, and next 3 pictures of unit in queue)
rename the text and Set text “building name” is variable
R click on 2nd canvas, wrap with border:
A border layer is created, select it and open Brush column in details,
Change draw as to “Border”
margin set as 1,1,1,1 (mean 1 pixel border on every side)
Add a warp box next to the main box, name as ActionBox, set is variable
Repeat the same by warp with border, set draw as, and margin
Create a border covers up both boxes, set ZOrder as -1, Tints alpha 0.5, and grey color
go to graph, add variables building reference
Go to Parent Building Class, event graph, add sequence in event begin play
To set Show or remove widget during selected/deselected, add following nodes:
Now the widget works when selected the building.
Add thumbnail images to building widget:
Back to Parent building class, add 2 variables
Same as Image unit thumbnail, copy the image, rescale in 3rd party software, paste back in UE
Open First building, viewport, select the 2d image, name as Command Cetner in building name
Go to Building Selected widget, graph:
Split strict pin on Brush import of Set brush node
Make the “production image, progress bar, and next 3 pictures of unit in queue” invisible if building is not producing a unit:
Go to Parent building class, add variable, replicated:
Back to Building Widget
Create binding of visibility in unit production image layer
Create binding on visibility on Progress bar layer, unitproduction image 1,2,3 too. Copy and paste the nodes above to each of their binding graphs (not cap all screens here):