Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Thu May 23, 2013 6:38 am

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: CG Gallery problem
PostPosted: Tue Jan 31, 2012 6:42 am 
Veteran
User avatar

Joined: Thu Jul 07, 2011 9:33 am
Posts: 297
Projects: BloomingBlossoms
Everytime I open my project, it says:
EDIT :no attribute to g.grid_layout

Code:
init:
    # Position the navigation on the right side of the screen.
    $ style.gallery_nav_frame.xpos = 800 - 10
    $ style.gallery_nav_frame.xanchor = 1.0
    $ style.gallery_nav_frame.ypos = 12

    # Add the gallery to the main menu.
    $ config.main_menu.insert(2, ('Gallery', "gallery", "True"))

# The entry point to the gallery code.
label gallery:
    python hide:

        # Construct a new gallery object.
        g = Gallery()

        # The image used for locked buttons.
        g.locked_button = "ZXY/gal-locked.png"

        # The background of a locked image.
        g.locked_background = "hall.png"

        # Frames added over unlocked buttons, in hover and idle states.
        g.hover_border = "ZXY/return-button.png"
        g.idle_border = "ZXY/return_button.png"

        # An images used as the background of the various gallery pages.
        g.background = "hall.png"

        # 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((3, 4), (10, 12), (160, 124))

        # Show the background page.
        g.page("Makki Yunosuke")

        # Our first button is a picture of the beach.
        g.button("ZXY/gal-makki1.png")
        #
        # These show images, if they have been unlocked. The image name must
        # have been defined using an image statement.
        g.unlock_image("satu")
        g.unlock_image("dua")
        g.unlock_image("tiga")
        #
        # This shows a displayable...
        g.display("tiga_3.png")
        # ... if all prior images have been show.
        g.allprior()

        # A second set of images.
        g.button("ZXY/gal-makki2.png")
        g.unlock_image("CG_SAD")
        g.unlock_image("CG_BT")
        g.unlock_image("CG_TALK")
        g.unlock_image("CG_BLINK")
        g.unlock_image("CG_SPECIAL")
        g.unlock_image("CG_BACK")
        g.unlock_image("cg_back")
        g.display("tiga_3.png")
        g.allprior()



        # We can use g.page to introduce a second page.
        #g.page("Characters")

        #g.button("thumb_eileen.jpg")
        #
        # Note that we can give image and unlock image more than one image
        # at a time.
        #g.unlock_image("bg lighthouse day", "eileen day happy")
        #g.unlock_image("bg lighthouse day", "eileen day mad")



        # Another page, this one for concept art.
        #g.page("Concept Art")

        #g.button("thumb_concepts.jpg")
        #
        # We can apply conditions to buttons as well as to images.
        # The "condition" condition checks an arbitrary expression.
        #g.condition("persistent.beat_game")
        #
        #g.display("concept1.jpg")
        #g.display("concept2.jpg")
        #g.display("concept3.jpg")


        # Now, show the gallery.
        g.show()

    return

_________________
Sorry for my bad english ^_^''
Image My VN Website~


Last edited by tuna_sushi on Wed Feb 01, 2012 12:25 am, edited 1 time in total.

Top
 Profile Send private message  
 
 Post subject: Re: CG Gallery problem
PostPosted: Tue Jan 31, 2012 8:10 am 
Miko-Class Veteran

Joined: Tue Jun 22, 2010 12:54 am
Posts: 572
Location: Zion Island, Solario
Completed: Christmas
Projects: [R-R]Christmas, (Un-named VN), I'M NOT A KILLER
Just a thing I noticed... you said the error is no attribute to g_grid.layout
But I think you meant, g.grid_layout...

If not, and you stated the error correctly, you probably mistyped g.grid_layout as g_grid.layout somewhere in the script...

_________________
"You can't wait for inspiration. You have to go after it with a club." --Jack London
“One must be careful with words. Words turn probabilities into facts and by sheer force of definition translate tendencies into habits.” ― Fay Weldon
"A writer who waits for ideal conditions under which to work will die without putting a word on paper." -- E.B. WHITE
"I love writing but hate starting. The page is awfully white and it says, "You may have fooled some of the people some of the time but those days are over, giftless. I'm not your agent and I'm not your mommy. I'm a white piece of paper, you wanna dance with me?" And I really, really don't." -- Aaron Sorkin

My Completed Games: Christmas


Top
 Profile Send private message  
 
 Post subject: Re: CG Gallery problem
PostPosted: Wed Feb 01, 2012 12:24 am 
Veteran
User avatar

Joined: Thu Jul 07, 2011 9:33 am
Posts: 297
Projects: BloomingBlossoms
Whoops! :oops:
I typed it wrong! :oops:
it's supposed to be
g.grid_layout ...

but that's the one I put in the code...
Quote:
AttributeError: 'Gallery' object has no attribute 'grid_layout'

_________________
Sorry for my bad english ^_^''
Image My VN Website~


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot], ParanoidNoodle


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group