File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
imgui-binding/src/main/java/imgui
imgui-lwjgl3/src/test/java Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -4521,6 +4521,16 @@ public static ImDrawList GetForegroundDrawList() {
4521
4521
ImGui::CaptureMouseFromApp(want_capture_mouse_value);
4522
4522
*/
4523
4523
4524
+ // Clipboard Utilities (also see the LogToClipboard() function to capture or output text data to the clipboard)
4525
+
4526
+ public static native String GetClipboardText (); /*
4527
+ return env->NewStringUTF(ImGui::GetClipboardText());
4528
+ */
4529
+
4530
+ public static native void SetClipboardText (String text ); /*
4531
+ ImGui::SetClipboardText(text);
4532
+ */
4533
+
4524
4534
// Settings/.Ini Utilities
4525
4535
// - The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini").
4526
4536
// - Set io.IniFilename to NULL to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually.
Original file line number Diff line number Diff line change @@ -317,9 +317,8 @@ private void showUi() {
317
317
ImGui .SetMouseCursor (ImGuiMouseCursor .TextInput );
318
318
}
319
319
ImGui .SameLine ();
320
- ImGui .Text ("(?)" );
321
- if (ImGui .IsItemHovered ()) {
322
- ImGui .SetTooltip ("You can copy and paste this link to browser" );
320
+ if (ImGui .Button ("Copy" )) {
321
+ ImGui .SetClipboardText (imguiDemoLink .get ());
323
322
}
324
323
}
325
324
You can’t perform that action at this time.
0 commit comments