Images that Appear on Hover with Imagebuttons don't Disappear...
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.
-
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
- Contact:
Images that Appear on Hover with Imagebuttons don't Disappear...
I have imagebuttons set up so that an image will appear when you hover over the button-- when I click on them, however, the image doesn't go away unless it's the 'Start' button and therefore starting the game-- is there a way to fix that issue?
Re: Images that Appear on Hover with Imagebuttons don't Disappear...
show your code, I know about 7 ways how to implement the appearance and everything is created differently (there are no telepaths)
Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
-
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
- Contact:
Re: Images that Appear on Hover with Imagebuttons don't Disappear...
Code: Select all
screen main_menu:
tag menu
add "mainmenubganimated"
$ y=0
imagebutton auto "images/mainmenu_start_%s.png" xpos 0 ypos y focus_mask True action Start() hovered [Show("gui_mainmenu", my_picture="images/mainmenu ri hover.png", my_tt_xpos=0, my_tt_ypos=0) ] unhovered [Hide("gui_mainmenu")] at main_eff1
$ y+=50
if persistent.epilogue == True:
imagebutton auto "images/mainmenu_load_%s.png" xpos 0 ypos y focus_mask True action ShowMenu('load') hovered [ Show("gui_mainmenu", my_picture="images/mainmenu ri_old_hover.png", my_tt_xpos=0, my_tt_ypos=0) ] unhovered [Hide("gui_mainmenu")] at main_eff2
else:
imagebutton auto "images/mainmenu_load_%s.png" xpos 0 ypos y focus_mask True action ShowMenu('load') hovered [ Show("gui_mainmenu", my_picture="images/mainmenu ri_old_hover_full.png", my_tt_xpos=0, my_tt_ypos=0) ] unhovered [Hide("gui_mainmenu")] at main_eff2
$ y-=50
imagebutton auto "images/mainmenu_settings_%s.png" xpos -30 ypos y focus_mask True action ShowMenu('preferences') hovered [ Show("gui_mainmenu", my_picture="images/mainmenu gray.png", my_tt_xpos=0, my_tt_ypos=0) ] unhovered [Hide("gui_mainmenu")] at main_eff3
##imagebutton auto "images/mainmenu_extras_%s.png" xpos 0 ypos y focus_mask True action Start('extras') hovered [ Show("gui_mainmenu", my_picture="images/mainmenu obsidianassassin hover.png", my_tt_xpos=0, my_tt_ypos=0) ] unhovered [Hide("gui_mainmenu")] at main_eff4
$ y-=90
imagebutton auto "images/mainmenu_quit_%s.png" xpos 0 ypos y focus_mask True action Quit(confirm=True) hovered [ Show("gui_mainmenu", my_picture="images/none.png", my_tt_xpos=0, my_tt_ypos=0) ] unhovered [Hide("gui_mainmenu")] at main_eff5
Re: Images that Appear on Hover with Imagebuttons don't Disappear...
your code is like working, have you tried to clear the variables in launcher renpy? since constant variables remember the events and after leaving the game?ArizaLuca wrote: ↑Fri Sep 14, 2018 5:19 pmThe main_effs are just animations for when the screen first loads in.Code: Select all
screen main_menu: tag menu add "mainmenubganimated" $ y=0 imagebutton auto "images/mainmenu_start_%s.png" xpos 0 ypos y focus_mask True action Start() hovered [Show("gui_mainmenu", my_picture="images/mainmenu ri hover.png", my_tt_xpos=0, my_tt_ypos=0) ] unhovered [Hide("gui_mainmenu")] at main_eff1 $ y+=50 if persistent.epilogue == True: imagebutton auto "images/mainmenu_load_%s.png" xpos 0 ypos y focus_mask True action ShowMenu('load') hovered [ Show("gui_mainmenu", my_picture="images/mainmenu ri_old_hover.png", my_tt_xpos=0, my_tt_ypos=0) ] unhovered [Hide("gui_mainmenu")] at main_eff2 else: imagebutton auto "images/mainmenu_load_%s.png" xpos 0 ypos y focus_mask True action ShowMenu('load') hovered [ Show("gui_mainmenu", my_picture="images/mainmenu ri_old_hover_full.png", my_tt_xpos=0, my_tt_ypos=0) ] unhovered [Hide("gui_mainmenu")] at main_eff2 $ y-=50 imagebutton auto "images/mainmenu_settings_%s.png" xpos -30 ypos y focus_mask True action ShowMenu('preferences') hovered [ Show("gui_mainmenu", my_picture="images/mainmenu gray.png", my_tt_xpos=0, my_tt_ypos=0) ] unhovered [Hide("gui_mainmenu")] at main_eff3 ##imagebutton auto "images/mainmenu_extras_%s.png" xpos 0 ypos y focus_mask True action Start('extras') hovered [ Show("gui_mainmenu", my_picture="images/mainmenu obsidianassassin hover.png", my_tt_xpos=0, my_tt_ypos=0) ] unhovered [Hide("gui_mainmenu")] at main_eff4 $ y-=90 imagebutton auto "images/mainmenu_quit_%s.png" xpos 0 ypos y focus_mask True action Quit(confirm=True) hovered [ Show("gui_mainmenu", my_picture="images/none.png", my_tt_xpos=0, my_tt_ypos=0) ] unhovered [Hide("gui_mainmenu")] at main_eff5
Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
-
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
- Contact:
Re: Images that Appear on Hover with Imagebuttons don't Disappear...
run renpy, select the desired project from the left side, then look at "navigating the script", the "clear variables" line will appear,
Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
-
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
- Contact:
Re: Images that Appear on Hover with Imagebuttons don't Disappear...
Ah... I don't see it. I just see Category with files, labels, defines, etc...
Re: Images that Appear on Hover with Imagebuttons don't Disappear...
My book tutorial open
find this section (You can enter and find this section in the search)
"Ориентирование в главном меню Launcher Ren’Py"
there to translate, build android, change the subject
there, clear the variables you need
Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
-
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
- Contact:
Re: Images that Appear on Hover with Imagebuttons don't Disappear...
Er... I don't understand Russian... can you translate it or explain how to do it a different way? I'm sorry.
Re: Images that Appear on Hover with Imagebuttons don't Disappear...
This is only a guess, I may be wrong but I think when you click a button and show a new screen, the unhovered action is not triggered, so you should also add a Hide() action to your normal clicked action statements.
Code: Select all
# shortened to simplify
imagebutton auto "images/mainmenu_load_%s.png" action [ShowMenu('load'), Hide("gui_mainmenu")]
-
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
- Contact:
Re: Images that Appear on Hover with Imagebuttons don't Disappear...
Eh... it wasn't incorrect, but it didn't get rid of the issue either.DannX wrote: ↑Sat Sep 15, 2018 10:41 am This is only a guess, I may be wrong but I think when you click a button and show a new screen, the unhovered action is not triggered, so you should also add a Hide() action to your normal clicked action statements.Code: Select all
# shortened to simplify imagebutton auto "images/mainmenu_load_%s.png" action [ShowMenu('load'), Hide("gui_mainmenu")]
Re: Images that Appear on Hover with Imagebuttons don't Disappear...
Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
-
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
- Contact:
Re: Images that Appear on Hover with Imagebuttons don't Disappear...
Doesn't get rid of the issue either.
Re: Images that Appear on Hover with Imagebuttons don't Disappear...
How strange, I managed to replicate the issue but hiding the screen in each button did fix it for me, it could be something in your gui_mainmenu screen, if you can post it too so we can replicate your code as faithfully as possible.
-
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
- Contact:
Re: Images that Appear on Hover with Imagebuttons don't Disappear...
Would this be in the screens file? In that case, I completely eradicated the main menu screen to create this one.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]