I have been in the process of adding a custom menu with actions to the menubar in Sim4Life 22.214.171.12481.
The problem now is, that the custom Menu does not seem to properly add the action.
Not only does the action not appear in the menu, but the "Menu" property of the action is none-type.
Strangely enough, the "Actions"-property of the menu itself does list the test-action.
My code is this:
App = XCore.GetApp()
ChildList = App.Frame.Children
for i in range(len(ChildList)):
test = ChildList.__getitem__(i)
if test.Name == 'menu':
Menubar = ChildList.__getitem__(i)
Menu = XCoreUI.Menu('test')
subMenu = XCoreUI.Menu('subMenu')
TestAktion = XCoreUI.Action('Test')
TestAktion.Label = "Test"
TestAktion.Name = "Name"
TestAktion.Enabled = True
Verbindung = TestAktion.OnTriggered.Connect(testblock.main)
If anyone has any ideas, i would be gratefull.