Textbox Position

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
darkfiete
Newbie
Posts: 3
Joined: Sat Sep 15, 2007 1:33 pm
Contact:

Textbox Position

#1 Post by darkfiete »

Is it possible to change the position of the Textbox and the displayed Text nearly over the whole screen
and leaving the Textbox transparent. I was thinking of the fate stay night textbox style.
Can anyone give me a hint how to do this?

User avatar
valeatory
Regular
Posts: 36
Joined: Mon Apr 23, 2007 3:01 pm
Projects: Nightglove Institute, Monstrata Fracture
Organization: Astralore Games
Tumblr: valeatory
itch: astralore
Location: America
Contact:

Re: Textbox Position

#2 Post by valeatory »

I think you can make the window transparent by uncommenting
style.window.background = Frame("frame.png", 12, 12)
and changing it to
style.window.background = Frame("#0000", 12, 12)
in your options.rpy
Nightglove Institute - Kidnapped students, forced to train to be secret agents and assassins!
Monstrata Fracture - Date cute monsters! But will you risk destabilizing the human plane of existence?

Criptych
Regular
Posts: 87
Joined: Sat Jun 23, 2007 9:19 am
Projects: ALICE.NET
Location: The other end of the internet.
Contact:

Re: Textbox Position

#3 Post by Criptych »

darkfiete wrote:Is it possible to change the position of the Textbox and the displayed Text nearly over the whole screen
and leaving the Textbox transparent. I was thinking of the fate stay night textbox style.
Can anyone give me a hint how to do this?
The short answer: use NVL mode. Of course, this fills the whole screen, so if you want the clear border a la Fate, you'll need to add a couple lines to an init section in your script:

Code: Select all

init:

    # ...

    $ style.nvl_window.xmargin=20
    $ style.nvl_window.ymargin=20
And adjust the 20s as you see fit. :)
Computers are useless. They can only give you answers. —Pablo Picasso

Image

darkfiete
Newbie
Posts: 3
Joined: Sat Sep 15, 2007 1:33 pm
Contact:

Re: Textbox Position

#4 Post by darkfiete »

Thank you for the fast answers, this was exactly what i was looking for! *kiss*
But one more thing. I want to adjust the Text itself to be more to the right. The Text normally starts at 1/4 of the screen leaving an empty quarter of the textbox.

Scott
Regular
Posts: 35
Joined: Thu Sep 13, 2007 6:11 am
Contact:

Re: Textbox Position

#5 Post by Scott »

Code: Select all

        style.nvl_window.xmargin = 26
        style.nvl_window.top_margin = 51
        style.nvl_window.bottom_margin = 61
        style.nvl_window.xpadding = 38
        style.nvl_window.ypadding = 15
        style.nvl_window.background = Frame("bgimages/frame.png", 748, 488)
That'll give you an FSN-style NVL box to the pixel, provided you have a frame image in bgimages/frame.png.

Criptych
Regular
Posts: 87
Joined: Sat Jun 23, 2007 9:19 am
Projects: ALICE.NET
Location: The other end of the internet.
Contact:

Re: Textbox Position

#6 Post by Criptych »

darkfiete wrote:The Text normally starts at 1/4 of the screen leaving an empty quarter of the textbox.
Sorry, I forgot about that; it's an artifact of using NVL mode with the default styles.
Computers are useless. They can only give you answers. —Pablo Picasso

Image

Scott
Regular
Posts: 35
Joined: Thu Sep 13, 2007 6:11 am
Contact:

Re: Textbox Position

#7 Post by Scott »

ypadding should actually be 26, indent should be 14 px. Line spacing should be 13 px.

darkfiete
Newbie
Posts: 3
Joined: Sat Sep 15, 2007 1:33 pm
Contact:

Re: Textbox Position

#8 Post by darkfiete »

Scott wrote:ypadding should actually be 26, indent should be 14 px. Line spacing should be 13 px.
hm where to put the indent and line_spacing properties?
they have no effect if i use theme with style.nvl_window

Scott
Regular
Posts: 35
Joined: Thu Sep 13, 2007 6:11 am
Contact:

Re: Textbox Position

#9 Post by Scott »

Code: Select all

        style.default.first_indent = 14
        style.nvl_dialogue.line_spacing = 13

Post Reply

Who is online

Users browsing this forum: No registered users