A Few Questions about Frames
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.
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.
-
- Newbie
- Posts: 6
- Joined: Sun Jun 11, 2006 11:15 pm
- Contact:
A Few Questions about Frames
It's another newbie of Ren'Py! [Yeah, I know. That was REALLY unexpected. xD]
Anyway...my questions:
a) How do I make my own frames for a Ren'Py game?
b) Can I change my button style [I don't mean the color]? If so, how?
Thanks in advance for taking your time to read this. ^_^
[By the way, no need for a welcome, I've posted here as a guest before. XD]
Anyway...my questions:
a) How do I make my own frames for a Ren'Py game?
b) Can I change my button style [I don't mean the color]? If so, how?
Thanks in advance for taking your time to read this. ^_^
[By the way, no need for a welcome, I've posted here as a guest before. XD]
- PyTom
- Ren'Py Creator
- Posts: 16096
- 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:
Re: A Few Questions about Frames
You just create a png file, say "frame.png", with your frame inside it. You then include code in your game like:Nyamo-chan wrote:a) How do I make my own frames for a Ren'Py game?
Code: Select all
init:
$ style.window.background = Frame("frame.png", 32, 16)
The short answer is yes, and you probably want to do so by changing style.button.background, style.button.xminimum, and maybe other properties on style.button and style.button_text.b) Can I change my button style [I don't mean the color]? If so, how?
If you can give me an idea of what you want, I can advise you better.
Oh, and welcome anyway!
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
-
- Newbie
- Posts: 6
- Joined: Sun Jun 11, 2006 11:15 pm
- Contact:
Re: A Few Questions about Frames
So...the numbers are the pixel sizes for the directions of the borders?PyTom wrote:You just create a png file, say "frame.png", with your frame inside it. You then include code in your game like:Nyamo-chan wrote:a) How do I make my own frames for a Ren'Py game?
This declares the frame. The two numbers are the size of the borders in the horizontal and vertical directions, respectively... Frame stretches things that are not within these borders.Code: Select all
init: $ style.window.background = Frame("frame.png", 32, 16)
I mean like, if you have a frame you made yourself, and you want the button's frames to be matching with the text. Basically, I'm asking if you can make your own frames for the buttons.PyTom wrote:The short answer is yes, and you probably want to do so by changing style.button.background, style.button.xminimum, and maybe other properties on style.button and style.button_text.b) Can I change my button style [I don't mean the color]? If so, how?
If you can give me an idea of what you want, I can advise you better.
Eheheh. Thanks.PyTom wrote:Oh, and welcome anyway!
Oh, and I have another question.
Above the main text window, is it possible to have a small box with the character who's speaking's name in it? (Wind -a breath of heart- for example.)
- PyTom
- Ren'Py Creator
- Posts: 16096
- 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:
Re: A Few Questions about Frames
Yes. Basically, the situation looks like this:Nyamo-chan wrote:So...the numbers are the pixel sizes for the directions of the borders?
Code: Select all
A|B|C
-+-+-
D|E|F
-+-+-
G|H|I
When the time comes to scale a frame, A, C, G and I are not scaled at all. D and F are scaled vertically, but not horizontally, while B and H are scaled horizontally but not vertically. E is scaled in both directions.
Clear? As mud.
Okay, you can do this by setting style.button.background to your frame. You'd also want to set style.button.hover_background to another frame, so the user gets some indication a button is selected. You need to set that second, so setting style.button.background doesn't overwrite it.I mean like, if you have a frame you made yourself, and you want the button's frames to be matching with the text. Basically, I'm asking if you can make your own frames for the buttons.
You may also want to set
style.button.xminumum and style.button.xmaximum, since if the size of the button is smaller then the non-scalable part of the frame, bad things can happen.
Yes. See extras/two_window_say.rpy.Above the main text window, is it possible to have a small box with the character who's speaking's name in it? (Wind -a breath of heart- for example.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- PyTom
- Ren'Py Creator
- Posts: 16096
- 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:
Almost, but not quite, exactly unlike that.monele wrote:You mean like when crossing the streams ?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
-
- Newbie
- Posts: 6
- Joined: Sun Jun 11, 2006 11:15 pm
- Contact:
Thanks for the fast response, PyTom. ^^ You're really dedicated to helping out all those confused Ren'Py users. XD
By the way, I have yet another question...I know it's not about frames, but I'm too lazy to make another thread. x.x
What are all the transitions, and do they apply to character images, too?
By the way, I have yet another question...I know it's not about frames, but I'm too lazy to make another thread. x.x
What are all the transitions, and do they apply to character images, too?
- PyTom
- Ren'Py Creator
- Posts: 16096
- 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:
Actually, transitions are always from an old screen to a new screen. So they, by definition, apply to everything on the screen.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
-
- Newbie
- Posts: 6
- Joined: Sun Jun 11, 2006 11:15 pm
- Contact:
That I did.monele wrote:I'd suggest giving a look at the Ren'Py demo for a ... demo of all transitions. Those that come to mind are Fade, Dissolve, ImageTransition. I think there's some CropRight too.
And yes, they can apply to pretty much anything displayed on screen.
But I recall Eileen said something about there being more transitions...
Who is online
Users browsing this forum: Duhop, Google [Bot]