# How do I come out of cursor mode once the function HidePlayerUI has been ran. The canvas and all widgets are being hidden correctly however the cursor is still on the screen in selection mode.

**URL:** <https://forums.unrealengine.com/t/how-do-i-come-out-of-cursor-mode-once-the-function-hideplayerui-has-been-ran-the-canvas-and-all-widgets-are-being-hidden-correctly-however-the-cursor-is-still-on-the-screen-in-selection-mode/1957529>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [August 1, 2024, 1:29am UTC](https://forums.unrealengine.com/t/how-do-i-come-out-of-cursor-mode-once-the-function-hideplayerui-has-been-ran-the-canvas-and-all-widgets-are-being-hidden-correctly-however-the-cursor-is-still-on-the-screen-in-selection-mode/1957529 "2024-08-01T01:29:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FineEnvy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FineEnvy](https://forums.unrealengine.com/u/FineEnvy)\
**Post date:** [August 1, 2024, 1:29am UTC](https://forums.unrealengine.com/t/how-do-i-come-out-of-cursor-mode-once-the-function-hideplayerui-has-been-ran-the-canvas-and-all-widgets-are-being-hidden-correctly-however-the-cursor-is-still-on-the-screen-in-selection-mode/1957529/1 "2024-08-01T01:29:05Z")

</div>

```
CreateUIForPlayer(Agent:agent): void=
    if(InPlayer := player[Agent], PlayerUI := GetPlayerUI[InPlayer]):
        NewUI:= MakeUI(Agent)
        PlayerUI.AddWidget(NewUI,player_ui_slot{InputMode:=ui_input_mode.All})
        if(set MaybeMyUIPerPlayer[InPlayer] = NewUI){}

ShowPlayerUI(Agent:agent): void=
    if(PlayerUI := MaybeMyUIPerPlayer[player[Agent]]):
        PlayerUI.SetVisibility(Vis:=widget_visibility.Visible)
        

HidePlayerUI(Agent:agent): void=
    if(PlayerUI := MaybeMyUIPerPlayer[player[Agent]]):
        PlayerUI.SetVisibility(Vis:=widget_visibility.Collapsed)

```
