Forums

XNA compatibility?
Last Post 14 Jan 2018 05:03 PM by Uros Berce. 8 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Uros BerceUser is Offline
New Member
New Member
Posts:5


--
03 Jan 2018 09:11 AM
    Hello Filip!

    Is there any particular reason UI library does not support XNA? Would I be able to make it run on XNA? I am interested in game menu module, and would gladly make the donation if I knew I would be able to make it run in XNA.

    Thanks!
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:684


    --
    03 Jan 2018 06:49 PM
    Hi,
    the reason is simple. XNA is old abandoned 32bit API. BUT if you really want to use it, you can make your own support for it. All you need is to make library similar to MonoGame/FNA, source is here http://github.com/EmptyKeys/UI_Engines
    Uros BerceUser is Offline
    New Member
    New Member
    Posts:5


    --
    14 Jan 2018 12:39 PM
    Hey!

    Thanks for your answer. I've added my support for XNA as you suggested and it works like a charm! Only one problem remains, that is the binaries (xnbs for images and fonts) are still being built with monogame, so I am getting errors like "{"Error loading \"Segoe_UI_10_Regular\". Cannot find ContentTypeReader \u0002\0�-\b~Microsoft.Xna.Framework.Content.SpriteFontReader, MonoGame-\0�0, Version=3.5.."}".

    If I replace the binaries manually with those built by XNA pipeline it works of course, but I'd love to have this done automatically. Any hints of how I could manage that?

    Thanks a lot!
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:684


    --
    14 Jan 2018 02:41 PM
    Hi, good to hear. To fix the fonts you have to change SpriteFontTemplate.xml file in UI Generator (source here http://github.com/EmptyKeys/UI_Generator).
    Uros BerceUser is Offline
    New Member
    New Member
    Posts:5


    --
    14 Jan 2018 03:26 PM
    Hi Filip,

    is this the file we're talking about https://github.com/EmptyKeys/UI_Generator/blob/master/ekUiGen/SpriteFontTemplate.xml ? I am not sure I understand how to modify it for the generator to produce XNA font binaries....?

    Thanks!
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:684


    --
    14 Jan 2018 03:41 PM
    yes, that's the one. You have to change it to MS XNA sprite font xml schema http://msdn.microsoft.com/en-us/lib...2147217396
    Uros BerceUser is Offline
    New Member
    New Member
    Posts:5


    --
    14 Jan 2018 03:59 PM
    Yes, that's what I thought, but to me it looks like it's already set to MS XNA schema as you suggest...?
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:684


    --
    14 Jan 2018 04:28 PM
    Then all you have to do is to use XNA content pipeline to build them.
    Uros BerceUser is Offline
    New Member
    New Member
    Posts:5


    --
    14 Jan 2018 05:03 PM
    Yes, if i build them manually with XNA pipeline it works, but I thought somehow the UI Generator was building them automatically, based on resources used in xaml? I think I got this wrong, sorry

    Thanks for your time.
    You are not authorized to post a reply.