File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -191,8 +191,7 @@ struct WindowContext {
191
191
TriggerInfo lTriggerInfo;
192
192
TriggerInfo rTriggerInfo;
193
193
194
- sf::Cursor mouseCursors[ImGuiMouseCursor_COUNT];
195
- bool mouseCursorLoaded[ImGuiMouseCursor_COUNT] = {ImGuiKey_None};
194
+ std::optional<sf::Cursor> mouseCursors[ImGuiMouseCursor_COUNT];
196
195
197
196
#ifdef ANDROID
198
197
#ifdef USE_JNI
@@ -1065,8 +1064,7 @@ const char* getClipboardText(void* /*userData*/) {
1065
1064
}
1066
1065
1067
1066
void loadMouseCursor (ImGuiMouseCursor imguiCursorType, sf::Cursor::Type sfmlCursorType) {
1068
- s_currWindowCtx->mouseCursorLoaded [imguiCursorType] =
1069
- s_currWindowCtx->mouseCursors [imguiCursorType].loadFromSystem (sfmlCursorType);
1067
+ s_currWindowCtx->mouseCursors [imguiCursorType] = sf::Cursor::loadFromSystem (sfmlCursorType);
1070
1068
}
1071
1069
1072
1070
void updateMouseCursor (sf::Window& window) {
@@ -1078,9 +1076,9 @@ void updateMouseCursor(sf::Window& window) {
1078
1076
} else {
1079
1077
window.setMouseCursorVisible (true );
1080
1078
1081
- const sf::Cursor& c = s_currWindowCtx->mouseCursorLoaded [cursor] ?
1082
- s_currWindowCtx->mouseCursors [cursor] :
1083
- s_currWindowCtx->mouseCursors [ImGuiMouseCursor_Arrow];
1079
+ const sf::Cursor& c = s_currWindowCtx->mouseCursors [cursor] ?
1080
+ * s_currWindowCtx->mouseCursors [cursor] :
1081
+ * s_currWindowCtx->mouseCursors [ImGuiMouseCursor_Arrow];
1084
1082
window.setMouseCursor (c);
1085
1083
}
1086
1084
}
You can’t perform that action at this time.
0 commit comments