Add clipboard methods
This commit is contained in:
1 parent
cd0d0f7bc5
commit
295471930f
2 files changed
+12
-3
No files matched your search
@@ -4521,6 +4521,16 @@ public final class ImGui {
|
|||||||
ImGui::CaptureMouseFromApp(want_capture_mouse_value);
|
ImGui::CaptureMouseFromApp(want_capture_mouse_value);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Clipboard Utilities (also see the LogToClipboard() function to capture or output text data to the clipboard)
|
||||||
|
|
||||||
|
public static native String GetClipboardText(); /*
|
||||||
|
return env->NewStringUTF(ImGui::GetClipboardText());
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static native void SetClipboardText(String text); /*
|
||||||
|
ImGui::SetClipboardText(text);
|
||||||
|
*/
|
||||||
|
|
||||||
// Settings/.Ini Utilities
|
// Settings/.Ini Utilities
|
||||||
// - The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini").
|
// - The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini").
|
||||||
// - Set io.IniFilename to NULL to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually.
|
// - Set io.IniFilename to NULL to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually.
|
||||||
|
|||||||
@@ -317,9 +317,8 @@ public final class ImGuiGlfwExample {
|
|||||||
ImGui.SetMouseCursor(ImGuiMouseCursor.TextInput);
|
ImGui.SetMouseCursor(ImGuiMouseCursor.TextInput);
|
||||||
}
|
}
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.Text("(?)");
|
if (ImGui.Button("Copy")) {
|
||||||
if (ImGui.IsItemHovered()) {
|
ImGui.SetClipboardText(imguiDemoLink.get());
|
||||||
ImGui.SetTooltip("You can copy and paste this link to browser");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user