Allow servers to send openable links to players (#7351)

* commitin'

* Update core/assets/bundles/bundle.properties

Co-authored-by: Anuken <arnukren@gmail.com>

* Update bundle_fr.properties

* s p a c e

Co-authored-by: Anuken <arnukren@gmail.com>
This commit is contained in:
Phinner 2022-08-13 19:52:46 +02:00 committed by GitHub
parent 1f318306a7
commit 4030acbd75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View File

@ -14,6 +14,7 @@ link.f-droid.description = F-Droid listing
link.wiki.description = Official Mindustry wiki
link.suggestions.description = Suggest new features
link.bug.description = Found one? Report it here
linkopen = This server has sent you a link. Are you sure you want to open it?\n\n[sky]{0}
linkfail = Failed to open link!\nThe URL has been copied to your clipboard.
screenshot = Screenshot saved to {0}
screenshot.invalid = Map too large, potentially not enough memory for screenshot.

View File

@ -14,6 +14,7 @@ link.f-droid.description = Page F-Droid du jeu
link.wiki.description = Wiki officiel de Mindustry
link.suggestions.description = Suggérez de nouvelles fonctionnalités
link.bug.description = Vous avez trouvé un bug ? Reportez-le ici
linkopen = Ce serveur vous a envoyé un lien. Êtes-vous certain de vouloir louvrir ?\n\n[sky]{0}
linkfail = L'ouverture du lien a échouée ! \nL'URL a été copiée dans votre presse-papier.
screenshot = Capture d'écran sauvegardée dans {0}
screenshot.invalid = Carte trop grande, potentiellement pas assez de mémoire pour la capture d'écran.

View File

@ -111,6 +111,13 @@ public class Menus{
ui.hudfrag.showToast(Fonts.getGlyph(Fonts.icon, (char)unicode), text);
}
@Remote(variants = Variant.both)
public static void openURI(String uri){
if(uri == null) return;
ui.showConfirm(Core.bundle.format("linkopen", uri), () -> Core.app.openURI(uri));
}
//internal use only
@Remote
public static void removeWorldLabel(int id){