Why do we need to declare style properties again after we set it to default? (in screen.rpy)

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
tofuuu
Regular
Posts: 51
Joined: Tue Apr 24, 2018 7:15 pm
Contact:

Why do we need to declare style properties again after we set it to default? (in screen.rpy)

#1 Post by tofuuu »

In the screen.rpy there's some style that has been declared default then have another style declaration. what i mean is

Code: Select all

style window is default
and then on the below there's

Code: Select all

style window:
    xalign 0.5
    xfill True
    yalign gui.textbox_yalign
    ysize gui.textbox_height

    background Image("gui/textbox.png", xalign=0.5, yalign=1.0)
why do we need to do it twice?

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Why do we need to declare style properties again after we set it to default? (in screen.rpy)

#2 Post by trooper6 »

By saying it is default, you are giving a ALL the default characteristics...and there are a lot of them. Then, a bit later, you overwrote five particular elements, but all the rest remain default.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

tofuuu
Regular
Posts: 51
Joined: Tue Apr 24, 2018 7:15 pm
Contact:

Re: Why do we need to declare style properties again after we set it to default? (in screen.rpy)

#3 Post by tofuuu »

can we see what are the rest of the default characteristics?

And i do wonder, in the top of the screen.rpy script there's this code

Code: Select all

style default:
    properties gui.text_properties()
    language gui.language
but i can't find text_properties() in gui.rpy?
trooper6 wrote: Sat Aug 04, 2018 2:32 am By saying it is default, you are giving a ALL the default characteristics...and there are a lot of them. Then, a bit later, you overwrote five particular elements, but all the rest remain default.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Why do we need to declare style properties again after we set it to default? (in screen.rpy)

#4 Post by Imperf3kt »

You need to look in ren'py install directory to find the rest, infact I recommend this anyway for both experience (see how Ren'Py works) and finding things you never knew about.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

tofuuu
Regular
Posts: 51
Joined: Tue Apr 24, 2018 7:15 pm
Contact:

Re: Why do we need to declare style properties again after we set it to default? (in screen.rpy)

#5 Post by tofuuu »

Where can i look this directory? i can't find it in game folder :(
Imperf3kt wrote: Sat Aug 04, 2018 4:47 am You need to look in ren'py install directory to find the rest, infact I recommend this anyway for both experience (see how Ren'Py works) and finding things you never knew about.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Why do we need to declare style properties again after we set it to default? (in screen.rpy)

#6 Post by Imperf3kt »

Where did you install renpy?
Using myself as an example (Windows, default install location), the folder to look through, should be here:
C:\Program Files (x86)\renpy\launcher\game

I think what you are looking for is inside the gui7.rpy file or style.rpy
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]