The bill dialogs in my game were flickering, and interacting with certain UI components in certain bills would permanently break the entire bill dialog and its sub-dialogs rendering them unusable because there was no error handling. The errors in the log all pointed to this addon. One repeating error reported a null reference while another reported an unmatching amount of BeginScrollView and EndScrollView calls. The changes in this PR consist of many try-finally wrappings on begin-end patterns and a null check in the foreach loop inside RenderLinkSettings. node.Render(lt, 0); was throwing exceptions as sometimes node was null and then this would fall out of the RenderLinkSettings method entirely causing the Widgets.BeginScrollView(render_area, ref linkSettingsScrollPos, scroll_area); to never reach its closing Widgets.EndScrollView(); which caused this game-breaking behavior. This try-finally pattern was applied to all other ImGui begin-end patterns as a precaution to ensure that anywhere there is an exception, anything that was started with a begin will be ended.
The skill slider was also noninteractive because it had an ID of 0.
Thanks for your work :)
I've merged it here on GitHub, I'll release an update tomorrow or the day after to the Workshop. Feel free to poke me if I forget :)
The bill dialogs in my game were flickering, and interacting with certain UI components in certain bills would permanently break the entire bill dialog and its sub-dialogs rendering them unusable because there was no error handling. The errors in the log all pointed to this addon. One repeating error reported a null reference while another reported an unmatching amount of
BeginScrollView
andEndScrollView
calls. The changes in this PR consist of many try-finally wrappings on begin-end patterns and a null check in the foreach loop insideRenderLinkSettings
.node.Render(lt, 0);
was throwing exceptions as sometimesnode
was null and then this would fall out of theRenderLinkSettings
method entirely causing theWidgets.BeginScrollView(render_area, ref linkSettingsScrollPos, scroll_area);
to never reach its closingWidgets.EndScrollView();
which caused this game-breaking behavior. This try-finally pattern was applied to all other ImGui begin-end patterns as a precaution to ensure that anywhere there is an exception, anything that was started with abegin
will be ended.The skill slider was also noninteractive because it had an ID of 0.