add google photos support & fix preview
This commit is contained in:
@@ -61,6 +61,22 @@ public interface GameContext {
|
||||
*/
|
||||
void reveal(Path path);
|
||||
|
||||
/**
|
||||
* Opens a URL in the player's browser.
|
||||
*
|
||||
* <p>Here for the Google Photos sign-in, which cannot happen inside the
|
||||
* game: the consent page is Google's, it is where the password is typed,
|
||||
* and re-hosting it in a Minecraft screen would be both impossible and the
|
||||
* wrong thing to teach a player to trust.
|
||||
*
|
||||
* <p>It crosses this bridge rather than calling {@code java.awt.Desktop}
|
||||
* directly because AWT and GLFW cannot both own the main thread on macOS,
|
||||
* where the game is launched with {@code -XstartOnFirstThread}. Minecraft
|
||||
* ships an opener that already accounts for that, and it is the same one
|
||||
* behind every link in the game's own menus.
|
||||
*/
|
||||
void openUrl(String url);
|
||||
|
||||
/** The running Minecraft version, for logs and the settings screen's footer. */
|
||||
String minecraftVersion();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user