Monday, November 28, 2016

AbiathRPC - Keep unnecessary menus disabled

Though I had already added code to AbiathRPC's connection routine to disable the menu items that don't make sense for a remote level set, I found today that they get re-enabled when the user switches levels. That's because Abiathar's SetCurLevel looks through the list of lockable menus and sets each to an appropriate state depending on whether there is a level set and whether there are any levels in it. I added an event handler on the TextChanged event of the level name label (which is fired after the level name indicator is updated, which is after menu re-enabling part) to disable those menus again.

No comments:

Post a Comment