@@ -99,7 +99,7 @@ namespace {
9999 ccGLEnableVertexAttribs (kCCVertexAttribFlag_PosColorTex );
100100
101101 static_assert (sizeof (CCPoint) == sizeof (ccVertex2F), " so the cocos devs were right then" );
102-
102+
103103 glVertexAttribPointer (kCCVertexAttrib_Position , 2 , GL_FLOAT, GL_FALSE, 0 , poli.data ());
104104 glVertexAttribPointer (kCCVertexAttrib_Color , 4 , GL_FLOAT, GL_FALSE, 0 , colors.data ());
105105 glVertexAttribPointer (kCCVertexAttrib_TexCoords , 2 , GL_FLOAT, GL_FALSE, 0 , uvs.data ());
@@ -262,24 +262,29 @@ class $modify(CCTouchDispatcher) {
262262 if (io.WantCaptureMouse ) {
263263 bool didGDSwallow = false ;
264264
265- if (DevTools::get ()->shouldUseGDWindow () && shouldPassEventsToGDButTransformed ()) {
266- auto win = ImGui::GetMainViewport ()->Size ;
267- const auto gdRect = getGDWindowRect ();
268- if (gdRect.Contains (pos) && !DevTools::get ()->pausedGame ()) {
269- auto relativePos = ImVec2 (
270- pos.x - gdRect.Min .x ,
271- pos.y - gdRect.Min .y
272- );
273- auto x = (relativePos.x / gdRect.GetWidth ()) * win.x ;
274- auto y = (1 .f - relativePos.y / gdRect.GetHeight ()) * win.y ;
275-
276- auto pos = toCocos (ImVec2 (x, y));
277- touch->setTouchInfo (touch->getID (), pos.x , pos.y );
278- CCTouchDispatcher::touches (touches, event, type);
279-
280- ImGui::SetWindowFocus (" Geometry Dash" );
281- didGDSwallow = true ;
282- io.AddMouseButtonEvent (0 , false );
265+ auto dt = DevTools::get ();
266+ if (dt->shouldUseGDWindow () && shouldPassEventsToGDButTransformed ()) {
267+ if (dt->isHoverSelectEnabled ()) {
268+ dt->consumeNodeHoverTouch ();
269+ } else {
270+ auto win = ImGui::GetMainViewport ()->Size ;
271+ const auto gdRect = getGDWindowRect ();
272+ if (gdRect.Contains (pos) && !dt->pausedGame ()) {
273+ auto relativePos = ImVec2 (
274+ pos.x - gdRect.Min .x ,
275+ pos.y - gdRect.Min .y
276+ );
277+ auto x = (relativePos.x / gdRect.GetWidth ()) * win.x ;
278+ auto y = (1 .f - relativePos.y / gdRect.GetHeight ()) * win.y ;
279+
280+ auto pos = toCocos (ImVec2 (x, y));
281+ touch->setTouchInfo (touch->getID (), pos.x , pos.y );
282+ CCTouchDispatcher::touches (touches, event, type);
283+
284+ ImGui::SetWindowFocus (" Geometry Dash" );
285+ didGDSwallow = true ;
286+ io.AddMouseButtonEvent (0 , false );
287+ }
283288 }
284289 }
285290
0 commit comments