Skip to content

Commit d240661

Browse files
committed
Fix example menu not working at all for some reason
1 parent 065ba81 commit d240661

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

TestMenu/ExampleMenu.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Text;
@@ -18,8 +18,10 @@ public ExampleMenu()
1818
// To test this, checkout one of the checkbox items in this example menu. Clicking it will toggle the menu alignment.
1919
MenuController.MenuAlignment = MenuController.MenuAlignmentOption.Right;
2020

21+
MenuController.MenuToggleKey = Control.InteractionMenu;
22+
2123
// Creating the first menu.
22-
Menu menu = new Menu("Main Menu", "Subtitle") { Visible = true };
24+
Menu menu = new Menu("Main Menu", "Subtitle");
2325
MenuController.AddMenu(menu);
2426

2527
// 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.
@@ -248,7 +250,7 @@ Event handlers
248250
Debug.WriteLine($"OnMenuOpen: [{_menu}]");
249251
};
250252

251-
menu.OnDynamicListItemCurrentItemChange += ( _menu, _dynamicListItem, _oldCurrentItem, _newCurrentItem) =>
253+
menu.OnDynamicListItemCurrentItemChange += (_menu, _dynamicListItem, _oldCurrentItem, _newCurrentItem) =>
252254
{
253255
// Code in here would get executed whenever the value of the current item of a dynamic list item changes.
254256
Debug.WriteLine($"OnDynamicListItemCurrentItemChange: [{_menu}, {_dynamicListItem}, {_oldCurrentItem}, {_newCurrentItem}]");

0 commit comments

Comments
 (0)