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 Tue Jun 18, 2013 8:06 pm

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  [ 12 posts ] 
Author Message
 Post subject: Coding Blues 2
PostPosted: Tue Jan 10, 2012 7:28 pm 
Newbie

Joined: Fri Aug 07, 2009 2:11 am
Posts: 10
Completed: N/A
Projects: Tatari
Just some quick questions;

1) How do you move a choice menu.

For example, if I wanted to move something like this;

Code:
menu:
Choice 1
"Words"
Choice 2
Words"


To, say, the left hand side, how would I do it, just for one or two menus?

Second, how would I crop an image to fit the screen, or certain space?

Thanks in advance.


Top
 Profile Send private message  
 
 Post subject: Re: Coding Blues 2
PostPosted: Tue Jan 10, 2012 8:14 pm 
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
1) I dont understand what you mean...

2) http://www.renpy.org/wiki/renpy/doc/ref ... ns/im.Crop

_________________
"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: Coding Blues 2
PostPosted: Tue Jan 10, 2012 8:27 pm 
Eileen-Class Veteran
User avatar

Joined: Thu Dec 22, 2011 4:26 am
Posts: 1000
Location: United States
Projects: Eternal Memories, plot bunnies that won't die.
Organization: HellPanda Studios
Alex~kun wrote:
Just some quick questions;

1) How do you move a choice menu.

For example, if I wanted to move something like this;

Code:
menu:
Choice 1
"Words"
Choice 2
Words"


To, say, the left hand side, how would I do it, just for one or two menus?

Like DragoonHP, I don't really know what you're talking about. I did notice your menu code though. Pretty sure it should have colons and quotations, as in:
Code:
menu:
    "Choice 1":
       "Words"
    "Choice 2":
       "Words"


Edit: I see. Sorry, I can't help you with that. I'm not too good :lol:
I'm editing this instead of posting, because this comment isn't really worth a post. Good luck in getting an answer!

_________________
Know some awesome people? Want to thank them? Do it here!
For up to date info on my VN projects: HellPanda Studios Blog.
Tsundere VN
My new policy: All my games will have a redhead. Period.

Not really checking the forums any more due to time constraints, so if you want to contact me, PM. I'll get a notification and log in. :mrgreen:
Also, I've been hit and run posting, which means I don't see many replies. If you want to respond to something I've said, also feel free to PM me.


Last edited by redeyesblackpanda on Tue Jan 10, 2012 8:50 pm, edited 1 time in total.

Top
 Profile Send private message  
 
 Post subject: Re: Coding Blues 2
PostPosted: Tue Jan 10, 2012 8:37 pm 
Newbie

Joined: Fri Aug 07, 2009 2:11 am
Posts: 10
Completed: N/A
Projects: Tatari
Sorry, I was in a bit of a rush when I wrote it, so let me explain (hopefully) a little better.

When using this code as you described;

Code:
menu:
    "Choice 1":
       "Words"
    "Choice 2":
       "Words"


Those choices will usually appear in the middle of the screen. My question is, how do I make it, so instead of appearing in the middle of the screen, it'll appear on the left side of the screen. I only need to do it for one or two different situations.

As for my second questions, thank you for that.


Top
 Profile Send private message  
 
 Post subject: Re: Coding Blues 2
PostPosted: Tue Jan 10, 2012 8:49 pm 
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
You will have to customise choice screen (found in screens.rpy)

But I don't think it is possible to do that just for a few choices... but I might be wrong...

_________________
"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: Coding Blues 2
PostPosted: Tue Jan 10, 2012 8:54 pm 
Regular
User avatar

Joined: Sat Dec 31, 2011 7:05 pm
Posts: 98
Location: DC
Projects: Kangaroo, Terminal Love
DragoonHP wrote:
You will have to customise choice screen (found in screens.rpy)

But I don't think it is possible to do that just for a few choices... but I might be wrong...


I think it's possible to, instead of customizing that screen, create a very similar, but different type of screen, and call that one when you want the menu to the left, is it not?


Top
 Profile Send private message  
 
 Post subject: Re: Coding Blues 2
PostPosted: Tue Jan 10, 2012 9:03 pm 
Newbie

Joined: Fri Aug 07, 2009 2:11 am
Posts: 10
Completed: N/A
Projects: Tatari
MoPark wrote:
DragoonHP wrote:
You will have to customise choice screen (found in screens.rpy)

But I don't think it is possible to do that just for a few choices... but I might be wrong...


I think it's possible to, instead of customizing that screen, create a very similar, but different type of screen, and call that one when you want the menu to the left, is it not?

So... basically, it'll probably work if I copy/paste the original choice menu code, rename it, and re-align it to how I want it, then use that for any choices I want in that way?


Top
 Profile Send private message  
 
 Post subject: Re: Coding Blues 2
PostPosted: Tue Jan 10, 2012 9:07 pm 
Regular
User avatar

Joined: Sat Dec 31, 2011 7:05 pm
Posts: 98
Location: DC
Projects: Kangaroo, Terminal Love
I haven't done this before myself, but the idea seems sound enough, seeing as how you want two menus. There likely is a better method, but that was my first thought.


Top
 Profile Send private message  
 
 Post subject: Re: Coding Blues 2
PostPosted: Tue Jan 10, 2012 9:11 pm 
Newbie

Joined: Fri Aug 07, 2009 2:11 am
Posts: 10
Completed: N/A
Projects: Tatari
MoPark wrote:
I haven't done this before myself, but the idea seems sound enough, seeing as how you want two menus. There likely is a better method, but that was my first thought.

I'll test it when I get the chance, and let you know. If not, maybe someone else has an idea.


Top
 Profile Send private message  
 
 Post subject: Re: Coding Blues 2
PostPosted: Wed Jan 11, 2012 12:16 am 
Newbie

Joined: Fri Aug 07, 2009 2:11 am
Posts: 10
Completed: N/A
Projects: Tatari
So, I got it to work, kinda. The menu does move to the left side, but it overrides the original choice command. So, basically, I can't make it one or the other at any time, it's either completely left, or middle.

Code:
screen choice: <- This is where it should be originally

    window:
        style "menu_window"       
        xalign 0.5
        yalign 0.5
       
        vbox:
            style "menu"
            spacing 2
           
            for caption, action, chosen in items:
               
                if action: 
                   
                    button:
                        action action
                        style "menu_choice_button"                       

                        text caption style "menu_choice"
                   
                else:
                    text caption style "menu_caption"

init -2 python:
    config.narrator_menu = True
   
    style.menu_window.set_parent(style.default)
    style.menu_choice.set_parent(style.button_text)
    style.menu_choice.clear()
    style.menu_choice_button.set_parent(style.button)
    style.menu_choice_button.xminimum = int(config.screen_width * 0.75)
    style.menu_choice_button.xmaximum = int(config.screen_width * 0.75)


screen choice2: <- This is the new menu, placed to the left.

    window:
        style "menu_window"       
        xalign 0.0
        yalign 0.0
       
        vbox:
            style "menu"
            spacing 2
           
            for caption, action, chosen in items:
               
                if action: 
                   
                    button:
                        action action
                        style "menu_choice_button"                       

                        text caption style "menu_choice"
                   
                else:
                    text caption style "menu_caption"

init -2 python:
    config.narrator_menu = True
   
    style.menu_window.set_parent(style.default)
    style.menu_choice.set_parent(style.button_text)
    style.menu_choice.clear()
    style.menu_choice_button.set_parent(style.button)
    style.menu_choice_button.xminimum = int(config.screen_width * 0.75)
    style.menu_choice_button.xmaximum = int(config.screen_width * 0.75)




Choice2 was originally choice, but then it'd just override the first choice coding. So I renamed it choice2, but I'm not quite sure how to change it so I can use it.


Top
 Profile Send private message  
 
 Post subject: Re: Coding Blues 2
PostPosted: Wed Jan 11, 2012 5:04 am 
Veteran
User avatar

Joined: Sun Jun 26, 2011 3:01 am
Posts: 222
Projects: Demonic Harmony (Pause), Tale of the Nightingale (Pause)
I'm not quite sure what you have done but maybe copy the original menu script bit for choices and copy it, rename it (example: Menu2) and what you would need to rename and just change where it shows. I'm not sure if this would work but you could try.

_________________


Top
 Profile Send private message  
 
 Post subject: Re: Coding Blues 2
PostPosted: Wed Jan 11, 2012 8:02 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
MoPark wrote:
DragoonHP wrote:
You will have to customise choice screen (found in screens.rpy)

But I don't think it is possible to do that just for a few choices... but I might be wrong...


I think it's possible to, instead of customizing that screen, create a very similar, but different type of screen, and call that one when you want the menu to the left, is it not?


It isn't... there can be only one behaviour for menu...

@Alex~kun: You can fake a menu screen by using ui.textbuttons (or simple textbutton in screens) if you want to have it for one or two menus...
Or you can also use Style Preferences to update the menu position at run-time (not quite sure if it is possible...)

_________________
"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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot]


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