Trying to increase de size to the CG Gallery.

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
zabuzaeldemonio
Regular
Posts: 103
Joined: Sun Jan 08, 2017 7:24 pm
Projects: Call Me
Location: Spain
Contact:

Trying to increase de size to the CG Gallery.

#1 Post by zabuzaeldemonio »

Hi there, Im using the new_gallery.rpy, and that code say that

Code: Select all

They expect button images to be 155x112 in size.
So, I really dont know how can I increase that
Here is the complete code

Code: Select all

init:
    
    # Position the navigation on the right side of the screen.
    $ style.gallery_nav_frame.xpos = 1650 - 10
    $ style.gallery_nav_frame.xanchor = 190.0
    $ style.gallery_nav_frame.ypos = 160

    # Add the gallery to the main menu.
    $ config.main_menu.insert(2, ('Gallery', "gallery", "True"))
# The entry point to the gallery code.
label gallery:
    show screen a
    show screen navigation
    show screen navigation2
    python hide:
        
        # Construct a new gallery object.
        g = Gallery()
        
        # The image used for locked buttons.
        g.locked_button = "images/mini/gallocked.png"

        # The background of a locked image.
        g.locked_background = "gui/file_picker_gallery.jpg"

        # Frames added over unlocked buttons, in hover and idle states.
        g.hover_border = "images/transparente.png"
        g.idle_border = "images/transparente.png"
        


        # An images used as the background of the various gallery pages.
        g.background = "gui/file_picker_gallery.jpg"

        # Lay out the gallery images on the screen.
        # These settings lay images out 3 across and 4 down.
        # The upper left corner of the gird is at xpos 10, ypos 20.
        # They expect button images to be 155x112 in size.
        g.grid_layout((2, 3), (50, 200), (720, 420))
        
        
        # Call make_button to show a particular button.





        # We can use g.page to introduce a second page.
        g.page("{size=-15} {/size}\n{size=+20}   Eileen    {/size}\n{size=-15} {/size}")
        
        
        g.button("images/mini/mini-tercercg.png") # this is the image for a unlocked CG
        g.unlock_image("Beach_club") # this is the image that ll be unlocked you must use the same name for the CG when you define it
        g.unlock_image("Beach_club2") # this is the second image that ll be unlocked in a set of 2 images
        
        g.button("images/mini/mini-tercercg.png")
        g.unlock_image("Beach_club3")
        
        g.button("images/mini/mini-tercercg.png")
        g.unlock_image("Beach_club")
        
        g.button("images/mini/mini-tercercg.png")
        g.unlock_image("Beach_club")
        g.unlock_image("Beach_club2")

        

       
        g.show()

    jump main_menu_screen
My personal Project:
Image

User avatar
Enchant00
Regular
Posts: 136
Joined: Tue Jan 12, 2016 1:17 am
Contact:

Re: Trying to increase de size to the CG Gallery.

#2 Post by Enchant00 »

First try putting your own custom sized button images then report back your findings. Lastly,I can't seem to find the new_gallery.rpy so if you can send me a link to it that would be great. More importantly, it is best first if you try it out with your custom buttons that way we can adjust the grid layout should the buttons appear to big.

What would be adjusted is this line of code since it is in charge of forming the grid.

Code: Select all

g.grid_layout((2, 3), (50, 200), (720, 420))
Since I not sure where your gallery script came from, likewise after reading the Gallery class in renpy to see if it's based on that, I have no idea what the other parts of the grid layout code are for. I'll be able to help you better once I can see the original source.

Post Reply

Who is online

Users browsing this forum: BBN_VN