Added clipboard copy API to Call (#11756)
This commit is contained in:
@@ -15,6 +15,7 @@ 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}
|
||||
clipboardcopy = This server wants to copy text to your clipboard. Are you sure you want to continue?\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.
|
||||
|
||||
@@ -180,6 +180,13 @@ public class Menus{
|
||||
ui.showConfirm(Core.bundle.format("linkopen", uri), () -> Core.app.openURI(uri));
|
||||
}
|
||||
|
||||
@Remote(variants = Variant.both)
|
||||
public static void copyToClipboard(String text){
|
||||
if(text == null) return;
|
||||
|
||||
ui.showConfirm(Core.bundle.format("clipboardcopy", text), () -> Core.app.setClipboardText(text));
|
||||
}
|
||||
|
||||
//internal use only
|
||||
@Remote
|
||||
public static void removeWorldLabel(int id){
|
||||
|
||||
Reference in New Issue
Block a user