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 button_url[] and hypertext element to allow mods to open web pages #13825
Conversation
It would be nice if the editbox was editable, so that user can remove parts of the url before opening it. |
Δяε tΗeгe aпythΙng тo ρяevеnτ homοgrаph? еχаmрle.org |
Not yet. I'd like to use a font that distinguishes a lot of things differently (ie I vs l) and I'd also like to color letters based on character class (which would highlight homographs) |
01df82e
to
70f72e5
Compare
I support showing punycode, especially as I don't trust our Unicode handling enough to make sure that Unicode characters would be properly discernible. I would also be fine with only allowing ASCII for a first implementation. URLs are largely ASCII-encodable, and if not, you can still have an ASCII-only URL redirect to the target URL. |
You can now open links from hypertext: <action name=open url=https://example.com/?a=b#c>open URL</action> |
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.
code complaints only :)
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.
works
Fixes #12500
This adds a new type of button and a hypertext attribute to allow opening URLs in a web browser. A button is used to require user interaction before opening URLs.
A confirmation dialog is shown, to allow the user to see the URL. Unfortunately, this confirmation dialog has to be implemented using raw Irrlicht GUI for security reasons, so cannot be themed by games and looks a bit odd compared to the rest of the GUI. This should be improved in the future
To do
This PR is Ready for Review
CURLU_PUNYCODE
requiring Curl 7.88Improve dialog message (suggestions welcome)For future PRs:
How to test
Click the red button in the Styled tab of
/test_formspec
in devtestClick the URL link in the hypertext tab