So my code was working fine initially for the screens.
But when I removed the extra transparent PNG of one of the assets for the screens, all of the sudden the text were greyed out instead of white.
I did not touch any of the code except to modify the asset itself. Is there a way to fix this problem?
Fixing greyed out text? (SOLVED)
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.
- LittleRainySeasons
- Regular
- Posts: 44
- Joined: Fri Mar 24, 2017 9:37 am
- Projects: Patsy n' Crinkles, Galaxy Party, Time|Reversed
- Deviantart: LittleRainySeasons
- Soundcloud: RoboticDreamz
- itch: LittleRainySeasons
- Contact:
Fixing greyed out text? (SOLVED)
Last edited by LittleRainySeasons on Tue Nov 14, 2023 8:20 pm, edited 1 time in total.
- m_from_space
- Eileen-Class Veteran
- Posts: 1025
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Fixing greyed out text?
I think you have to provide more information here. Please post the code of the screen you mention and also what role this PNG plays within the screen.
- LittleRainySeasons
- Regular
- Posts: 44
- Joined: Fri Mar 24, 2017 9:37 am
- Projects: Patsy n' Crinkles, Galaxy Party, Time|Reversed
- Deviantart: LittleRainySeasons
- Soundcloud: RoboticDreamz
- itch: LittleRainySeasons
- Contact:
Re: Fixing greyed out text?
Okay so this is the side menu where the player can access the map and look at the dates. This used to have an extra transparent PNG that fills up the whole screen.m_from_space wrote: ↑Sun Nov 12, 2023 6:27 am I think you have to provide more information here. Please post the code of the screen you mention and also what role this PNG plays within the screen.
This was the code
Code: Select all
##Calendar
default week = 1
default day = 1
image menuweek = "gui/menuweek.png"
screen ingame_menu:
add "gui/ingame_menu.png" xpos 597
text "$[cash]" pos (625, 191) font "gui/PressStart2P-Regular.ttf" size (14)
if week == 1:
add "menuweek" pos (616, 117)
text "SATURDAY" xalign 0.95 ypos 135 font "gui/PressStart2P-Regular.ttf" size (17)
elif week == 2:
add "menuweek" pos (616, 117)
text "SUNDAY" xalign 0.93 ypos 134 font "gui/PressStart2P-Regular.ttf" size (17)
elif week == 3:
add "menuweek" pos (616, 117)
text "MONDAY" xalign 0.93 ypos 135 font "gui/PressStart2P-Regular.ttf" size (17)
elif week == 4:
add "menuweek" pos (616, 117)
text "TUESDAY" xalign 0.94 ypos 135 font "gui/PressStart2P-Regular.ttf" size (17)
elif week == 5:
add "menuweek" pos (616, 117)
text "WEDNESDAY" xalign 0.958 ypos 135 font "gui/PressStart2P-Regular.ttf" size (16)
elif week == 6:
add "menuweek" pos (616, 117)
text "THURSDAY" xalign 0.95 ypos 135 font "gui/PressStart2P-Regular.ttf" size (17)
elif week == 7:
add "menuweek" pos (616, 117)
text "FRIDAY" xalign 0.93 ypos 135 font "gui/PressStart2P-Regular.ttf" size (17)
imagebutton auto "gui/menumap_%s.png" xpos 616 ypos 225 focus_mask True action [ToggleScreen("map"), With(irisout)]
imagebutton auto "gui/menusave_%s.png" xpos 711 ypos 545 focus_mask True action ShowMenu("save")
imagebutton auto "gui/menuquit_%s.png" xpos 749 ypos 545 focus_mask True action Quit(confirm=True)
When the player goes to work, a screen pops up and this is the screen that will appear. The text is outside the screen where the textbox normally goes:
Code: Select all
screen workbox:
add "gui/workbox.png" xpos 153 ypos 156
text "$[earned_points]" pos (403, 172) font "gui/PressStart2P-Regular.ttf" size (14)
if hour == 1:
text "HOUR 1" pos (166, 173) font "gui/PressStart2P-Regular.ttf" size (13)
elif hour == 2:
text "HOUR 2" pos (166, 173) font "gui/PressStart2P-Regular.ttf" size (13)
elif hour == 3:
text "HOUR 3" pos (166, 173) font "gui/PressStart2P-Regular.ttf" size (13)
elif hour == 4:
text "HOUR 4" pos (166, 173) font "gui/PressStart2P-Regular.ttf" size (13)
elif hour == 5:
text "HOUR 5" pos (166, 173) font "gui/PressStart2P-Regular.ttf" size (13)
elif hour == 6:
text "HOUR 6" pos (166, 173) font "gui/PressStart2P-Regular.ttf" size (13)
screen buskwork:
if busk == 1:
add "buskanim" xpos 153 ypos 208
text "Your performance caught people's attention!" xpos 48 ypos 461 size (17)
text "You earned $[earned]." xpos 48 ypos 482 size (17)
elif busk == 2:
add "buskanimnone" xpos 153 ypos 208
text "Life was uneventful." xpos 48 ypos 461 size (17)
use workbox
And this what happened after removing the extra PNG:
But later I figured out that maybe it is after I updated Ren'Py since when I reverted the transparent PNG of the game menu, it's still greyed out.
Zorder also didn't work.
- LittleRainySeasons
- Regular
- Posts: 44
- Joined: Fri Mar 24, 2017 9:37 am
- Projects: Patsy n' Crinkles, Galaxy Party, Time|Reversed
- Deviantart: LittleRainySeasons
- Soundcloud: RoboticDreamz
- itch: LittleRainySeasons
- Contact:
Re: Fixing greyed out text?
I must note that I made a work around by adding a transparent png for the text box as something temporary.
Although it feels it really doesn't solve my issue of the problem. (Because back then the text are above the default Ren'Py textbox and now it's behind it)
Although it feels it really doesn't solve my issue of the problem. (Because back then the text are above the default Ren'Py textbox and now it's behind it)
- m_from_space
- Eileen-Class Veteran
- Posts: 1025
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Fixing greyed out text?
Yeah, I was wondering if a fully transparent PNG even has an effect on visuals. I'm not sure why your text is grey instead of white all of a sudden. Is there something half-transparent in front of it? Does the workbox.png contain a lot of half-transparent pixels that are drawn over the text maybe? Remember that things that you show first, will be drawn first.LittleRainySeasons wrote: ↑Mon Nov 13, 2023 10:12 pm But later I figured out that maybe it is after I updated Ren'Py since when I reverted the transparent PNG of the game menu, it's still greyed out.
Zorder also didn't work.
By the way, you can shorten your code for this screen:
Code: Select all
screen workbox():
add "gui/workbox.png" xpos 153 ypos 156
text "$[earned_points]" pos (403, 172) font "gui/PressStart2P-Regular.ttf" size 14
text "HOUR [hour]" pos (166, 173) font "gui/PressStart2P-Regular.ttf" size 13
The say screen (as any other screen) has a default zorder of 0. So if you want other screens to be drawn in front of it, give them a zorder larger than that.Because back then the text are above the default Ren'Py textbox and now it's behind it.
- LittleRainySeasons
- Regular
- Posts: 44
- Joined: Fri Mar 24, 2017 9:37 am
- Projects: Patsy n' Crinkles, Galaxy Party, Time|Reversed
- Deviantart: LittleRainySeasons
- Soundcloud: RoboticDreamz
- itch: LittleRainySeasons
- Contact:
Re: Fixing greyed out text?
Well these are technically the workbox and the basic screen for the work animations. There's no other transparent pixels in itYeah, I was wondering if a fully transparent PNG even has an effect on visuals. I'm not sure why your text is grey instead of white all of a sudden. Is there something half-transparent in front of it? Does the workbox.png contain a lot of half-transparent pixels that are drawn over the text maybe? Remember that things that you show first, will be drawn first.
I decided to put a zorder on the screens on where the work animation happens and finally it's fixed. I may have just misplaced the code while trying to solve it initially.The say screen (as any other screen) has a default zorder of 0. So if you want other screens to be drawn in front of it, give them a zorder larger than that.
Who is online
Users browsing this forum: Ahrefs [Bot], RoiceDragonne