- Aug 17, 2019
- 5,379
- 8,647
Basically title. Every time I enter the menu and then exit out, the dialogue box/text box doesn't reappear until I right click on the screen of the game. I'm guessing it has something to do with the code/'hide' of the exit imagebutton, but can't seem to figure out a way to fix it here's what's happening:
View attachment 2023-10-18 14-12-54.mp4
Here's the code for the initial settings screen (the home, save, load, settings, extras, exit, etc.):
And here's the code for the preferences menu:
I'm sure the problem child is in there somewhere, any hints?
View attachment 2023-10-18 14-12-54.mp4
Here's the code for the initial settings screen (the home, save, load, settings, extras, exit, etc.):
Python:
screen settings():
style_prefix "game_menu"
#add "gui/game_menu.png"
add "gamemenuloop"
add "gui/darkhover.png"
hbox:
at menuon
xpos 550
ypos 275
spacing 100
if not main_menu:
imagebutton:
# xpos 500
# ypos 300
at zoom4
idle "gui/missfortune/buttons/animbuttons/menu/menu01.png"
hover "menuhov2"
hovered Play("sound", "music/hover.wav")
action ShowMenu("menuscreen")
imagebutton:
# xpos 750
# ypos 300
at zoom4
idle "gui/missfortune/buttons/animbuttons/save/save01.png"
hover "savehov"
hovered Play("sound", "music/hover.wav")
action ShowMenu("save")
imagebutton:
# xpos 1000
# ypos 300
at zoom4
idle "gui/missfortune/buttons/animbuttons/load/load01.png"
hover "loadhov"
hovered Play("sound", "music/hover.wav")
action ShowMenu("load")
hbox:
at menuon
xpos 550
ypos 525
spacing 100
imagebutton:
# xpos 1100
# ypos 500
at zoom4
idle "gui/missfortune/buttons/animbuttons/settings/settings01.png"
hover "settingsvid"
hovered Play("sound", "music/hover.wav")
action ShowMenu("preferences")
imagebutton:
# xpos 475
# ypos 525
at zoom4
idle "gui/missfortune/buttons/animbuttons/creditplus/creditplus01.png"
hover "credithov"
hovered Play("sound", "music/hover.wav")
action ShowMenu("about")
if renpy.variant("pc"):
imagebutton:
# xpos 475
# ypos 525
at zoom4
idle "gui/missfortune/buttons/animbuttons/quit/quit01.png"
hover "quithov"
hovered Play("sound", "music/hover.wav")
action ShowMenu("exitscreen")
hbox:
xpos 610
ypos 490
spacing 235
add Text('main menu', font= 'gui/missfortune/fonts/Wadik.otf', color="#ffffff8c", size = 10)
add Text('save', font= 'gui/missfortune/fonts/Wadik.otf', color="#ffffff8c", size = 10)
add Text('load', font= 'gui/missfortune/fonts/Wadik.otf', color="#ffffff8c", size = 10) xpos 30
hbox:
xpos 611
ypos 750
spacing 235
add Text('settings', font= 'gui/missfortune/fonts/Wadik.otf', color="#ffffff8c", size = 10)
add Text('extras', font= 'gui/missfortune/fonts/Wadik.otf', color="#ffffff8c", size = 10)
add Text('quit', font= 'gui/missfortune/fonts/Wadik.otf', color="#ffffff8c", size = 10) xpos 20
imagebutton:
at zoom2
idle "gui/missfortune/buttons/animbuttons/exit/large/exit01.png"
hover "exithover"
hovered Play("sound", "music/hover.wav")
action Hide("settings")
xalign .99
yalign .020
Python:
screen preferences():
tag menu
use game_menu(_("Settings"), scroll="viewport")
viewport:
xmaximum 1360
ymaximum 900
#add "images/menu/settings_blocks.png" xalign .5 yalign .5
xalign .5
ypos 250
xpos 950
viewport:
at menuon
xmaximum 1000
ymaximum 1500
add '#0000'
vbox:
xpos 42
ypos 20
spacing 10
vbox:
viewport:
xmaximum 1200
ymaximum 100
spacing 35
xpos -4
vbox:
text ' Textbox Opacity' color "#e8e63f" size 20 font "gui/missfortune/fonts/Wadik.otf"
bar value FieldValue(persistent, "textbox_transparency", range=1.0, style="slider"):
left_bar 'images/menu/left_bar.png'
right_bar 'images/menu/right_bar.png'
xmaximum 595 yminimum 65
left_gutter 10
right_gutter 35
thumb_offset 24
hovered Play("sound", "music/hover.wav")
text "SCREEN TYPE" color "#e8e63f" size 20 font "gui/missfortune/fonts/Wadik.otf" ypos -25 xpos 200
# spacing 10
hbox:
spacing 30
viewport:
xmaximum 290
ymaximum 130
ypos -30
xpos 130
imagebutton:
at zoom3
idle "gui/missfortune/buttons/animbuttons/fullscreen/fullscreen01.png"
hover "fullscreenvid"
hovered Play("sound", "music/hover.wav")
action SetField(persistent, 'fullscreen', True), SetField(persistent, 'window', False), Preference("display", "fullscreen")
# add Text('FULLSCREEN', size = 16, color = '#FFFFFF', font = 'gui/missfortune/fonts/Wadik.otf'):
# if not persistent.fullscreen:
# alpha .3
#xalign .5 yalign .5
viewport:
xmaximum 290
ymaximum 130
ypos -30
xpos -20
imagebutton:
at zoom3
idle "gui/missfortune/buttons/animbuttons/wind/wind01.png"
hover "windowvid"
hovered Play("sound", "music/hover.wav")
action SetField(persistent, 'fullscreen', False), SetField(persistent, 'window', True), Preference("display", "window")
# add Text('WINDOWED', size = 16, color = '#FFFFFF', font = 'gui/missfortune/fonts/Wadik.otf' ):
# if not persistent.window:
# alpha .3
# xalign .5 yalign .5
vbox:
text 'ROLLBACK' color '#e8e63f' size 20 font 'gui/missfortune/fonts/Wadik.otf' xpos 225
spacing 10
hbox:
spacing 8
viewport:
xmaximum 195
ymaximum 110
xpos 85
ypos 0
imagebutton:
at zoom
idle "gui/missfortune/buttons/animbuttons/larrow/larrow01.png"
hover "larrowvid"
hovered Play("sound", "music/hover.wav")
action SetField(persistent, 'rollback', 'left'), Preference("rollback side", "left")
# add Text('LEFT', size = 16, color = '#FFFFFF', font = 'gui/missfortune/fonts/Wadik.otf' ):
# if persistent.rollback != 'left':
# alpha .3
# xalign .5 yalign .5
viewport:
xmaximum 195
ymaximum 110
ypos -2
xpos 30
imagebutton:
at zoom
idle "gui/missfortune/buttons/animbuttons/disable/disable01.png"
hover "disablevid"
hovered Play("sound", "music/hover.wav")
action SetField(persistent, 'rollback', 'disable'), Preference("rollback side", "disable")
# add Text('DISABLE', size = 16, color = '#FFFFFF', font = 'gui/missfortune/fonts/Wadik.otf' ):
# if persistent.rollback != 'disable':
# alpha .3
# xalign .5 yalign .5
viewport:
xmaximum 195
ymaximum 110
xpos -25
ypos 0
imagebutton:
at rarrowflipzoom
idle "gui/missfortune/buttons/animbuttons/larrow/larrow01.png"
hover "larrowvid"
hovered Play("sound", "music/hover.wav")
action SetField(persistent, 'rollback', 'right'), Preference("rollback side", "right")
# add Text('RIGHT', size = 16, color = '#FFFFFF', font = 'gui/missfortune/fonts/Wadik.otf' ):
# if persistent.rollback != 'right':
# alpha .3
# xalign .5 yalign .5
vbox:
text 'SKIP' color '#e8e63f' size 20 font 'gui/missfortune/fonts/Wadik.otf' ypos 20 xpos 262
spacing 10
hbox:
spacing 8
viewport:
xmaximum 195
ymaximum 110
ypos 0
xpos 60
imagebutton:
at zoom
idle "gui/missfortune/buttons/animbuttons/unseen/unseen001.png"
hover "unseenvid"
hovered Play("sound", "music/hover.wav")
if 'skip' in persistent.skip:
action Preference("skip", "toggle"), Function(persistent.skip.remove, 'skip')
else:
action Preference("skip", "toggle"), Function(persistent.skip.append, 'skip')
add Text('UNSEEN TEXT', size = 12, color = '#FFFFFF', font = 'gui/missfortune/fonts/Wadik.otf' ):
if "skip" not in persistent.skip:
alpha .3
xpos 0 ypos 95
viewport:
xmaximum 225
ymaximum 115
ypos -5
xpos 30
imagebutton:
at zoom
idle "gui/missfortune/buttons/animbuttons/afterch/afterch01.png"
hover "afterchvid" xalign 0.050
hovered Play("sound", "music/hover.wav")
if "after choices" in persistent.skip:
action Preference("after choices", "toggle"), Function(persistent.skip.remove, "after choices")
else:
action Preference("after choices", "toggle"), Function(persistent.skip.append, "after choices")
add Text('AFTER CHOICES', size = 12, color = '#FFFFFF', font = 'gui/missfortune/fonts/Wadik.otf' ):
if "after choices" not in persistent.skip:
alpha .3
xpos -1 ypos 101
viewport:
xmaximum 195
ymaximum 115
ypos 0
xpos -20
imagebutton:
at zoom
idle "gui/missfortune/buttons/animbuttons/trans/trans01.png"
hover "transvid"
hovered Play("sound", "music/hover.wav")
if "transitions" in persistent.skip:
action InvertSelected(Preference("transitions", "toggle")), Function(persistent.skip.remove, "transitions")
else:
action InvertSelected(Preference("transitions", "toggle")), Function(persistent.skip.append, "transitions")
add Text('TRANSITIONS', size = 12, color = '#FFFFFF', font = 'gui/missfortune/fonts/Wadik.otf' ):
if "transitions" not in persistent.skip:
alpha .3
xpos 0 ypos 97
viewport:
at menuon
xmaximum 670
ymaximum 250
xpos 688
add '#0000'
# vbox:
# spacing 35
# ypos 18
# xpos 42
# vbox:
# spacing 10
# viewport:
# ysize 23
# xsize 655
# text ' AUTO-FORWARD TIME' color '#FFFFFF' size 20 font 'gui/missfortune/fonts/Wadik.otf'
# if preferences.afm_time < 30:
# if preferences.afm_enable is False:
# $ preferences.afm_enable = True
# text str(round(preferences.afm_time // 4)) + ' sec' color '#FFFFFF' size 20 font 'gui/missfortune/fonts/Wadik.otf' xalign .9
# else:
# $ preferences.afm_enable = False
# text 'OFF' color '#FFFFFF' size 20 font 'gui/missfortune/fonts/Wadik.otf' xalign .9
# bar value Preference("auto-forward time"):
# left_bar 'images/menu/left_bar.png'
# right_bar 'images/menu/right_bar.png'
# xmaximum 595 yminimum 35
# left_gutter 6
# right_gutter 16
vbox:
imagebutton:
xpos 60
ypos 0
at zoom
idle "gui/missfortune/buttons/animbuttons/font/font01.png"
hover "fontvid"
hovered Play("sound", "music/hover.wav")
action Hide('about', transition = Dissolve(.5)), Show("typeadj", transition = Dissolve(.5))
vbox:
imagebutton:
xpos 220
ypos 0
at zoom
idle "gui/missfortune/buttons/animbuttons/tutorial/tutorial01.png"
hover "tutvid"
hovered Play("sound", "music/hover.wav")
action Hide('about', transition = Dissolve(.5)), Show("UItut", transition = Dissolve(.5))
vbox:
at menuon
spacing 10
viewport:
ysize 23
ypos 130
xsize 650
text ' TEXT SPEED' color '#e8e63f' size 20 font 'gui/missfortune/fonts/Wadik.otf' xalign 0.1
if preferences.text_cps:
text str(round(preferences.text_cps)) + ' char per sec' color '#FFFFFF' size 20 font 'gui/missfortune/fonts/Wadik.otf' xalign .9
else:
text 'OFF' color '#FFFFFF' size 20 font 'gui/missfortune/fonts/Wadik.otf' xalign .98
bar value Preference("text speed"):
ypos 130
xpos 45
left_bar 'images/menu/left_bar.png'
right_bar 'images/menu/right_bar.png'
xmaximum 595 yminimum 35
left_gutter 6
right_gutter 16
hovered Play("sound", "music/hover.wav")
viewport:
at menuon
xpos 690
ypos 230
ymaximum 340
xmaximum 670
add '#0000'
vbox:
spacing 35
ypos 0
xpos 42
vbox:
spacing 10
text ' MUSIC VOLUME' color '#e8e63f' size 20 font 'gui/missfortune/fonts/Wadik.otf'
bar value Preference("Music Volume"):
left_bar 'images/menu/left_bar.png'
right_bar 'images/menu/right_bar.png'
xmaximum 595 yminimum 35
left_gutter 6
right_gutter 16
hovered Play("sound", "music/hover.wav")
vbox:
spacing 10
text ' SOUND VOLUME' color '#e8e63f' size 20 font 'gui/missfortune/fonts/Wadik.otf'
bar value Preference("Sound Volume"):
left_bar 'images/menu/left_bar.png'
right_bar 'images/menu/right_bar.png'
xmaximum 595 yminimum 35
left_gutter 6
right_gutter 16
hovered Play("sound", "music/hover.wav")
# vbox:
# spacing 10
# text 'Textbox Transparency'
# bar value FieldValue(persistent, "textbox_transparency", range=1.0, style="slider"):
# left_bar 'images/menu/left_bar.png'
# right_bar 'images/menu/right_bar.png'
# xmaximum 595 yminimum 35
# left_gutter 6
# right_gutter 16
hbox:
xpos -160
textbutton _("MUTE ALL"):
xpos 240 ypos 11
if not persistent.muteall:
text_idle_color '#FFFFFF'
text_hover_color '#aead84'
hovered Play("sound", "music/hover.wav")
else:
text_idle_color '#FFFFFF'
text_hover_color '#aead84'
hovered Play("sound", "music/hover.wav")
text_font 'gui/missfortune/fonts/Wadik.otf'
text_size 20
action Function(chk_snd)
style "mute_all_button"
imagebutton:
ypos -10
at zoom2, menuon
if not persistent.muteall:
idle "gui/missfortune/buttons/animbuttons/muteoff/muteoff01.png"
hover "mutedoffvid"
hovered Play("sound", "music/hover.wav")
else:
idle "gui/missfortune/buttons/animbuttons/muteon/muteon01.png"
hover "muteonvid"
hovered Play("sound", "music/hover.wav")
focus_mask None
action Function(chk_snd)
imagebutton:
at zoom2, menuon
ypos 600
xpos 1600
idle "gui/missfortune/buttons/animbuttons/auxtest/auxtest01.png"
hover "auxvid"
hovered Play("sound", "music/hover.wav")
action Play("sound", "audio/s01e01/sfx/cardoor.mp3")
imagebutton:
at zoom2, menuon
ypos 490
xpos 1600
idle "gui/missfortune/buttons/animbuttons/auxtest/auxtest01.png"
hover "auxvid"
hovered Play("sound", "music/hover.wav")
action Play("sound", "audio/s01e01/music/King & Crozier - Worth The Risk.mp3")
imagebutton:
at zoom
idle "gui/missfortune/buttons/animbuttons/exit/large/exit01.png"
hover "exithover"
hovered Play("sound", "music/hover.wav")
if main_menu:
action ShowMenu("main_menu")
else:
action Hide("preferences")
xalign .99
yalign .020