-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add functionality to GUIMain to pull the readme from a specified URL in the mod. #56
Conversation
This reverts commit 0031d30.
I have things working the way I want. Had issues with async briefly where it would load the readme several times , but that is solved now so its merged back in to the netreadme branch. |
Current:
|
This can pull a readme from a file in a url or from a file inside a zip with the same name as the mod.Name using mod.ReadmeURL => "file://readme.md" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems functional enough, although the new thread feels like it could be handled better.
Examining how readme pulls are made, we can add some extra safety. Right now, a new thread will be created every frame for as long as PMLConfig.AutoPullReadme is true and the readme text is false. I recommend creating a Boolean for whether a readme pull was requested and checking for that before creating a thread.
Additionally, if the button to load the readme is called, it'll display a label for 1 frame. The label will then disappear until the button is pushed again.
Given the discussion Ill make some changes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine.
allow readmes to be held in a git repo and read from ingame