Transitions from imagemapped main menu

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
MorsAngelos

Transitions from imagemapped main menu

#1 Post by MorsAngelos »

Just a small question here, folks.
So, I want to fade to white from the main menu. Unfortunately, Ren'Py doesn't seem to realize that.

See, I'm using layout.imagemap for my main menu, and it seems to be working great. Until I decide to, say, start the game or hit the load screen, that is. Instead of fading like it's supposed to, it, well, doesn't--well, sort of. Instead of fading directly from the main menu to the load screen, it clears the screen and then fades from black to wherever I'm going. I've sort of hackishly fixed the transition to game, but the same method won't work for the menus.

It's not my config transitions as far as I know. They're all set to different transitions. And the fade to start is under the start label. Aside from that, without the imagemap, the main menu seems to fade just fine, so I'm quite sure it's a problem with the imagemap.

Oddly enough, pressing the [x] to open the quit prompt fades just fine.

tl;dr My layout.imagemap_main_menu won't properly transition to the game and to menus

A few side questions: Is there a list somewhere that pretty much tells me all of the labels that the game defaults to for everything? How does overriding labels work (I mean, an example implementation)? And is there any way to change the function of the [x]? Like, instead of going to a new screen to prompt me, it causes an overlay to appear that is pretty much the same prompt?

Thank you.

lucy
Lucy-Class Veteran
Posts: 103
Joined: Wed Feb 11, 2009 5:07 am
Location: Stuck in a cave
Contact:

Re: Transitions from imagemapped main menu

#2 Post by lucy »

FINALLY!...

I thought I am the only one suffering from the curse of the image-maps...
MorsAngelos wrote:I've sort of hackishly fixed the transition to game
Same here... I just made a seperate image that looked exactly like the main menu with it's start button on hover state. Then I set the transition from main menu to game to none. Once inside the start label, I immediatelly show the image I made earlier with no transition at all to give the user the impression he/she/it is still in the main menu and then I just scene the "actual" start of the game with whatever transition I choose...

"POOF" (Disappears)
Image

MorsAngelos

Re: Transitions from imagemapped main menu

#3 Post by MorsAngelos »

That's exactly what I did! Mostly, anyway.

But, that still doesn't fix transition to in game menus.

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Transitions from imagemapped main menu

#4 Post by JQuartz »

MorsAngelos wrote:So, I want to fade to white from the main menu.
Try using a renpy.map in the main_menu block like so:

Code: Select all

init python:
    ## Transitions.

    ## Used when entering the game menu from the game.
    config.enter_transition = Fade(.5, 0, .5, color=(255, 255, 255, 255))

    ## Used when exiting the game menu to the game.
    config.exit_transition = Fade(.5, 0, .5, color=(255, 255, 255, 255))

    ## Used between screens of the game menu.
    config.intra_transition = Fade(.5, 0, .5, color=(255, 255, 255, 255))

    ## Used when entering the game menu from the main menu.
    config.main_game_transition = Fade(.5, 0, .5, color=(255, 255, 255, 255))

    ## Used when returning to the main menu from the game.
    config.game_main_transition = Fade(.5, 0, .5, color=(255, 255, 255, 255))

    ## Used when entering the main menu from the splashscreen.
    config.end_splash_transition = Fade(.5, 0, .5, color=(255, 255, 255, 255))

    ## Used when entering the main menu after the game has ended.
    config.end_game_transition = Fade(.5, 0, .5, color=(255, 255, 255, 255))

    ## Used when a game is loaded.
    config.after_load_transition = Fade(.5, 0, .5, color=(255, 255, 255, 255))

    ## Used when the window is shown.
    config.window_show_transition = Fade(.5, 0, .5, color=(255, 255, 255, 255))

    ## Used when the window is hidden.
    config.window_hide_transition = Fade(.5, 0, .5, color=(255, 255, 255, 255))
init:
    image main_menu="main_menu5.jpg"
    image first_scene="main_menu4.jpg"
    
label main_menu:
    scene main_menu
   
    $ result = renpy.imagemap("main_menu5.jpg", "main_menu4.jpg", [
                           (100, 100, 300, 400, "preference"),
                           (500, 100, 700, 400, "start")
                          ])

    if result == "preference":
        $ ui.timer(0.0001, _intra_jumps('preferences_screen', 'main_game_transition'))


    elif result == "start":
        scene first_scene with Fade(.5, 0, .5, color=(255, 255, 255, 255))
        $ ui.timer(0.2, ui.jumpsoutofcontext('start'))
    $ ui.interact()

label start:
    scene first_scene
    "Story starts"
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

MorsAngelos
Newbie
Posts: 3
Joined: Wed Nov 25, 2009 7:45 pm
Contact:

Re: Transitions from imagemapped main menu

#5 Post by MorsAngelos »

Thanks, JQuartz.
This mostly works, but now I come across the following problem: When I right click while transition to the game from the main menu, it fades back to the main menu. Likewise if I left click, it stops the transition entirely (though I'm quite sure that's supposed to happen. I've managed to get around that.)

It's an okay feature, I guess, to be able to go back to the main menu like that, but it comes off more as a bug in my presentation of the game. Any way to fix this?

EDIT: Apparently, right clicking on the main menu transitions back to the main menu, which is what's causing the above problem with transitioning to the main menu upon right click during the transition. Is there a way to disable right clicking on the main menu temporarily? I tried using config.keymap, but it doesn't seem to be working.

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Transitions from imagemapped main menu

#6 Post by JQuartz »

MorsAngelos wrote:Is there a way to disable right clicking on the main menu temporarily?
Use ui.keymap like so:

Code: Select all

label Nothingness:
    return

label main_menu:
    
    scene main_menu
    $ ui.keymap(mouseup_3=ui.callsinnewcontext('Nothingness'))
    $ result = renpy.imagemap("main_menu5.jpg", "main_menu4.jpg", [
                           (100, 100, 300, 400, "preference"),
                           (500, 100, 700, 400, "start")
                          ])

    if result == "preference":
        $ ui.timer(0.0001, _intra_jumps('preferences_screen', 'main_game_transition'))


    elif result == "start":
        scene first_scene with Fade(.5, 0, .5, color=(255, 255, 255, 255))
        $ ui.timer(0.2, ui.jumpsoutofcontext('start'))
    $ ui.interact()
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], decocloud, Google [Bot], Toma