Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Thanks for taking the time to adapt the MouseTooltip code! I tried your test screen and it indeed works.

I tried adding the cursor to my hidden object screen, but I ran into the renpy.restart_interaction() error again. The biggest difference with your test screen was that my buttons are 1920x1080 px imagebuttons with focus_mask applied:

screen test_tooltips():
    tag menu

    add mtt
    virtual_cursor:
        id 'vc_test'
        cursor ("test_cursor_image", 12, 30)

        imagebutton:
            idle "/images/apple.png"
            focus_mask True
            hovered mtt.Action(Text(_("Apple"), style="mystyle"))
            action Call("apple_check")
        imagebutton:
            idle "/images/orange.png"
            focus_mask True
            hovered mtt.Action(Text(_("Orange"), style="mystyle"))
            action Call("orange_check")
        imagebutton:
            idle "/images/strawberry.png"
            focus_mask True
            hovered mtt.Action(Text(_("Orange"), style="mystyle"))
            action Call("strawberry_check")

Things I noticed:

  • if I press the Right direction key even very briefly, the cursor moves at ~200px to the right rather than a small movement
  • let's say apple.png contains a 300px wide image of an apple on a 1920x1080 px transparent background. The cursor starts on the left of the apple's pixels. If I hit the Right-direction key to get the cursor inside the apple, the cursor will instead keep moving right until all focus_mask pixels have been crossed and the cursors stops on the right outside the apple's pixels. It's like the cursor avoids the focus_mask.
  • the error typically happens when an item is at the edge of the screen and the cursor then tries moving beyond the 1920x1080 boundaries

I hope it makes sense. I could draw you an image if my explanation is not clear. Unfortunately; I can't go without imagebuttons in the project I'm doing.