Is there a way to have a "flush" alignment for text?

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
User avatar
asatiir
Regular
Posts: 86
Joined: Tue Oct 01, 2013 6:04 pm
Completed: Within the Walls (Twine)
Projects: Roses Will Rise
Organization: Asatiir's Tales
Skype: asatiir
itch: asatiir
Location: Dubai, UAE
Contact:

Re: Is there a way to have a "flush" alignment for text?

#16 Post by asatiir »

Elmiwisa: Is there a way to make the background transparent? Also, is there a way to have any transition on the text? It seems very abrupt as it is.
Image
Image

Elmiwisa
Veteran
Posts: 476
Joined: Sun Jul 21, 2013 8:08 am
Contact:

Re: Is there a way to have a "flush" alignment for text?

#17 Post by Elmiwisa »

Eh, for background, you should supply one yourself. The #ffffff background I put there is for placeholder only, since I don't have one around. You should get a background that look more realistic so that it looks more like paper, since this is supposed to be text from a book right? If you want the background to be completely transparent, use #00000000
You can make transition on the whole screen. You could put transformation on the text that can serve the role of transitioning.
To use transition on the whole screen, use the with statement (not with clause) as usual, right after show screen.
To use transformation, use the at statement in the screen code as usual.

User avatar
asatiir
Regular
Posts: 86
Joined: Tue Oct 01, 2013 6:04 pm
Completed: Within the Walls (Twine)
Projects: Roses Will Rise
Organization: Asatiir's Tales
Skype: asatiir
itch: asatiir
Location: Dubai, UAE
Contact:

Re: Is there a way to have a "flush" alignment for text?

#18 Post by asatiir »

Gotcha, thanks!
Image
Image

User avatar
OokamiKasumi
Eileen-Class Veteran
Posts: 1779
Joined: Thu Oct 14, 2010 3:53 am
Completed: 14 games released -- and Counting.
Organization: DarkErotica Games
Deviantart: OokamiKasumi
Location: NC, USA
Contact:

Re: Is there a way to have a "flush" alignment for text?

#19 Post by OokamiKasumi »

Is this what you are looking for?

768 x 1366
768x1366_ss1.jpg
This was done with NVL mode using a fully transparent png (none.png) that is the same size of the screen: 1366x768.

in options.rpy

Code: Select all

    ################################################
    ## -------Text Alignment ---------------
    ## text Justified 
    style.create("justify_style", "default", u"(text) Justify Style")
    style.default.justify = True

    # --------------NVL Box ----------------------------  

    # If you want a different Font for your NVL text. 
    style.nvl_dialogue.font = "changeling.TTF"
    
    # If you want a different Color for your NVL text. 
    style.nvl_dialogue.color = "#ffffff"
    
    # If you want a different Size for your NVL text. 
    style.nvl_dialogue.size =30
    style.nvl_dialogue.justify = True

    ## Interblock spacing: ------------------
    style.nvl_vbox.box_spacing = 3

    ## ----------- Framed NVL box -------------------
    style.nvl_window.background = Frame("ui/none.png", 0, 0)  
     
    ## ---------- No Frame Nvl Box--------------------
    # style.nvl_window.background = "ui/none.png"    
     
    # margins ---------------------------------
    style.nvl_window.top_margin = 0
    style.nvl_window.bottom_margin = 0
    style.nvl_window.left_margin = 0
    style.nvl_window.right_margin = 0
     
    # padding ---------------------------------
    style.nvl_window.top_padding = 50
    style.nvl_window.bottom_padding = 60
    style.nvl_window.left_padding = 400
    style.nvl_window.right_padding = 400
     
    # menu = nvl_menu 

    config.window_hide_transition = dissolve
    config.window_show_transition = dissolve

    # config.empty_window = nvl_show_core
    config.nvl_paged_rollback = True
    style.nvl_vbox.box_spacing = 10
in transforms.rpy (This is a .rpy I add.)

Code: Select all

#################################
# Use 'at' not 'with'!

init:
    # ---------- CTC blinking arrow -------------------
    # xpos across
    # y pos Up from bottom

    image ctc_blink:
        xpos 0.87 ypos 0.95
        xanchor 1.0 yanchor 1.0 
        "ui/arrow.png"  
        linear 0.75 alpha 1.0 
        linear 0.75 alpha 0.0     
        repeat

    image ctc_blinkNVL:
        xpos 0.73   ypos 0.94 
        xanchor 1.0  yanchor 1.0      
        "ui/arrow.png"  
        linear 0.75 alpha 1.0 
        linear 0.75 alpha 0.0     
        repeat
in script.rpy

Code: Select all

init:
    define story = Character(None, 
        kind=nvl,
        ctc="ctc_blinkNVL",
        ctc_position="fixed", )

# The game starts here.
label start:
    scene black with fade
    
    story "\n\n\nI thought it might only be a dream, but what dream visits me {i}every{/i} night?
        \n\nThe dreams, they keep coming; dreams of my end. Every night I would dream it. Every night the dream is more vivid. 
        Unexplainable fear would disturb my sleep, yet I would awaken unable to remember anything of what I had dreamed.
        \n\n Only a silhouette of some creature; some being I had not seen before."
    
    nvl clear
    
    return
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed: For ALL my completed games visit: DarkErotica Games

"No amount of great animation will save a bad story." -- John Lasseter of Pixar

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], RewindTheGame