Skip to main content

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

Hello! 2 (mostly) new questions.
1) The base controller expansion is working well except for in a character creation screen with your Colorpicker on it. Do I need to add something manually to make sure it's available there?
2) Possibly a question with a similar answer. I did end up making a MouseVCursor method but I wasn't sure how to get it initialized to run with every screen and I'm afraid the internet has not helped much other than making sure it's in an early block. I manually set it up in a screen as such, but obviously it doesn't run in menus and pop ups:

screen mouse_sensitivity:
    virtual_cursor:
        id "VirtualCursor"
        cursor ("cursor", 12, 30)
        cursor_area (0, 0, config.screen_width, config.screen_height)
        hide_on_mouse False  # keep vcursor visible even when mouse moves
        which_stick "both"
        speed 1000.0
    add MouseToVCursor("VirtualCursor", *pygame.mouse.get_pos())

The method just captures a MOUSEMOTION event and applies the sensitivity multiplier before rendering the scene. Is this because the virtual cursor doesn't exist/run on top of menus and pop ups?

Thank you again for your help.

For the colour picker - are you using the controller version? I put out an update with color_picker_controller.rpy which you'll need to use if you'd like the bars and color picker navigation to be able to be navigated via controller.

For your screen - I think you'll want something like the event_listener screen in the controller pack, which sits on top of everything. It's added to config.always_shown_screens. If you want this mouse to work everywhere, I believe you will need to grab the mouse events and then send out a modified mouse event, otherwise you are not going to be able to do things like click and drag bars, drag and drop, or viewports. I get around this with the virtual cursor by making it a container you can put the screen stuff inside, because most games won't have a virtual cursor to navigate their entire game, and then I can pass along fake mouse events to the container's children. You're probably going to need to pass along adjusted mouse events to the entire game. I'm afraid this is about the extent to which I can assist you in this matter, however, as your question is no longer related to my tools.