I am using the DSE and I have split the day planner into separate parts for each time period. So in the morning you do not pick what you're going to do in the evening, you only pick the morning activity.
Then in the evening, the planner appears again and asks what you want to do in the evening.
As a result, I want to get rid of the "done planning" button because it's redundant as the user is only picking one single option at any given time. How can I do this without breaking the script?
Obviously I can't just delete the button itself because then the player wouldn't be able to progress, they need to be able to proceed just by clicking the option.
Code: Select all
# Our Day Planner displays the stats, and buttons for the user to choose
# what to do during each period of time defined in "periods".
screen day_planner(periods):
# indicate to Ren'Py engine that this is a choice point
$ renpy.choice_for_skipping()
frame:
style "dayplanner_frame"
use display_stats(name=True, bar=True, value=True, max=True)
use display_planner(periods)
screen display_planner(periods):
frame:
style_group "dp"
vbox:
text "Day Planner" yalign 0.0 xalign 0.5
hbox:
$ can_continue = True
for p in periods:
vbox:
label p
if p not in __periods:
$ raise Exception("Period %r was never defined." % p)
$ this_period = __periods[p]
$ selected_choice = getattr(store, this_period.var)
$ valid_choice = False
vbox:
style "dp_choice_vbox"
for name, curr_val, enable, should_show in this_period.acts:
$ show_this = eval(should_show)
$ enable = eval(enable)
$ selected = (selected_choice == curr_val)
if show_this:
if enable:
textbutton name action SetField(store, this_period.var, curr_val)
else:
textbutton name
if show_this and enable and selected:
$ valid_choice = True
if not valid_choice:
$ can_continue = False
if (can_continue):
textbutton dp_done_title style "dp_done_button" action Return()
else:
textbutton dp_done_title style "dp_done_button"