Opacity of main textbox

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
User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Opacity of main textbox

#1 Post by isobellesophia » Fri Sep 06, 2019 11:01 am

Hello

Looks like i didnt found anything about what i want..
I would like to change the opacity of the textbox and the namebox instead of fully 100% opacity, i would like into 50 or 40% of the opacity.. but i havent found nothing and it wont work.. can somebody make me an example perhaps?

Thank you in advance.
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
RicharDann
Veteran
Posts: 239
Joined: Thu Aug 31, 2017 11:47 am
Contact:

Re: Opacity of main textbox

#2 Post by RicharDann » Fri Sep 06, 2019 11:51 am

I've been wondering about this too, the only way I've found is to create a transform to change the alpha (alpha is the name Renpy uses for opacity) and show the window at that transform:

Code: Select all

# a transform that changes the opacity to any value yo pass, between 0.0 and 1. For example, for 50% opacity, you'd pass 0.5
transform opaque(x=1):
    alpha x
    
screen say(who, what):
    style_prefix "say"

    window:
        id "window"
        at opaque(.5) #add this to the say screen
There might be a better way though.
The most important words a man can say are, “I will do better.”

User avatar
rayminator
Miko-Class Veteran
Posts: 509
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: Opacity of main textbox

#3 Post by rayminator » Fri Sep 06, 2019 11:55 am

You would have to make your own cause we don't what type of textbox and namebox you would like

if you have Photoshop or any other photo editing program would help to do that for you

the images you need to edit is in the gui folder called namebox.png
when I try to help someone I point them into 2 direction what's right and wrong so they can learn how to

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: Opacity of main textbox

#4 Post by isobellesophia » Fri Sep 06, 2019 11:55 am

Thank you, might gonna test it. <)
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: Opacity of main textbox

#5 Post by isobellesophia » Fri Sep 06, 2019 11:58 am

rayminator wrote:
Fri Sep 06, 2019 11:55 am
You would have to make your own cause we don't what type of textbox and namebox you would like

if you have Photoshop or any other photo editing program would help to do that for you

the images you need to edit is in the gui folder called namebox.png
Actually, what i mean is the opaque of the textbox, (sorry if i said opacity, not good at english) my textbox was already transparent so... like for example, the textbox in game is 100% clean, and of course, making the textbox a bit ghostly..
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
Impulse
Regular
Posts: 139
Joined: Wed Feb 24, 2016 5:44 pm
Projects: Tears of Glass [Romance VN, Supernatural, School, GxB]
Deviantart: mariscribbles
Contact:

Re: Opacity of main textbox

#6 Post by Impulse » Fri Sep 06, 2019 12:14 pm

I don't know if there's a code for it, but you can always make the textbox transparent in your art program, save it as a PNG file and use that for the image.
Current project (on hold):
Tears of Glass - [Romance otome, Supernatural, School, GxB] - http://lemmasoft.renai.us/forums/viewto ... 43&t=37523
Demo for Tears of Glass - viewtopic.php?f=45&t=38285

Post Reply

Who is online

Users browsing this forum: No registered users