[SOLVED] Changing Main Menu after beating the game - NEW GUI

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
User avatar
schivafrecce
Regular
Posts: 39
Joined: Tue Apr 04, 2017 3:06 pm
Completed: BLACK
Projects: /!\Work in progress/!\
itch: schivafrecce
Location: Saturn's 6th Moon
Contact:

[SOLVED] Changing Main Menu after beating the game - NEW GUI

#1 Post by schivafrecce »

Hi everyone. I know, this has probably been asked a thousands of times, but since I'm a complete noob and I can't find anywhere how to do this with the new Gui interface (I think the tutorial in the cookbook is too old) I need your help.

I tried putting a code like this:

Code: Select all

if persistent.ending == "True Ending":
    define gui.main_menu_background = LiveComposite(
                                                (1920, 1080),
                                                (0, 0), "white.png",     
                                                (-300, -300), "lighto",
                                                (-800, 0), "blossoms",
                                                (0, 0), "blossoms",
                                                (0, 0), "1.png",
                                                (0, 0), "gui/scritta.png"
                                                 )
else:
    define gui.main_menu_background = LiveComposite(
                                            (1920, 1080),
                                            (0, 0), "white.png",   
                                            (-300, -300), "lighto",
                                            (0, 0), "blossoms",
                                            (0, 0), "black main3.png"
                                            )
But this obviously doesn't work...what should I do? Thank you very much.
Last edited by schivafrecce on Wed Jul 05, 2017 12:40 pm, edited 1 time in total.
Image

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3808
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Changing Main Menu after beating the game - NEW GUI

#2 Post by Imperf3kt »

thats a lot of indentation, is livecomposite meant to be used like that?

Where do you have this? In the main menu screen, I assume?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: Changing Main Menu after beating the game - NEW GUI

#3 Post by IrinaLazareva »

try

Code: Select all

define gui.main_menu_background = ConditionSwitch(
    "persistent.ending == 'True Ending' ",
    LiveComposite(
        (1920, 1080),
        (0, 0), "white.png",     
        (-300, -300), "lighto",
        (-800, 0), "blossoms",
        (0, 0), "blossoms",
        (0, 0), "1.png",
        (0, 0), "gui/scritta.png"
        ),
    'not persistent.ending',
    LiveComposite(
        (1920, 1080),
        (0, 0), "white.png",   
        (-300, -300), "lighto",
        (0, 0), "blossoms",
        (0, 0), "black main3.png"
        )
    )

User avatar
schivafrecce
Regular
Posts: 39
Joined: Tue Apr 04, 2017 3:06 pm
Completed: BLACK
Projects: /!\Work in progress/!\
itch: schivafrecce
Location: Saturn's 6th Moon
Contact:

Re: Changing Main Menu after beating the game - NEW GUI

#4 Post by schivafrecce »

@IrinaLazareva THANK YOU SO MUCH it works like a charm!
@Imperf3kt I copied the code like that but I don't remember from where...it still works, but I guess it's better to use it without too much indentation :wink:
Image

Post Reply

Who is online

Users browsing this forum: Bing [Bot], cruisy__