Text-box size...
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.
Text-box size...
Forgive me for such a noob question, but the first thing that is killing me, is the fixed-size text-box.
This is great for writing a lot of text, but that almost defeats the purpose of clicking-through.
Is there a way to make that Auto-height, so it adjusts to the actual text it needs to display?
Also, is there an auto-kearning, AKA: Justified-alignment or paragraph-alignment or true-alignment? (If not, I can help with the development of that.)
This is great for writing a lot of text, but that almost defeats the purpose of clicking-through.
Is there a way to make that Auto-height, so it adjusts to the actual text it needs to display?
Also, is there an auto-kearning, AKA: Justified-alignment or paragraph-alignment or true-alignment? (If not, I can help with the development of that.)
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: Text-box size...
The textbox isn't fixed-size - it expands as you include more text!Is there a way to make that Auto-height, so it adjusts to the actual text it needs to display?
It does, however, have a minimum height. You can change that
Code: Select all
style say_window yminimum 0
YesAlso, is there an auto-kearning, AKA: Justified-alignment or paragraph-alignment or true-alignment? (If not, I can help with the development of that.)
Re: Text-box size...
Thank-you.
I added this... (code) to my script.rpy (Wasn't exactly clear where to put it at first. BTY "true" causes an error and "True" or 1 does not seem to do anything.)
Am I doing it wrong?
I added this... (code) to my script.rpy (Wasn't exactly clear where to put it at first. BTY "true" causes an error and "True" or 1 does not seem to do anything.)
Code: Select all
style say_window:
yminimum 100
justify True
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: Text-box size...
justify isn't a style property for the say_window, it's a style property for text
You can shift-I when debug mode is on (the default) when the mouse is over a styleable element to see the styles that affect it. I think it's something like 'say_dialogue' for dialogue (that is, a name and text) and 'say_thought' for narrative.
Alternatively you can apply it per-character:
define e = Character("Eileen", what_justify=True)
or apply it to all text
style default justify True
You can shift-I when debug mode is on (the default) when the mouse is over a styleable element to see the styles that affect it. I think it's something like 'say_dialogue' for dialogue (that is, a name and text) and 'say_thought' for narrative.
Alternatively you can apply it per-character:
define e = Character("Eileen", what_justify=True)
or apply it to all text
style default justify True
Re: Text-box size...
Thanks again...
Where did you get the what_ thing from.. and what is that?
Yea, I noticed weird things...
Justify does nothing on say_window... Have to use say_dialogue... but that only works if you say something with a quoted name... Grrr...
Eg.. (works here)
"SomeGuy" "Hello"
e "hello"
Eg.. (Does not work here)
"hello"
Not sure I want default to have all those attributes, since it applied similar settings to everything when I used default.
Is there a "default_dialogue"? (I am having a hard time finding all the custom names for all these unique default things. Not sure where all that information is located. The help-files don't say any of this stuff in the text area.)
Where did you get the what_ thing from.. and what is that?
Yea, I noticed weird things...
Justify does nothing on say_window... Have to use say_dialogue... but that only works if you say something with a quoted name... Grrr...
Eg.. (works here)
"SomeGuy" "Hello"
e "hello"
Eg.. (Does not work here)
"hello"
Not sure I want default to have all those attributes, since it applied similar settings to everything when I used default.
Is there a "default_dialogue"? (I am having a hard time finding all the custom names for all these unique default things. Not sure where all that information is located. The help-files don't say any of this stuff in the text area.)
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: Text-box size...
Like I said, you also have to style say_thought to cover narrative.
what_ parameters have the 'what_' part stripped off and are passed to the dialogue text. See 'styling text and windows' at the bottom of the Character part of the manual.
what_ parameters have the 'what_' part stripped off and are passed to the dialogue text. See 'styling text and windows' at the bottom of the Character part of the manual.
Re: Text-box size...
Tricked it into thinking it has a name... Now it works...
Used this...
"" "hello"
Instead of this...
"hello"
(That was for the say_dialogue, where justify had to go.)
Were is all this information? Are you guys looking at the python code or something to get this info?
Edited: You answered as I was typing.
Used this...
"" "hello"
Instead of this...
"hello"
(That was for the say_dialogue, where justify had to go.)
Were is all this information? Are you guys looking at the python code or something to get this info?
Edited: You answered as I was typing.
Last edited by JD_Mortal on Mon Jul 21, 2014 6:46 am, edited 2 times in total.
Re: Text-box size...
double-post
Dude, You rule. If you accepted honorcoins, I would give you some.
Dude, You rule. If you accepted honorcoins, I would give you some.
Last edited by JD_Mortal on Mon Jul 21, 2014 6:42 am, edited 2 times in total.
Re: Text-box size...
Yea, I don't quite grasp that... I am sure I will in time... but What_ Who_ Where_ When_ Why_... WTF? Prefix, suffix... (Mr. Bob = Who_bob?)Asceai wrote:Like I said, you also have to style say_thought to cover narrative.
what_ parameters have the 'what_' part stripped off and are passed to the dialogue text. See 'styling text and windows' at the bottom of the Character part of the manual.
BTW, I feel like I am in Watchdogs now.. you just "opened my world". xD Literally!
Re: Text-box size...
New problem...
The code I have...
Localized bug to justify... Only happens when there are more than three lines to justify, or more. Two lines is justified correctly. Just reported it. xD
The code I have...
Code: Select all
style say_window:
yminimum 0
xmargin 10
bottom_margin 15
xpadding 10
ypadding 5
style say_dialogue:
first_indent 54
rest_indent 0
justify True
style say_thought:
first_indent 54
rest_indent 0
justify True
Re: Text-box size...
Adding a note:
The vbox ignores any "set sizes". Seems it auto-compresses, seen when centering while justified, with a set-width.
This, I am using to my advantage. However, I have to make sure the outer window that should "contain" the vbox, is larger, since it seems that the vbox actually floats outside of the window that it should be inside of. (Might be a container-encapsulation issue there. It thinks it is inside the window, but it is actually floating in front of it, thus, not "limiting itself" to the parent that it is not actually within.)
If it were within the window, as the "SHIFT+I" information suggests, then the text would not be drawn on-top and outside the window, it would be clipped, behind the window. Also, the width would not be expanding to the screen-width, but the actual dialogue window width.
The vbox ignores any "set sizes". Seems it auto-compresses, seen when centering while justified, with a set-width.
This, I am using to my advantage. However, I have to make sure the outer window that should "contain" the vbox, is larger, since it seems that the vbox actually floats outside of the window that it should be inside of. (Might be a container-encapsulation issue there. It thinks it is inside the window, but it is actually floating in front of it, thus, not "limiting itself" to the parent that it is not actually within.)
If it were within the window, as the "SHIFT+I" information suggests, then the text would not be drawn on-top and outside the window, it would be clipped, behind the window. Also, the width would not be expanding to the screen-width, but the actual dialogue window width.
Who is online
Users browsing this forum: Bing [Bot]