Jump to content

Recommended Posts

spacer.pngspacer.pngspacer.png

Hello,

The Insight Orb system is working in my client, but I am experiencing a UI-related issue.

Issue

When an Insight Orb share is posted:

I can click the item link normally in the PM window.

Hovering over the link displays the tooltip correctly, and the system works as expected.

However, when the same link is shared in the main chat (normal chat window), it cannot be clicked.

Even when the mouse is directly over the link, there is no interaction.

No tooltip or click event is triggered.

Interestingly, if I open a PM window and place it behind the area where the link is displayed in the main chat, the link in the main chat suddenly becomes clickable and works correctly.

So:

The Insight Orb system is working.

Link generation is working.

The tooltip system is working.

Everything functions correctly in the PM window.

The issue appears to be specific to mouse detection / hit testing / link click handling in the main chat window.

If anyone has encountered this behavior before or knows which functions I should inspect and fix, I would appreciate any guidance.

Thank you.

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 4 months later...

The PM window "fixing" it when it's behind the main chat is actually the key clue.

In the stock client, hyperlink detection is global. While text is rendered, CGraphicTextInstance remembers the link that is under the cursor (Hyperlink_UpdateMousePos is called every frame from PythonApplication.cpp, and GrpTextInstance.cpp stores it). ui.GetHyperlink() / wndMgr.GetHyperlink() only returns that string.

What changes is who handles the click: it's the Python window under the mouse.

  • In a PM window, the whisper window's own OnMouseLeftButtonDown reads ui.GetHyperlink() and runs the link code.
  • In the stock uichat.py, ChatWindow is only as tall as the input line (SetSize(CHAT_WINDOW_WIDTH, 25), 0 when the input is closed). The chat lines are drawn above it, outside its rect, so a click on a line goes to GameWindow in game.py (OnMouseLeftButtonUp, the hyperlink = ui.GetHyperlink() branch, which calls self.interface.MakeHyperlinkTooltip(hyperlink)).

When you put a PM window behind the main chat, the whisper window becomes the window under the mouse, so its handler runs and the link works.

So the Insight Orb part was most likely only added to the whisper window. Names can differ depending on your client, but check these three places:

  1. game.py → OnMouseLeftButtonUp: add the same Insight Orb handling you have in the whisper window (or make sure it reaches the same function).
  2. uiinterface.py → MakeHyperlinkTooltip: if the system handles its link type in a separate function that only the whisper window calls, route it from here too.
  3. For the hover tooltip in the main chat: whatever the whisper window does in its OnUpdate with ui.GetHyperlink() has to be added to GameWindow.OnUpdate as well.

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.