Rebuild wardrobe (6) show the wardrobe screen under confirm
This commit is contained in:
parent
0712f0e251
commit
8092c3bbad
@ -311,8 +311,21 @@ init python:
|
||||
|
||||
# renpy.restart_interaction()
|
||||
|
||||
class __Return(Action):
|
||||
def __call__(self):
|
||||
if not wardrobe_autosave:
|
||||
if not char_active.create_outfit(temp=True).exists():
|
||||
renpy.notify("Advice: if you want to keep an outfit, save it.")
|
||||
|
||||
if wardrobe_suppress_warnings:
|
||||
return True
|
||||
|
||||
layout.yesno_screen("Exit without saving?\n{size=-6}Unsaved changes will be lost.{/size}", yes=Return(True), no=NullAction())
|
||||
return
|
||||
|
||||
return False
|
||||
|
||||
label wardrobe_actions:
|
||||
# TODO: check all variables created in these labels
|
||||
label .category(category):
|
||||
if not current_category == category:
|
||||
if wardrobe_check_category(category):
|
||||
@ -545,8 +558,8 @@ screen wardrobe(xx, yy):
|
||||
add "gui_fade"
|
||||
|
||||
if renpy.mobile:
|
||||
use close_button_background
|
||||
use close_button
|
||||
use close_button_background(action=__Return())
|
||||
use close_button(action=__Return())
|
||||
|
||||
fixed:
|
||||
use wardrobe_menu(xx, yy)
|
||||
@ -596,12 +609,7 @@ label wardrobe_menu():
|
||||
|
||||
call screen wardrobe(662, 50)
|
||||
|
||||
if not wardrobe_autosave:
|
||||
if not char_active.create_outfit(temp=True).exists():
|
||||
$ renpy.notify("Advice: If you want to keep an outfit, save it.")
|
||||
|
||||
if not (wardrobe_suppress_warnings or renpy.confirm("Exit without saving?\n{size=-6}Unsaved changes will be lost.{/size}")):
|
||||
jump .cancel_close
|
||||
if _return:
|
||||
|
||||
$ char_active.equip(char_outfit)
|
||||
|
||||
@ -907,12 +915,12 @@ screen wardrobe_schedule_menuitem(item):
|
||||
|
||||
default mpos = renpy.get_mouse_pos()
|
||||
|
||||
use invisible_button(action=Return(), alternate=Show("wardrobe_schedule_menuitem", item=item))
|
||||
use invisible_button(action=__Return(), alternate=Show("wardrobe_schedule_menuitem", item=item))
|
||||
|
||||
window:
|
||||
style "empty"
|
||||
pos mpos
|
||||
#use invisible_button(action=NullAction(), alternate=Return())
|
||||
#use invisible_button(action=NullAction(), alternate=__Return())
|
||||
|
||||
frame:
|
||||
style "empty"
|
||||
|
Loading…
Reference in New Issue
Block a user