mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-30 18:34:34 +01:00
Backends: GLFW: undo accidentally not committing use of Platform_SetClipboardTextFn as I was testing the legacy path (amend 214977e
).
This commit is contained in:
parent
fed4841bd4
commit
8b37da74db
@ -210,16 +210,6 @@ static void ImGui_ImplGlfw_InitPlatformInterface();
|
|||||||
static void ImGui_ImplGlfw_ShutdownPlatformInterface();
|
static void ImGui_ImplGlfw_ShutdownPlatformInterface();
|
||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
static const char* ImGui_ImplGlfw_GetClipboardText(void*)
|
|
||||||
{
|
|
||||||
return glfwGetClipboardString(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ImGui_ImplGlfw_SetClipboardText(void*, const char* text)
|
|
||||||
{
|
|
||||||
glfwSetClipboardString(NULL, text);
|
|
||||||
}
|
|
||||||
|
|
||||||
static ImGuiKey ImGui_ImplGlfw_KeyToImGuiKey(int key)
|
static ImGuiKey ImGui_ImplGlfw_KeyToImGuiKey(int key)
|
||||||
{
|
{
|
||||||
switch (key)
|
switch (key)
|
||||||
@ -614,8 +604,8 @@ static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, Glfw
|
|||||||
bd->WantUpdateMonitors = true;
|
bd->WantUpdateMonitors = true;
|
||||||
|
|
||||||
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
|
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
|
||||||
io.SetClipboardTextFn = ImGui_ImplGlfw_SetClipboardText;
|
platform_io.Platform_SetClipboardTextFn = [](ImGuiContext*, const char* text) { glfwSetClipboardString(NULL, text); };
|
||||||
io.GetClipboardTextFn = ImGui_ImplGlfw_GetClipboardText;
|
platform_io.Platform_GetClipboardTextFn = [](ImGuiContext*) { return glfwGetClipboardString(NULL); };
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
platform_io.Platform_OpenInShellFn = [](ImGuiContext*, const char* url) { ImGui_ImplGlfw_EmscriptenOpenURL(url); return true; };
|
platform_io.Platform_OpenInShellFn = [](ImGuiContext*, const char* url) { ImGui_ImplGlfw_EmscriptenOpenURL(url); return true; };
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user