TomGrobbe / MenuAPI

FiveM C# Menu API. Designed specifically as a replacement of NativeUI for vMenu. Full safezone scaling supported, both left and right aligned menus supported.
https://docs.vespura.com/mapi
61 stars 46 forks source link

Menu crashes on initialize #26

Closed manel-alonso closed 4 years ago

manel-alonso commented 4 years ago

image

This error outputs when the menu initializes, here's the code:

private void CreateMenu()
        {
            // Setting the menu alignment to be right aligned. This can be changed at any time and it'll update instantly.
            // To test this, checkout one of the checkbox items in this example menu. Clicking it will toggle the menu alignment.
            MenuController.MenuAlignment = MenuController.MenuAlignmentOption.Right;

            // Creating the first menu.
            Menu menu = new Menu("Mascotas", "subtitle");
            MenuController.AddMenu(menu);

            // Adding a new button by directly creating one inline. You could also just store it and then add it but we don't need to do that in this example.
            menu.AddMenuItem(new MenuItem("Normal Button", "This is a simple button with a simple description. Scroll down for more button types!")
            {
                Enabled = true,
                LeftIcon = MenuItem.Icon.TICK
            });
        }
TomGrobbe commented 4 years ago

The error message is cut off on that screenshot so it's useless. Set debugging mode to embedded and upload the CitizenFX log file instead

manel-alonso commented 4 years ago

How can I enable this debug mode? I don't seem to find any information on how to enable it.

TomGrobbe commented 4 years ago

Right click on your project > Properties > Build > Advanced > Debugging information > Embedded