# How do I show a UI widget blueprint in fortnite with verse?

**URL:** <https://forums.unrealengine.com/t/how-do-i-show-a-ui-widget-blueprint-in-fortnite-with-verse/1411427>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [November 22, 2023, 9:10am UTC](https://forums.unrealengine.com/t/how-do-i-show-a-ui-widget-blueprint-in-fortnite-with-verse/1411427 "2023-11-22T09:10:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Razza994](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Razza994](https://forums.unrealengine.com/u/Razza994)\
**Post date:** [November 22, 2023, 9:10am UTC](https://forums.unrealengine.com/t/how-do-i-show-a-ui-widget-blueprint-in-fortnite-with-verse/1411427/1 "2023-11-22T09:10:29Z")

</div>

Hi there. So I am trying to set up a UI widget that displays variable text on the players screen and I was able to do that with the help of a YouTube video however I also want to display the image that is in that widget blueprint. I used verse to display the text so that the text would be variable however the code only allows for the text to appear. I want an image to be behind the text but not sure how to do that. I have tried making another widget blueprint with the image I want to use and using a HUD message device to show that however, the image is appearing on top of the text essentially hiding it. I think this is happening because the text cant be set on a layer because its not done through a HUD message device. I am hoping that there is a way to show the text and image with Verse. I have attached the code I am using below. Hope this makes sense I can explain further if it doesnt.

using { /Fortnite.com/Devices }  
using { /Fortnite.com/UI }  
using { /Verse.org/Simulation }  
using { /Verse.org/Colors/NamedColors }  
using { /UnrealEngine.com/Temporary/Diagnostics }  
using { /UnrealEngine.com/Temporary/UI }  
using { /UnrealEngine.com/Temporary/SpatialMath }

A Verse-authored creative device that can be placed in a level  
ResourceUIDevice := class(creative\_device):

```
S2M<localizes>(S:string):message="{S}"

@editable PlayerSpawners : []player_spawner_device = array{}
@editable RefreshRate : float = 0.1
@editable ConditButton : conditional_button_device = conditional_button_device{}
var ResourceTextBlockPerAgent : [agent]?text_block = map{}

# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
    for(PS:PlayerSpawners):
        PS.SpawnedEvent.Subscribe(PlayerSpawned)

PlayerSpawned(Agent:agent):void=
    Print("Player Spawned")
    if(MyTextBlock:=ResourceTextBlockPerAgent[Agent]?){}
    else:
        AssignUI(Agent)

AssignUI(Agent:agent):void=
    Print("Assigning UI")
    MyCanvas:=MakeCanvas(Agent)
    if:
        PlayerUI:=GetPlayerUI[player[Agent]]
    then:
        PlayerUI.AddWidget(MyCanvas)
        spawn{RefreshUI(Agent)}

RefreshUI(Agent:agent)<suspends>:void=
    Print("Starting to Refresh")
    if(TextBlock := ResourceTextBlockPerAgent[Agent]?):
        loop:
            Sleep(RefreshRate)
            MyResource := ConditButton.GetItemCount(Agent,0)
            TextBlock.SetText(S2M("$ {MyResource}"))

MakeCanvas(Agent:agent):canvas=
    Print("Making Canvas")
    MyTextBlock:=text_block:
        DefaultTextColor:=Green

    if(set ResourceTextBlockPerAgent[Agent] = option{MyTextBlock}){}

    MyCanvas:=canvas:
        Slots:=array:
            canvas_slot:
                Widget:=MyTextBlock
                Anchors:=anchors{Minimum:=vector2{X:=0.0,Y:=0.0},Maximum:=vector2{X:=1.0,Y:=1.0}}
                Offsets:=margin{Left:=104.0,Top:=820.0,Right:=1637.0,Bottom:=220.0}

    return MyCanvas

```

---

<div class="post-metadata">

**Author:** ![Razza994](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Razza994](https://forums.unrealengine.com/u/Razza994)\
**Post date:** [November 24, 2023, 3:42pm UTC](https://forums.unrealengine.com/t/how-do-i-show-a-ui-widget-blueprint-in-fortnite-with-verse/1411427/2 "2023-11-24T15:42:29Z")

</div>

Does anyone know how this can be done?

---

<div class="post-metadata">

**Author:** ![Code\_Oreidi1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Code\_Oreidi1](https://forums.unrealengine.com/u/Code_Oreidi1)\
**Post date:** [November 25, 2023, 2:22pm UTC](https://forums.unrealengine.com/t/how-do-i-show-a-ui-widget-blueprint-in-fortnite-with-verse/1411427/3 "2023-11-25T14:22:22Z")

</div>

I need it too if you find a way tell me

---

<div class="post-metadata">

**Author:** ![KryyssX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KryyssX](https://forums.unrealengine.com/u/KryyssX)\
**Post date:** [November 26, 2023, 1:04am UTC](https://forums.unrealengine.com/t/how-do-i-show-a-ui-widget-blueprint-in-fortnite-with-verse/1411427/4 "2023-11-26T01:04:00Z")

</div>

If all you want is a pop-up with custom text using an imported texture behind it you can adapt the EZUI Pop-Up to suit your needs. Here’s the full source code.

> **[EZUI PopUp with Custom Art & FNC graphics Support (per-player UI) | Uefn...](https://dev.epicgames.com/community/snippets/J5Gp/fortnite-ezui-popup-with-custom-art-fnc-graphics-support-per-player-ui)**
>
> EZUI is an on-going project to provide tools for creators to add more visually appealing and complex UI to their games. The latest revision has added a ...
