Skip to content

Conversation

olls
Copy link
Contributor

@olls olls commented Feb 16, 2018

Uses ImGui::GetMouseCursor() to select the correct SDL system cursor in ImGui_ImplSdlGL3_NewFrame.

Creates the SDL_Cursors in ImGui_ImplSdlGL3_CreateDeviceObjects, not sure if this is the best/intended structure.

@ocornut
Copy link
Owner

ocornut commented Feb 16, 2018

Thank you Oliver.
If you have time could you rework the PR to follow imgui coding convention, and apply to both SDL examples? Otherwise will do it after merging.

@olls
Copy link
Contributor Author

olls commented Feb 16, 2018

Sure

I've just noticed the ImGui_ImplSdlGL3_Init and ImGui_ImplSdlGL3_Shutdown functions. Would creation and destruction of the cursor objects be better placed in those functions rather than the DeviceObjects functions?

@ocornut
Copy link
Owner

ocornut commented Feb 16, 2018

I think it's fine. SDL doesn't specify the scope of those system cursor and they don't seem tied to a graphics context. At least for Windows they are OS hardware cursors anyway.

@olls
Copy link
Contributor Author

olls commented Feb 16, 2018

OK, I moved them into the _Init/_Shutdown functions. Let me know if I should make any more changes.

ocornut pushed a commit that referenced this pull request Feb 16, 2018
ocornut added a commit that referenced this pull request Feb 16, 2018
ocornut added a commit that referenced this pull request Feb 16, 2018
…rsor_None so it doesn't underflow array. Fixed harmless uninitialized pointer. (#1626)
@ocornut
Copy link
Owner

ocornut commented Feb 16, 2018

Merged with minor tweaks, thanks Oliver!

@ocornut ocornut closed this Feb 16, 2018
@olls
Copy link
Contributor Author

olls commented Feb 16, 2018

Cheers :)

Thanks so much for this great library!

@ocornut ocornut mentioned this pull request Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants