On the topic of menus...

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.
Message
Author
Skittle Sama

On the topic of menus...

#1 Post by Skittle Sama »

I had a quick question that I'm hoping someone might be able to answer for me:

For my game I have redesigned the frame around the text so that it is not one big box. It's two boxes; one surrounding the name and one surrounding the text. I really like the look of it, but my problem is that when I call a menu, the text is outside of the text frame.

I have four choices at this point; let's call them:

1. Eat
2. Run
3. Sleep
4. Fun

...as an example.

Right now when a menu is called the text for all of the choices is shown vertically like above. Is there any way to space the menu options apart so they will fit inside my frame?

Ex: Rather than

1. Eat
2. Run
3. Sleep
4. Fun

Have them appear as:

1. Eat 2. Run
3.Sleep 4. Fun

Looking for some script advice,
Skittle.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#2 Post by PyTom »

There isn't a way to do this.... but the resizing of the frame should have taken care of this for you.

Can you send me a screenshot of what you have, so I can propose an alternate way of doing it? Really, you probably want to have two separate windows here, which you can get by redefining how the character and menu functions work.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Skittle Sama

#3 Post by Skittle Sama »

I've uploaded a screenshot of the problem:

Text Problems?

The text "That's so" is usually where the name goes-
But you can see the problem clearly with this.

Do you have any suggestions?[/url]

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#4 Post by PyTom »

Okay, to fix this, you're going to want to set style.menu_window.top_padding to a value large enough to push things down into the lower part of the frame.

So you'll want to start off with a line like:

Code: Select all

init:
    $ style.menu_window.top_padding = 25
And adjust the number there until it looks right. This may cause the frame to be stretched, so you may also need to fiddle with the Frame's settings until that's right as well.

Alternatively, you can set a different background for the menu_window, as compared to the regular window.

Hope this helps.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

bookie
Veteran
Posts: 269
Joined: Fri Mar 25, 2005 10:17 pm
Contact:

#5 Post by bookie »

*stalks skittle sama*

:shock:

User avatar
clubanimon
Regular
Posts: 121
Joined: Sun Apr 10, 2005 12:56 pm
Contact:

#6 Post by clubanimon »

Wow, I hope that worksout for you skittles, the game looks fantastic so far. wwill you be posting about it in the game section soon?

Skittle Sama

#7 Post by Skittle Sama »

One other problem I thought I'd mention:

Is there any way to decrease the text size? I know that you can normally because in the narration the name size is '3' and the text size is '2'. When I attempted o fix this problem originally, I thought I might be able to adjust the text size of the menu opetions as well. When I do that it freezes the screen. Is there a reason that this can't be done, PyTom?

...No possiblity of making the characters have a continuous animation such as blinking while narration is still active and clickable, as well?
Wow, I hope that worksout for you skittles, the game looks fantastic so far. wwill you be posting about it in the game section soon?
I do, too. This game has been in planning since 1998. Thanks to Ren'Py, I finally have a programming script that I'm happy to present a final version with. I've visited this forum a couple of times to look at other people's questions and PyTom's reply to them. It's helped me quite a bit. ecause I stalk around here so much, I should register here.

Megaman Z
Miko-Class Veteran
Posts: 829
Joined: Sun Feb 20, 2005 8:45 pm
Projects: NaNoRenO 2016, Ren'Py tutorial series
Location: USA
Contact:

#8 Post by Megaman Z »

Skittle Sama wrote:...No possiblity of making the characters have a continuous animation such as blinking while narration is still active and clickable, as well?
I think that's already possible... check eclipse's tutorials and see if that doesn't work. just make sure the last entry in the "animation" group is a delay # so that it loops around. hope that solves that question.

[edit: look in this quote box, taken from the sample code shown at eclipse's tutorial #2 (ignore the arrow and what's on the right side of it.
image brent happy = Animation("Brenthappy1.png", 4.00, <--- Initial image and time delay
"Brenthappy2.png", 0.25,
"Brenthappy3.png", 0.25,
"Brenthappy2.png", 0.25) <--- Starts from beginning when this ends
(still in edit) the syntax for the animation itself is...

Code: Select all

Animation("filename", timedelay, "filename", timedelay, ...)
#if ends on a "filename", animation doesn't loop.
#if ends on a timedelay, loops
PyTom can probably explain it better than me... (end of edit)]

*looks at game pic* looks good so far, except the obviously out-of-place menu choise (and the red circle and question mark -D. Zeta).
Last edited by Megaman Z on Sat Apr 23, 2005 1:42 pm, edited 1 time in total.
~Kitsune Zeta

Skittle Sama

#9 Post by Skittle Sama »

*looks at game pic* looks good so far, except the obviously out-of-place menu choise (and the red circle and question mark -D. Zeta).
Thank you-!
That's why I had come here for advice.
(The red circle was my using a wacom tablet to point out the flaw for PyTom; Not the game itself.)

I did go and see the link to the tutorial that Eclipse wrote. At the time, I was on campus and I didn't have time to read through the entire thing. I will go back and look at it again soon.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#10 Post by PyTom »

Skittle Sama wrote: Is there any way to decrease the text size? I know that you can normally because in the narration the name size is '3' and the text size is '2'. When I attempted o fix this problem originally, I thought I might be able to adjust the text size of the menu opetions as well. When I do that it freezes the screen. Is there a reason that this can't be done, PyTom?
It shouldn't freeze the screen. Can you send me the bit of code that caused that? Also, 3 and 2 are probably a bit small. Are you sure you didn't mean 13 and 12 or something like that?

Anyway, the way to change the text size on menus is code like the following:

Code: Select all

init:
    $ style.menu_choice.size = 18
    $ style.menu_caption.size = 18
...No possiblity of making the characters have a continuous animation such as blinking while narration is still active and clickable, as well?
Yes. Instead of declaring an image as an Image, declare it as an Animation. The following will show a blink for .25 seconds with 30 second delays between blinks.

Code: Select all

init:
    image cima happy = Animation("cima_happy1.png", 30, "cima_happy2.png", 0.25)
This assumes that cima_happy1.png has the eyes open and cima_happy2.png has the blink. Also, I should point out that there were some problems with animations that are fixed in the new 4.8 release.
I do, too. This game has been in planning since 1998. Thanks to Ren'Py, I finally have a programming script that I'm happy to present a final version with. I've visited this forum a couple of times to look at other people's questions and PyTom's reply to them. It's helped me quite a bit. ecause I stalk around here so much, I should register here.
Since 1998... whistles. I'm just glad I could be a part of a game that's been in development for so long.
Last edited by PyTom on Sat Apr 23, 2005 1:45 pm, edited 1 time in total.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Megaman Z
Miko-Class Veteran
Posts: 829
Joined: Sun Feb 20, 2005 8:45 pm
Projects: NaNoRenO 2016, Ren'Py tutorial series
Location: USA
Contact:

#11 Post by Megaman Z »

Skittle Sama>>D. Zeta's being a smart(at-sign, dollar-sign, dollar-sign) again...

PyTom>>I think I barely beat you to the punch on some of the character animation stuff...
~Kitsune Zeta

Skittle Sama
Newbie
Posts: 12
Joined: Sat Apr 23, 2005 1:43 pm
Location: Sarasota, Fl.
Contact:

#12 Post by Skittle Sama »

Actually that seemed to fix the problem!

What I meant was:

Code: Select all

a "{size=-3}What do you mean early?{/size}"
j "{size=-3}I'm the only one who's here that I know about besides you.{/size}"
Not the actual size being 3, but down 3 sizes. 'Sorry for the mix up. The codes that you gave me for the menu size really fixed the problem with the text! It looks much better now.

Now that I'm looking at it, is there a way to put the name in the name box while the menu is active?

Ex:
Skittle:

"Gee, I wonder what I will choose?"
1. Run
2. Eat

That would really make the choices stand out.
Also, I should point out that there were some problems with animations that are fixed in the new 4.8 release.
Perhaps I will look it that. I'm using the Ren'Py 4.7.1 release- it seems to be doing its job just fine. =3

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#13 Post by PyTom »

Skittle Sama wrote: Now that I'm looking at it, is there a way to put the name in the name box while the menu is active?
Not easily. If you did it all the time, then you might remove the menu_window.top_padding line. Then you can add the name of the person you want to speak as a caption... but that might not work.

If you really want it, I could try to whip up a menu function that could do it for you.

Perhaps I will look it that. I'm using the Ren'Py 4.7.1 release- it seems to be doing its job just fine. =3
Well, I always encourage people to use the latest release. There are bug fixes in 4.7.2 and 4.8 that aren't there in 4.7.1. (Of course, there's always a chance of new bugs.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Skittle Sama
Newbie
Posts: 12
Joined: Sat Apr 23, 2005 1:43 pm
Location: Sarasota, Fl.
Contact:

#14 Post by Skittle Sama »

PyTom wrote: Well, I always encourage people to use the latest release. There are bug fixes in 4.7.2 and 4.8 that aren't there in 4.7.1. (Of course, there's always a chance of new bugs.)
That is always true. I'll get the newest release. =3
Not easily. If you did it all the time, then you might remove the menu_window.top_padding line. Then you can add the name of the person you want to speak as a caption... but that might not work.

If you really want it, I could try to whip up a menu function that could do it for you.
If it's not, then it it's not. I won't ask you to go out of your way for a code. It's personal preference with the name at the top. It won't affect how people play the game, so I'm really fine with it. I was just curious if it was something that could be done- now I know. =3

(...Did finally take the time to register here, however...)

Skittle Sama
Newbie
Posts: 12
Joined: Sat Apr 23, 2005 1:43 pm
Location: Sarasota, Fl.
Contact:

#15 Post by Skittle Sama »

That's strange-

When I attempted to download the newest version of Ren'Py so that I could update 4.7.1, it said that the zip file was corrupted. I tried to redownload it several times.

Has anyone else had that problem?

-------------

[Edit:] Nevermind, for some reason, I think that's it's a problem with my computer? I had a friend download it and send it to me over AIM, but the file was still corrupted. I'm having her open it and send it to me file by file.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]