Bolt-Scripts / MHR-InGame-ModMenu-API

A user-friendly IMGUI inspired API for drawing in-game settings menus for REF mods in MHRise
13 stars 4 forks source link

[Bug] Can't use Repaint() #6

Closed GreenComfyTea closed 2 years ago

GreenComfyTea commented 2 years ago

Describe the bug Trying to Repaint() throws an error saying that _CModUiRepaint is nil. I am not sure that I am using it correctly thou.

Video https://drive.google.com/file/d/1GxECjoU7oxFRO4ROjTnG0COZllvVL7DC/view?usp=sharing

Bolt-Scripts commented 2 years ago

I think the issue here is again one of initialization... Didn't think this would come back to bite me so much lmao. This is probably because you're trying to repaint before the actual mod menu script is loaded, but that only happens because of the issue where the callback is called immediately.

But from looking at your video I would like to point out that you shouldn't use the repaint function in the main gui loop as that'd just constantly refresh everything which would be bad. Only use it when something changes, and only when you specifically have updated something else that doesn't trigger an update on it's own.

Bolt-Scripts commented 2 years ago

Init issues should be fixed in bcb27793c0923f2884e60fd75dbb08183ee20d7f