Forums

Attempting to make a UserControl that is drawn alongside an object in 3d space
Last Post 26 Apr 2017 05:31 PM by Filip Dušek. 5 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Matt WilsonUser is Offline
New Member
New Member
Posts:7


--
11 Apr 2017 11:01 PM
    Hello,

    I am attempting to make an abilities menu for a character in MonoGame, and I need it drawn alongside them on the screen. The menu is contained entirely in a UserControl. I can get the coordinates on the screen using Viewport.Project, and I've seen some hints of using the Canvas control around the forums, but I can't seem to figure out how to implement it. Is there a brief example out there on how to do this, assuming a single root UI? There are other bits that need to be drawn on the screen at the same time as this UserControl.

    Thank you for the help, this is an awesome product.

    Matt
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:674


    --
    12 Apr 2017 09:27 PM
    Give me some example on how it should look like. If you want to draw some 3D stuff in UI you could just simple draw to texture and show that texture with Image control.
    Matt WilsonUser is Offline
    New Member
    New Member
    Posts:7


    --
    13 Apr 2017 12:37 AM
    I apologize, my goal wasn't very clear Imagine a 3d character in a scene, when their turn comes up in the game, I want to draw an abilities menu to their right on the screen. Basically the goal is to draw a menu at an arbitrary point on the screen defined at runtime, rather than in a grid for instance.


    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:674


    --
    15 Apr 2017 11:59 AM
    I would use Window feature for that. You can set position and content. Check the MonoGame example on GitHub.
    Matt WilsonUser is Offline
    New Member
    New Member
    Posts:7


    --
    26 Apr 2017 05:06 AM
    I'm sorry, I have been digging through the examples but for the life of me I can't figure out what you are referring to. Can you direct me to a particular file/line maybe?

    Sorry to be dense...
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:674


    --
    26 Apr 2017 05:31 PM
    You are not authorized to post a reply.